The Black Art of picking the right encoding settings

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
MickM
Novice
Posts: 68
Joined: Sat Nov 04, 2017 3:45 pm

The Black Art of picking the right encoding settings

Post by MickM »

I'm a Mac user, new to Handbrake and finding myself swimming through quicksand with the myriad of encoding options. I have a huge library of ripped DVDs, all done using MacDVDRipper Pro (MDRP) - I've ripped just the main movie or just the individual TV episodes as *.dvdmedia packages (which are really just folders containing video_ts and audio_ts folders so they look like individual small DVDs). I didn't opt for any further compression because I wanted further video corruption from the source material. But now my 16TB NAS box is full so I've decided to compress everything into H264 or H265 using modest settings so any artifacts are barely noticeable.

I have a suggestion for changing the way Handbrake might work that I'd like to discuss (to make this all a bit more user-friendly). On the right side of the main window there is a Preset pane that contains things like target playback devices or target quality and encoding speed settings. What I think is missing is appropriately matching the source material (the input) to be encoded with the stuff on the right side (the output device). If my source material is a DVD then there's just no point selecting an output or encoding method targeted for more resolution than the DVD already contains. If Handbrake knows what my source is it could gray out all the dumb output choices for me e.g. Super High Quality 1080p or it could limit the range over which I could grab the thumb of a slider to move it. Likewise, if I choose my output device to be (just being silly) a smart watch, then Handbrake would even know that maintaining the original DVD quality is pointless and it could gray out or constrain even more encoding options.

It could even go one step further. Say I bought the entire James Bond collection - conveniently all on one DVD ;-). You'd think Handbrake could potentially see the size of the movie file and it's running time and make a call from the calculated average bit-rate that the source quality must obviously be awful in this case and so constrain my encoding options even more than it would for a normal DVD (based on what makes sense).

Does this sound reasonable? I know making things easy to use is often the hardest part of writing software...
rollin_eng
Veteran User
Posts: 4859
Joined: Wed May 04, 2011 11:06 pm

Re: The Black Art of picking the right encoding settings

Post by rollin_eng »

The presets are designed to take MOST inputs and generate a compatible output.

The resolutions are an "Up to" thus if your input is less than 1080 so will your output.

Unfortunately there are just too many possibilities when it comes to inputs and outputs so there can only be so many presets.

You can always create your own presets as well.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: The Black Art of picking the right encoding settings

Post by JohnAStebbins »

MickM wrote: Sun Nov 05, 2017 6:36 pm I'm a Mac user, new to Handbrake and finding myself swimming through quicksand with the myriad of encoding options. I have a huge library of ripped DVDs, all done using MacDVDRipper Pro (MDRP) - I've ripped just the main movie or just the individual TV episodes as *.dvdmedia packages (which are really just folders containing video_ts and audio_ts folders so they look like individual small DVDs). I didn't opt for any further compression because I wanted further video corruption from the source material. But now my 16TB NAS box is full so I've decided to compress everything into H264 or H265 using modest settings so any artifacts are barely noticeable.

I have a suggestion for changing the way Handbrake might work that I'd like to discuss (to make this all a bit more user-friendly). On the right side of the main window there is a Preset pane that contains things like target playback devices or target quality and encoding speed settings. What I think is missing is appropriately matching the source material (the input) to be encoded with the stuff on the right side (the output device). If my source material is a DVD then there's just no point selecting an output or encoding method targeted for more resolution than the DVD already contains.
True. And HandBrake will not encode to a higher resolution than your source. If the source resolution is lower than the *max* resolution setting in the preset, the output resolution will match the source resolution.
If Handbrake knows what my source is it could gray out all the dumb output choices for me e.g. Super High Quality 1080p or it could limit the range over which I could grab the thumb of a slider to move it. Likewise, if I choose my output device to be (just being silly) a smart watch, then Handbrake would even know that maintaining the original DVD quality is pointless and it could gray out or constrain even more encoding options.
While that would be helpful in the particular scenario you describe, it's going cause problems for other scenarios. For example, there is no "Super HQ 240p Surround" preset. So what would a user do that wants everything in the "Super HQ 480p Surround" preset but has a source video that is lower than 480p? All the relevant presets would be greyed out and unavailable.
It could even go one step further. Say I bought the entire James Bond collection - conveniently all on one DVD ;-). You'd think Handbrake could potentially see the size of the movie file and it's running time and make a call from the calculated average bit-rate that the source quality must obviously be awful in this case and so constrain my encoding options even more than it would for a normal DVD (based on what makes sense).
No, actually it can't. The bitrate required for good quality anime is orders of magnitude lower than the bitrate required for a good quality encode of a graniy movie like Aliens2. You can't extrapolate quality based on bitrate. You could make a rule that you always use average bitrrate encoding mode instead of constant quality and then set the output bitrate lower than the input bitrate. But this will result in larger files in the vast majority of cases than if you just picked a sane constant quality factor for all your encodes.
Does this sound reasonable? I know making things easy to use is often the hardest part of writing software...
Sorry, but nope :mrgreen:
MickM
Novice
Posts: 68
Joined: Sat Nov 04, 2017 3:45 pm

Re: The Black Art of picking the right encoding settings

Post by MickM »

Sigh - I had hoped there might be some wiggle room in making this more user-friendly. I get that you may still want to select a "grayed out" item - maybe I should have changed my original proposal accordingly. You could click on an override button to select an unrecommended option. Anyway, I guess I knew this one would be a can of worms... Thanks for your feedback.
While I'm here, can somebody please tell me with "RF" stands for? I didn't see it in any of the documentation.
mduell
Veteran User
Posts: 8206
Joined: Sat Apr 21, 2007 8:54 pm

Re: The Black Art of picking the right encoding settings

Post by mduell »

Rate Factor
MickM
Novice
Posts: 68
Joined: Sat Nov 04, 2017 3:45 pm

Re: The Black Art of picking the right encoding settings

Post by MickM »

Thanks. And that begs a follow up question:
Can somebody please tell me what "RF" does (aside from the vague it is inversely proportional to quality) :-). Also, I'm not 100% sure if a given RF setting for H264 corresponds to the same quality for H265. I'm guessing not.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: The Black Art of picking the right encoding settings

Post by JohnAStebbins »

MickM wrote: Sun Nov 05, 2017 8:13 pm Thanks. And that begs a follow up question:
Can somebody please tell me what "RF" does (aside from the vague it is inversely proportional to quality) :-).
Most of us (myself included) aren't qualified to give a good technical description of what RF does. So here's a link :lol: http://slhck.info/video/2017/02/24/crf-guide.html
As a general guide, moving the RF up by 6 will halve the size or your output and down by 6 will double it.
Also, I'm not 100% sure if a given RF setting for H264 corresponds to the same quality for H265. I'm guessing not.
No it does not. And in fact a given RF factor does not mean the same thing if any other setting is changed for either encoder. I.e. RF 18 when using the "ultrafast" encoder preset is not the same thing as RF 18 when using the "medium" preset. All that can be said is that it should be somewhat close to the same, but it won't be exactly the same. This is why so many people get confused when they do an encode with "ultrafast" and find the output is sometimes smaller than the "same" encode using "medium". They assume the output is the same quality when it is not.
Post Reply