Need help understanding Constant Quality recomendations

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
rfg
Posts: 19
Joined: Tue Jan 07, 2014 9:04 am

Need help understanding Constant Quality recomendations

Post by rfg »

On the following page:

https://trac.handbrake.fr/wiki/ConstantQuality

it is recommended that users use a constant quality setting of 20 for encoding Standard Def (DVD) material or a setting of 22 for High Def (720/1080) material.

Given the fact that... as explained elsewhere on that same page... lower numbers on this scale imply higher quality results (i.e. less compression applied), the suggested settings appear entirely counter-intutive, however I am still trying to understand the recommendations and hope that someone will explain them to me.

Given that DVD material is 480p, I would guess, based upon the recommendations, that if I had a Low Def source file (e.g. 240p) that in that case the recommended Constant Quality setting for transcoding this source material with Handbrake would be something like 18. However in that case, it seems to me, we would, in effect, be preserving a great deal of the fine detail of the original source material, however in a case like this (i.e. a 240p original) the original source material probably does not even have the level of fine detail that would be preserved at a CQ setting of 18. So this setting would be very wasteful, correct?

The bottom line is that, as I have said, I am trying hard to make sense out of the recommendations for the CQ settings, and I am just having a hard time doing that, because they don't appear to make sense to me. To be clear, I am not by any means criticizing the recommendations. I am only trying to understand them.
Smithcraft
Veteran User
Posts: 2691
Joined: Thu Jan 22, 2009 8:04 pm

Re: Need help understanding Constant Quality recomendations

Post by Smithcraft »

You already figured it out. The lower quality files would appreciate a higher quality setting. A higher quality file can appreciate a greater loss and still look good.

Only you can determine if the image quality preserved at any quality setting is a waste of space. One might generally say that any file that comes out bigger than the source is a waste of space.

SC
musicvid
Veteran User
Posts: 3666
Joined: Sat Jun 27, 2009 1:19 am

Re: Need help understanding Constant Quality recomendations

Post by musicvid »

240p doesn't have any "fine detail."
Just preserving pixels is the goal.
rfg
Posts: 19
Joined: Tue Jan 07, 2014 9:04 am

Re: Need help understanding Constant Quality recomendations

Post by rfg »

Smithcraft wrote: Only you can determine if the image quality preserved at any quality setting is a waste of space. One might generally say that any file that comes out bigger than the source is a waste of space.
So, if I am understanding correctly, it might make sense, for my purposes, to select a target file size (rather than some Constant Quality setting) where the target file size is the same as (or close to) the input file size, correct?
Smithcraft
Veteran User
Posts: 2691
Joined: Thu Jan 22, 2009 8:04 pm

Re: Need help understanding Constant Quality recomendations

Post by Smithcraft »

If you're using an obsolete version of Handbrake then feel free to waste either the file or space on Target File Size.

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

Re: Need help understanding Constant Quality recomendations

Post by mduell »

rfg wrote:
Smithcraft wrote: Only you can determine if the image quality preserved at any quality setting is a waste of space. One might generally say that any file that comes out bigger than the source is a waste of space.
So, if I am understanding correctly, it might make sense, for my purposes, to select a target file size (rather than some Constant Quality setting) where the target file size is the same as (or close to) the input file size, correct?
No, that's always a terrible idea.

Try encoding at a variety of RF and see what you're happy with in terms of preserving what little quality the source files had.
sciFan
Posts: 10
Joined: Sun Jan 12, 2014 3:17 pm

Re: Need help understanding Constant Quality recomendations

Post by sciFan »

FWIW, you should always remember that if you are encoding from DVD you are not getting an impeccable source in the first place. MPEG2 (the DVD codec) is ancient and very lossy. Remember it is related closely to JPEG, and think about the problems you can have with visible artifacts around light/dark edges and colour changes when JPEG images have compression above, say, 5%. Just look at the picture edges of a DVD screenshot zoomed in a photo-editor to see how the codec introduces highlighted lines there, destroying image quality.

Given this, aiming for perfect "detail" out of a DVD is impossible. Aim for rip filesizes that are acceptable (to you) and ALWAYS use constant quality. Personally I always use RF19 and get excellent results from both DVD and BluRay, with very acceptable filesizes. A little custom temporal noise-reduction also helps to keep filesizes down without sacrificing detail, arguably even improving image stability: try 0:0:2:0 as a custom filter string on moderately clean black and white sources, and add to the last two parameters depending on the level of grain (the very last is for temporal colour, for removing colour crawl/sparkle).
musicvid
Veteran User
Posts: 3666
Joined: Sat Jun 27, 2009 1:19 am

Re: Need help understanding Constant Quality recomendations

Post by musicvid »

Not entirely true.
Although mpeg-2 is not as efficient as h264 at delivery bandwidth, which I think is your point, it shines at higher bitrates.
Sony chose mpeg-2 for xdcam acquisition including hd422 for good reasons.
sciFan
Posts: 10
Joined: Sun Jan 12, 2014 3:17 pm

Re: Need help understanding Constant Quality recomendations

Post by sciFan »

musicvid wrote:Not entirely true.
Although mpeg-2 is not as efficient as h264 at delivery bandwidth, which I think is your point
No. My point wasn't about the compression efficiency of MPEG2, but about the artifacts it produces in DVDs at the compression level commonly used there, which damage images badly. My point was that DVD sources are a very rough approximation of the original source due to this anyway, so aiming to transfer them with absolute fidelity is somewhat pointless, which is why you may as well use noise reduction to clean up the image and minimise filesize of the encode at the same time. I am a pragmatist.
Post Reply