Some troughts about the "best" Encoder Settings

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
mlebek1
Posts: 2
Joined: Sun Apr 13, 2014 9:14 pm

Some troughts about the "best" Encoder Settings

Post by mlebek1 »

Dear all,
I've been experimenting a little with the settings and I came to the conclusion that some of the default recommendations don't seem to be optimal.

1. Filters.
I found that the "Detelecine" and also the "Decomb" Filters do use up a huuuge amount of time (> 25% of the total encoding time), when using the recommendation to set these to "default". In addition, these filters increase the file size of the encoded file, even if they do not do anything.
My conclusion is to just leave all filters OFF in the case standard progressive material is handled.
"Decomb" is ONLY useful in the case interlaced material is processed. Whether the raw material is interlaced can be visually checked on VLC or any other player that allows to switch de-interlacing off. Just check for "comb" effects.
"Detelecine" is only required for NTSC and in addition, it seems to have some strange side-effects on progressive material, even when it is set to "Default", and should not do anything. In fact, it seems to cause small judder.

2. RF = 20.
I cannot confirm that the recommended RF of 20 is sufficient, not even for 720p material.
You will, of course, never see a difference when comparing still images. But(!) - in the case of quick camera moves, diagonally or horizontally, you will notice some strange juddering within the video. Standard MPEG has some judder, too, and most people seem to ignore this or just don't notice any of these effects.
But this new kind of x264-judder is different from the MPEG one. It looks smooth and artificial at the same time, straining the eyes of people that cannot fully ignore this effect.
I checked with VLC and the effect is visible until an RF of 15. Some other software players may compensate this while playing, but not all of them do.
Conclusion: if you really want the smoothest camera moves, you need to set RF 15 or even 14 to be 100% on the safe side for best quality in all thinkable situations.

3. Container Format.
Unless you are a happy Apple user, I would definitely recommend to make .MKV the default format, since MP4/M4V has a lot of issues on 3rd-party set-top boxes etc. If you spend a lot of time finding out that your chapter marks or subtitles are not working, this is not a good experience ;-)

Ok, that's all for today. Thanks for reading and have a nice day :)
-ml
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: Some troughts about the "best" Encoder Settings

Post by Smithcraft »

1 - That is correct, and that's why neither are recommended for progressive content.

2 - Everyone's eyes are different, and they will see things that others don't. I encode HD at 22, and SD at 18, and I don't see an issue.

3 - There are some people that think that because the Matroska container is not implemented by a committee that is directed by another committee, it is not a good container. Other people think it's the best thing since sliced bread.

SC
Deleted User 13735

Re: Some troughts about the "best" Encoder Settings

Post by Deleted User 13735 »

The "defaults" are starting points, only. [Default != Optimal]
"Optimal" is a highly individual decision, hopefully reasonably based on quantitative and qualitative observations made over time.
Think of the "defaults" as "failsafe" settings that will work for most new users such as yourself.
I came to the conclusion that some of the default recommendations don't seem to be optimal.
For who? Are your settings "more" optimal for me than the defaults?
RF15 is a ridiculous way to address motion estimation, because the encodes will "often" be way larger than the source!
Most of us use Handbrake to make our files smaller. So more efficient (slower) compression trumps bit flooding, most of the time.
Read the docs.

I've got some optimal settings that are in use for medium-bandwidth web content that you wouldn't touch in a million years.
But I won't post them here :shock:
Devore
Posts: 34
Joined: Thu Sep 26, 2013 3:57 pm

Re: Some troughts about the "best" Encoder Settings

Post by Devore »

There are no "best" settings, because each source material and personal use case is different and requires potentially different settings. That's why they are there.
mas5acre
Experienced
Posts: 77
Joined: Thu Jun 04, 2009 3:01 am

Re: Some troughts about the "best" Encoder Settings

Post by mas5acre »

i agree with the original poster about turning off all video filters on any preset on first run handbrake. In this new age of hd video, i feel a novice user is just wasting cpu cycles. Should be off by default on all presets unless needed, so noobs get faster encodes with little research into the functionality of handbrake. Handbrake presets (I guess) were made in an era of standard definition tvs and those filters were more essential. Older dvds need this too,but most content is released without need for those filters nowadays. I am no developer, but love handbrake, so thanks for listening.
Deleted User 13735

Re: Some troughts about the "best" Encoder Settings

Post by Deleted User 13735 »

1. Create a custom preset, using your own "optimal" settings.
2. Save that preset, as your default.
3. Resist the temptation to tell others that your settings are what's best for them.

-- That's all there is to it :?
mlebek1
Posts: 2
Joined: Sun Apr 13, 2014 9:14 pm

Beginner's Guide (or something like that)

Post by mlebek1 »

After having tested a lot by myself (because I could not find a complete "Beginner's Guide" on the web), I decided to share my experience for other novice users and for anybody who is interested after all.
Here are the settings (and why I believe they do work) for progressive PAL footage at 1080p or 720p:

Picture
Anamorphic: Strict [avoid downsampling higher resolutions to lower ones, e.g. 1080 to 720 unless you are preparing something for a mobile device or for the web. Downsampled footage looks really ugly.]
Cropping: Custom, 0/0/0/0

Filters
Detecline: Off
Decomb: Off
Deinterlace: Off [activate only in the very rare case that you need to process interlaced video, e.g. from some DVB-receivers or HDD-recorders]
Denoise: Off
Deblock: Off

Video
Video Codec: H.264 (x264)
Framerate (FPS): Same as Source
Framerate: Variable Framerate
x264 Preset: Slower [On Full HD, "Slower" gives you a noticeably crispier picture than "Slow" during fast camera moves in scenes with lots of detail.]
x264 Tune: None [setting this to 'Film' or anything will cause lots of judder, so turn it off!]
Fast Decode: off
H.264 Profile: High
H.264 Level: 4.1 [or Auto]
Container: Mkv [ensures best compatibility with set-top boxes etc.]

Quality.
Constant Quality: 19 RF [RF affects loss of detail and judder / motion blur, whereas HD and Full HD footage behave differently.
The following tests were done to find the largest RF value that still preserves almost all the quality of the raw footage:
- Encoding of very complex footage with a lot of horizontal and vertical camera moves while closely monitoring judder, until it did no longer feel like a stop-motion movie.
- Side-by-side comparison with unencoded Full HD-footage and different RF settings until there was absolutely no detail missing.
-> The conclusion out of this comparison was RF 20 for 1080p and 21 for 720p (which is almost, but not exactly the recommendation from the online helpfiles).
I also realized that output quality and smoothness has a lot to do with the player software, the size of the MKV file (yes, some players have issues with large files) and with the display type used. Furthermore, some issues may be caused even by the display driver, for example disable "inverse Telecine" Option in the nVidia driver settings may make the picture smoother in some cases. All testing was carried out in PotPlayer and VLC, on IPS and PVA displays respectively.
The bottom line is, that with RF to 19 for both, 1080p and 720p, you will be on the safe side. RF 20 will be ok, too, if disk space matters.]


Subtitles.
I'm not sure if this is explained somewhere, at least I didn't find any concrete hint on dealing with for forced subs, so please correct me if the following is wrong:
Handbrake does not support to dynamically switch subtitles on/off while the movie is playing, this means:
- If you have forced subtitles in a separate stream that is active all the time, you just have to include this stream and set the checkbox "Default = on".
- If your forced subtitles are NOT in a separate stream, and the regular subtitle stream is dynamically activated/deactivated on demand, you need the following workaround:
Add the subtitle stream which includes the "forced" parts, but activate the checkboxes [Forced only] and [Default].
Secondly, add the same subtitle stream again, but do not check these checkboxes.
This will extract the forced captions into an extra "dummy" subtitle stream which can be constantly activated.

That's all there was to test from my point of view. I hope this will help someone who is in doubt of where to start with this definitely awesome tool.
Thanks a lot to the dedicated Handbrake Developer Team for providing this great program. Keep up the excellent work!
Post Reply