Need help with constant quality encodes

Random chit-chat and anything that doesn't belong elsewhere
Post Reply
qzx7749
Posts: 5
Joined: Mon Jul 15, 2013 12:05 am

Need help with constant quality encodes

Post by qzx7749 »

G’day everyone.

First off I would like to say thank you to the developers. Handbrake is a great app and it is fantastic to see such a vibrant community here in the forums.

Secondly, this is my first post in the forums so if I have started this thread in the wrong place or made some other rookie mistake I apologize.


Here’s my problem.

I have been using handbrake for many months now outputting .m4v files using the average bitrate (2 pass) encoder, to my own disadvantage according to the wiki info and posts in the forums. So I am jumping on the constant quality bandwagon (where I should have been all along?).

But I am having trouble getting my head around files output when using constant quality encoding. Do not misunderstand me, I am not confused by the RF scale or how it works.

What has me confused is that the Handbrake wiki states:

“when converting from a DVD source, there is no reason to go above an RF of ~19, which is roughly equivalent to how heavily the DVD is compressed.” (https://trac.handbrake.fr/wiki/ConstantQuality)

However I have a DVD source that appears to have an average bitrate of roughly 5500kbps, but when I encode this DVD into an .m4v using the AppleTV 3 preset with the RF set at 19 the resulting file has an average bitrate of more like 2000kbps.

My question is why? I know the bitrates will not match and I was never expecting them to. But based on the info in the wiki I was expecting them to "roughly equivalent". For example a 5500kbps DVD source and a 4000-5000kbps .m4v.

Have I misunderstood the relationship between bitrate and quality or are there other factors at play here that have escaped my attention? If so, what are they?

I am trying to produce an .m4v file which is as close as possible in quality to the source without producing a file that has “dead bytes” unnecessarily inflating the file size.

Any help is welcome.

TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Need help with constant quality encodes

Post by TedJ »

You haven't taken into consideration the different video codecs being used here. DVDs contain MPEG2 video while HandBrake by default encodes to H.264, a much more efficient format resulting in a significantly smaller file.

For the record, the majority of my DVD encodes (RF20, x264 slow preset, film tune) result in a video bitrate of between 1-1.5 Mbps.

qzx7749
Posts: 5
Joined: Mon Jul 15, 2013 12:05 am

Re: Need help with constant quality encodes

Post by qzx7749 »

So that's all there is to it, I'm not doing anything wrong?

TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Need help with constant quality encodes

Post by TedJ »

Not at all. :)

More importantly, how do the encodes look to your eyes? If you're happy with them then it's all good.

qzx7749
Posts: 5
Joined: Mon Jul 15, 2013 12:05 am

Re: Need help with constant quality encodes

Post by qzx7749 »

Well, that all seems too easy - just the way a great app should be!

One semi-related followup question though.

That same wiki page I have linked above recommends an RF value of 20 (+/- 1) for DVD/SD and an RF of 22 (+/- 1) for Blu-ray/HD. This strikes me as being counter-intuitive as it appears to recommend that I should encode a Blu-ray at a lesser quality than a DVD. What is the reasoning for this?

Smithcraft
Veteran User
Posts: 2691
Joined: Thu Jan 22, 2009 8:04 pm

Re: Need help with constant quality encodes

Post by Smithcraft »

Six times the data doesn't need a higher CQ. Feel free to use 20 though.

SC

mduell
Veteran User
Posts: 6930
Joined: Sat Apr 21, 2007 8:54 pm

Re: Need help with constant quality encodes

Post by mduell »

qzx7749 wrote:That same wiki page I have linked above recommends an RF value of 20 (+/- 1) for DVD/SD and an RF of 22 (+/- 1) for Blu-ray/HD. This strikes me as being counter-intuitive as it appears to recommend that I should encode a Blu-ray at a lesser quality than a DVD. What is the reasoning for this?
RF is kind of like quality per pixel, so when you have a lot more pixels to be viewed on the same size display (your tv/monitor is a fixed size) you can use a higher RF on higher resolution material.

qzx7749
Posts: 5
Joined: Mon Jul 15, 2013 12:05 am

Re: Need help with constant quality encodes

Post by qzx7749 »

Again, from the wiki.

"when converting from a DVD source, there is no reason to go above an RF of ~19, which is roughly equivalent to how heavily the DVD is compressed. If you do go higher, your output will be larger than your input! "

Where on the scale do you reach the equivalent point for a blu-ray? Which is ultimately what I'm looking for.

Smithcraft
Veteran User
Posts: 2691
Joined: Thu Jan 22, 2009 8:04 pm

Re: Need help with constant quality encodes

Post by Smithcraft »

Depends on the movie. A movie that is clean will compress quite well. A movie that is grainy might come out larger.

SC

mduell
Veteran User
Posts: 6930
Joined: Sat Apr 21, 2007 8:54 pm

Re: Need help with constant quality encodes

Post by mduell »

qzx7749 wrote:Again, from the wiki.

"when converting from a DVD source, there is no reason to go above an RF of ~19, which is roughly equivalent to how heavily the DVD is compressed. If you do go higher, your output will be larger than your input! "

Where on the scale do you reach the equivalent point for a blu-ray? Which is ultimately what I'm looking for.
21

qzx7749
Posts: 5
Joined: Mon Jul 15, 2013 12:05 am

Re: Need help with constant quality encodes

Post by qzx7749 »

Ok that’s two different answers from two different board veterans. Without meaning to sound condescending, does anyone care to cast a third, adjudicating vote?

Smithcraft
Veteran User
Posts: 2691
Joined: Thu Jan 22, 2009 8:04 pm

Re: Need help with constant quality encodes

Post by Smithcraft »

It depends really on your eyes and your display. What might be transparent to you might look bad to me.

SC

Post Reply