Post Your "Best Settings" here and Why.

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
74c7e5be26a3
Posts: 2
Joined: Thu Nov 06, 2008 1:26 pm

Re: Post Your "Best Settings" here and Why.

Post by 74c7e5be26a3 »

Hi rhester, thank you. That was really helpful. I will experiment with constant quality settings.

One other question. Motion Estimation Range (me-range) -- I gather from the documentation that 24, 32, and 64 are good values, but I cannot see anything in the documentation or in Google that explains why a larger or smaller value is better and why.

Could you possibly explain a little about what value suits what type of video and why?

Many thanks.
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: Post Your "Best Settings" here and Why.

Post by rhester »

Larger ranges increase the odds that you will have a match in a further-away macroblock, which can improve compression efficiency but at the expense of time (which actually explains virtually every tradeoff in encoding, I suppose). A range of 32 should be a good balance.

Rodney
Movies66
Posts: 1
Joined: Fri Nov 14, 2008 9:58 am

Re: Post Your "Best Settings" here and Why.

Post by Movies66 »

WHY: Watch my DVD library using AppleTV via a Panasonic PTAE-2000 beamer and a KEF KIT120 audio system

PRIORITIES: "best" without the need to get a PhD in video encoding

SETTINGS: ATV preset; always use latest Handbrake build with corresponding preset

REASON: After all, that's what the ATV preset setting provided with Handbrake is hopefully supposed to deliver. My educated guess is that the folks developing Handbrake (respect to all of them!!!) have figured exactly that as the best general "best" setting accepting the rather philosophical fact that there is no best "best" setting.

This approach makes life so easy, and frees up a lot of time, e.g. to watch movies.

:D
Bobcat37
Posts: 39
Joined: Tue Nov 25, 2008 5:51 am

Re: Post Your "Best Settings" here and Why.

Post by Bobcat37 »

rhester wrote:Larger ranges increase the odds that you will have a match in a further-away macroblock, which can improve compression efficiency but at the expense of time (which actually explains virtually every tradeoff in encoding, I suppose). A range of 32 should be a good balance.

Rodney
I was wondering the same thing as 74c, thanks for the info. I was (and still am) confused though, why is the handbrake default set at 16 when the handbrake user guide says right on it that it recommends 24, 32, or 64?
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: Post Your "Best Settings" here and Why.

Post by rhester »

Because it is also the default of the underlying encoder, x264. If we ramp it up, it will increase encoding time significantly, irritating a large part of the user base that just doesn't care. :)

Rodney
Bobcat37
Posts: 39
Joined: Tue Nov 25, 2008 5:51 am

Re: Post Your "Best Settings" here and Why.

Post by Bobcat37 »

rhester wrote:Because it is also the default of the underlying encoder, x264. If we ramp it up, it will increase encoding time significantly, irritating a large part of the user base that just doesn't care. :)

Rodney
Haha gotcha. So if I go to 32 from 16, besides taking longer to encode, what is the benefit? When you say "compression" is better... does that mean quality will be better, or file sizes will be better (smaller), or possibly both? Thanks again!
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: Post Your "Best Settings" here and Why.

Post by rhester »

If CRF, smaller files. If ABR, better quality. Either will be a small improvement but nothing staggering.

Rodney
Bobcat37
Posts: 39
Joined: Tue Nov 25, 2008 5:51 am

Re: Post Your "Best Settings" here and Why.

Post by Bobcat37 »

Awesome, I'll give it a try. I'm using CRF and want to get the files a bit smaller for my iPod... we'll see what kind of speed hit it takes, I rip things on either a top-of-the-line iMac or MacBook, so I'm not terribly worried about that.

If I go to 32 the files will still be iPod compatible I hope?
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: Post Your "Best Settings" here and Why.

Post by rhester »

Yes - merange is an encode-time issue but is not player-dependent. No compatibility issues.

Rodney
jweires
Posts: 6
Joined: Mon Nov 24, 2008 6:23 pm

Re: Post Your "Best Settings" here and Why.

Post by jweires »

@ nightstrm,

Would you still suggest raising the constant quality from 59% to 63% as you suggest below? Or was that just for your original settings before the "Universal" setting was created?

And if so, any guess to the size vs quality difference this change will give?

John

nightstrm wrote:NOTICE TO ANYONE WHO STUMBLES UPON THIS: As of .9.3, my recommendation is to use the Universal preset (and optionally turn on deteleceine+decomb -- I do for every encode). Between jbrjake and myself (and others), I think the settings there are pretty darn good.

Here is the preset I have been using to generate encodes that are compatible with both the AppleTV and the iPhone, while taking advantage of the new features in .9.2 (including AAC+AC3, improved anamorphic support, and VFR to name a few). Using these settings, I have yet to come across an encode that did not work on both devices.

It should be noted that this uses CRF, which means you cannot accurately predict what the output file size is going to be. This has resulted in some files that seem quite large in comparison to the 8GB of space on my iPhone, but have so far been below 2.5GB. I need Steve to announce a 32GB 3G iPhone in the very near future! :mrgreen:

EDIT: In case I haven't made it clear enough, this preset is not going to be for everyone. It is slower than some of the stock presets, and the file sizes are larger than normal, especially with the limited drive space of the iPhone. I'd like to help come up with something in-between the iPhone and AppleTV presets that is a little easier to manage, but my main concern was keeping as much video quality as possible while maintaining compatibility with all of my Apple devices.

CLI Equivalent (untested): -i <source> -o <destination> -U -F -m -e x264 -q .63 -8 weak -p -E aac+ac3 -B 160 -R 48 -D 1.51 -v -x cabac=0:ref=2:analyse=all:me=umh:subq=6:no-fast-pskip=1:trellis=1:mixed-refs=1:merange=32:level=30

GUI settings -

Format: MP4 File
Codec: AVC/H.264 Video/AAC + AC3 Audio
Insert iPod Atom: Checked (not really necessary)

Video -
Encoder: x264
Constant Quality: 63% (will bump up to 64-65% for select titles) <-- ensure CRF is still checked in preferences

Picture Settings -
Anamorphic: Strict (can use loose if you want)
Crop: Automatic
VFR: Enabled (thank you jbrjake... I have finally encoded Futurama to my liking after numerous attempts before!)
Denoise: Weak (usually set, but this is really a personal preference)

Audio + Subtitles -
Track 1: English AC3 5.1 (Track 1 Mix: DPL2 + AC3)
Bitrate: 160kbps (only affects AAC)
Sample Rate: 48khz
Dynamic Range Compression: 1.51 (only affects AAC, and is really a personal preference)
Subtitles: Autoselect (Forced Subtitles Only - Checked)
Chapters: Enabled

Advanced: cabac=0:ref=2:analyse=all:me=umh:subq=6:no-fast-pskip=1:trellis=1:mixed-refs=1:merange=32:level=30

For older television shows, I've stuck with using pretty much the same settings as above, except using an average bitrate of 1750kbps (Quicktime reports ~1500kbps final bitrate) and AAC audio only.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: Post Your "Best Settings" here and Why.

Post by nightstrm »

No. I worked with the devs on the final design of the Universal preset and I use it exclusively for all non-HD encodes (albeit with decomb+detelceine picture filters enabled). Advances/changes made by the x264 devs no longer encodes using CRF to have as high of values to return output distinguishable from encodes with the higher values on the older builds (with the added bonus of smaller files).

I figured this question would eventually come up, which is why I edited that post a couple days ago with the bold text at the top of it.
jweires
Posts: 6
Joined: Mon Nov 24, 2008 6:23 pm

Re: Post Your "Best Settings" here and Why.

Post by jweires »

Thanks Nightstrm...

I am finding that using the Universal setting is taking quite a while to encode... a 2 hour movie is taking 3.5 hours to encode.

Does this sound right? It doesn't seem like it took this long with the Apple TV or iPod Hi-Rez that I used to use...

I am using a mac mini 2 ghz with 2 gb of ram...
zonomorph
Posts: 5
Joined: Fri Nov 28, 2008 1:38 am

Re: Post Your "Best Settings" here and Why.

Post by zonomorph »

rhester wrote:Yes - merange is an encode-time issue but is not player-dependent. No compatibility issues.

Rodney
Is this also true of subq? Can that be set to 9 without breaking iPod compatibility? How many reference frames can be used while maintaining iPod compatibility? In general, what are the highest settings that an iPod Touch can handle, assuming encoding time is not an issue? Thanks in advance for the help.
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: Post Your "Best Settings" here and Why.

Post by rhester »

subq can be set as high as you like.

As for the remainder, take a look at http://forum.handbrake.fr/viewtopic.php?f=7&t=3859.

Rodney
zonomorph
Posts: 5
Joined: Fri Nov 28, 2008 1:38 am

Re: Post Your "Best Settings" here and Why.

Post by zonomorph »

Thanks, Rodney.
I had been to that page, but didn't notice the maximum ref. frames listed next to the maximum resolution.
From what I've been able to gather, the consensus on using 2-pass encoding for the ipod was that it's bad, because the ipod can't handle the wide bitrate fluctuations produced by 2-pass. Is it still recommended that 2-pass be left off for videos intended for ipods as of 0.9.3?
lone_tree
Regular User
Posts: 75
Joined: Mon May 05, 2008 10:23 pm

Re: Post Your "Best Settings" here and Why.

Post by lone_tree »

nightstrm wrote:No. I worked with the devs on the final design of the Universal preset and I use it exclusively for all non-HD encodes (albeit with decomb+detelceine picture filters enabled). Advances/changes made by the x264 devs no longer encodes using CRF to have as high of values to return output distinguishable from encodes with the higher values on the older builds (with the added bonus of smaller files).

I figured this question would eventually come up, which is why I edited that post a couple days ago with the bold text at the top of it.
I've been using the Universal preset now for all DVD encodes with Detelecine and Decomb turned on, but set CRF to 62%. I think on average I'm still getting smaller files than with the old ATV preset. Any disadvantage to using 62%? It seems that CRF has been tweaked significantly--I'm getting the same files sizes if not a little bigger at 62% that when I used 68% in the early stages of the SVN builds shortly after 0.9.2 was released. Any insight into the changes?

Any VBV options set? Or is 59-63% low enough (on average) to not worry about spikes?
Last edited by lone_tree on Fri Nov 28, 2008 7:15 pm, edited 1 time in total.
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: Post Your "Best Settings" here and Why.

Post by rhester »

zonomorph wrote:I had been to that page, but didn't notice the maximum ref. frames listed next to the maximum resolution.
From what I've been able to gather, the consensus on using 2-pass encoding for the ipod was that it's bad, because the ipod can't handle the wide bitrate fluctuations produced by 2-pass. Is it still recommended that 2-pass be left off for videos intended for ipods as of 0.9.3?
CRF is recommended for modern (read: beyond 5.5G) iPods. 5G/5.5G is better off with two-pass and VBV. The presets reflect this.

Rodney
tropic10
Posts: 24
Joined: Sat Nov 29, 2008 12:35 am

Re: Post Your "Best Settings" here and Why.

Post by tropic10 »

WHY:

Looking to transcode 1080p Bluray/HD-DVD sources for XBMC/Plex on a 1.83 GHz Mac Mini. The TV is a 40 inch Samsung 1080p LCD.

PRIORITIES:

1. Quality
2. Reduced file size
3. Encoding time

SETTINGS:

Constant Quality Rate preset with the following changed:

Anamorphic=none
ref=6
bframes=6
merange=32
no-fast-pskip=1
b-adapt=2

I'm looking for quality that's reasonably close to the source. The file size at 60% CQR still seems larger than it needs to be. The source is 16.5 GB and my rip will end up being around 14.7 GB when it's done (although I understand that the final size will vary a lot depending on the source). Any recommendations?
Last edited by tropic10 on Sat Nov 29, 2008 1:35 am, edited 1 time in total.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: Post Your "Best Settings" here and Why.

Post by jbrjake »

tropic10 wrote:I'm looking for quality that's reasonably close to the source. The file size at 60% CQR still seems larger than it needs to be.
I agree.

I probably overshot with the psy-trellis.

The psy-rd:1,1 bit can probably go to psy-rd:1,0.4 or even (says cvk_b) psy-rd:1,0.2 or lower.
tropic10
Posts: 24
Joined: Sat Nov 29, 2008 12:35 am

Re: Post Your "Best Settings" here and Why.

Post by tropic10 »

jbrjake wrote: I agree.

I probably overshot with the psy-trellis.

The psy-rd:1,1 bit can probably go to psy-rd:1,0.4 or even (says cvk_b) psy-rd:1,0.2 or lower.
Thanks. I'll retry the encode with psy-rd:1,0.2 and will report the results. Would you also recommend changing it to 1,0.4 or 1,0.2 for a DVD source?
jzietman
Regular User
Posts: 146
Joined: Mon Feb 04, 2008 3:29 pm

Re: Post Your "Best Settings" here and Why.

Post by jzietman »

The Constant Quality preset use 59% CRF, doesn't it? Isn't that pretty high for HD video? You might be getting unnecessarily large encodes. 14 gigs is quite a bit...
tropic10
Posts: 24
Joined: Sat Nov 29, 2008 12:35 am

Re: Post Your "Best Settings" here and Why.

Post by tropic10 »

The preset is 60% although that was probably meant for SD. The file size with psy-rd:1,0.2 will end up being around 11.7 GB for a two hour movie including the AC3 audio. I'll gladly try something lower than 59% for HD if that value is too high. I just don't want to sacrifice quality too much.
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Re: Post Your "Best Settings" here and Why.

Post by cvk_b »

tropic10 wrote:The preset is 60% although that was probably meant for SD. The file size with psy-rd:1,0.2 will end up being around 11.7 GB for a two hour movie including the AC3 audio. I'll gladly try something lower than 59% for HD if that value is too high. I just don't want to sacrifice quality too much.

What is your picture setting output size? err.. wait. Scratch that. This thread is not for troubleshooting— it's for people who've already got things nailed down. Start your own thread and be sure to post your log.
Wateroksnmud
Posts: 8
Joined: Wed Nov 26, 2008 6:13 am

Re: Post Your "Best Settings" here and Why.

Post by Wateroksnmud »

So my first time using HB,and trying to use Nightstrms settings, but I can not find this VFR check box. Is it still in the current build? Or am I just an idiot?
lone_tree
Regular User
Posts: 75
Joined: Mon May 05, 2008 10:23 pm

Re: Post Your "Best Settings" here and Why.

Post by lone_tree »

Wateroksnmud wrote:So my first time using HB,and trying to use Nightstrms settings, but I can not find this VFR check box. Is it still in the current build? Or am I just an idiot?
It's not in 0.9.3--you select detelecine and decomb and leave it that way. Again, probably not the thread for this, but that should help you.
Locked