Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Handbrake. Ideal Settings?

Handbrake. Ideal Settings?
Thread Tools
erickp
Fresh-Faced Recruit
Join Date: Apr 2008
Status: Offline
Reply With Quote
Oct 29, 2009, 02:02 PM
 
Hello,

I'm trying to create the best possible file, short of DVD Rip. Although the files I get are pretty good. I do get some files where the audio seems off and the video looks a tad bit grainy. Not sure if it's ME or something I can adjust in Handbrake. Any help or suggestion would be appreciated. Below are the settings that I usually use.

Handbrake OUTPUT SETTINGS:

VIDEO:
Format: MKV
Video Codec: H.264 (x264)
Framerate (FPS): Same as source
Constant quality: 64%
Denoise: OFF
Detelecine: YES
Dinterlace: OFF
Deblock: OFF
Decomb: 1:2:6:9:80:16:16

AUDIO & SUBTITLES:
Source: English (AC3) (5.1 ch)
Audio Codec: AAC (faac)
Mixdown: Dolby Surround
Samplerate: 48 Khz
Bitrate: 128
DRC: 1.00

ADVANCED:
Reference Frames: 6
Mixed References: ON
B-Frames: 3
Direct Prediction: Default (spatial)
Weigted B-Frames: ON
Pyramidal B-Frames: ON
Motion Estimation Method: Uneven Multi-Hexagon
Motion Estimation Range: Default (16)
Subpixel Motion Estimation: 9
Analysis: ALL / 8x8 DCT: ON
Deblocking: 0 - 0
Trellis: 2
No fast-P-Skip: ON
No DCT-Decimate: OFF
CABAC Entropy Coding: ON


Thank you!
~e
     
cgc
Professional Poster
Join Date: Mar 2003
Location: Down by the river
Status: Offline
Reply With Quote
Oct 29, 2009, 07:57 PM
 
I use 1800Kbps h.264 w/ AAC and fast de-interlace for most of my encode/transcodes.
( Last edited by cgc; Oct 30, 2009 at 07:59 PM. )
     
64stang06
Mac Elite
Join Date: Aug 2007
Status: Offline
Reply With Quote
Oct 30, 2009, 11:19 AM
 
I've been importing videos using the Apple TV setting, and haven't notice any issues with it.
MacBook Pro 13" 2.8GHz Core i7/8GB RAM/750GB Hard Drive - Mac OS X 10.7.3
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Nov 3, 2009, 09:49 PM
 
"best possible file [short of an exact copy]" is not meaningful. What are your bitrate/complexity/encode time/playback device constraints?
     
phildenegri
Fresh-Faced Recruit
Join Date: Dec 2009
Status: Offline
Reply With Quote
Dec 1, 2009, 01:15 PM
 
i am new to this and am trying to find a way to take dvd's encode them to put on a ipd 5th gen then connect it to my flatscreen. i need the best settings that will allow me to put the movie on the ipod and keep quality?????
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Dec 1, 2009, 02:56 PM
 
Use the iPod preset in Handbrake. It's not going to look good on a big TV, but it's the best the iPod can do.
     
phildenegri
Fresh-Faced Recruit
Join Date: Dec 2009
Status: Offline
Reply With Quote
Dec 1, 2009, 04:00 PM
 
so i can't put a higher quality level on the ipod? size doesn't really matter. i guess the ipod can't play at a higher level? i am going to take a chapter and using all the presets in the latest version 0.9.4 i386 and see what i can transfer onto the ipod. what do you suggest for taking a dvd video_ts folder and encoding it so that i can play it on my macbook which i hook up to my flat screen through the dvi port and i still want dvd quality, thanks
     
Eug
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Dec 1, 2009, 05:32 PM
 
For my iPhone from a DVD source, with the previous version of Handbrake (which is 0.9.3):

Video
- Encoder: x264
- Framerate: Same as source
- Average bitrate: 2500 Kbps
- Codecs: AVC / H.264 Video / AAC Audio
- 2-pass with turbo 1st pass

Picture Settings
- Anamorphic: Strict (or None if it's a non-anamorphic title)
- Resolution: Original
- Crop: Automatic or Custom
- VFR: Disabled (as a default because it can cause bad encodes with rare titles, but will turn it on whenever possible)
- Detelecine: Yes (if necessary)
- Deinterlace: Off most of the time. Sometimes on with the Slower setting.
- Denoise: Off (except when it's a really bad source, where I set it to Medium)
- Deblock: Off

Audio + Subtitles
- Track 1: DPL2 + AC3 (or just stereo if it's a stereo source)
- Samplerate (khz): 48
- Bitrate (kbps): 160
- Dynamic range compression: None
- Subtitles: As desired

2500 Kbps works fine on the iPhone, and on a TV, it looks a heluvalot better than 1500 Kbps or whatever.

I haven't played around with Handbrake 0.9.4 enough to know if all the above is appropriate.

P.S. That's one of the reasons I sold my iPod 5G. Another reason is the screen is too small for video for my tastes.
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Dec 1, 2009, 05:36 PM
 
Even if iTunes allows it the iPod may not be able to keep up. You can't do much better on for quality than the iPod preset and have it play well on the iPod.

Try the Normal and High presets in Handbrake. They'll both play on your MacBook, it's just a quality vs size trade.

Originally Posted by Eug View Post
For my iPhone from a DVD source, with the previous version of Handbrake (which is 0.9.3):

Video
- Encoder: x264
- Framerate: Same as source
- Average bitrate: 2500 Kbps
- Codecs: AVC / H.264 Video / AAC Audio
- 2-pass with turbo 1st pass

[snip]

2500 Kbps works fine on the iPhone, and on a TV, it looks a heluvalot better than 1500 Kbps or whatever.

I haven't played around with Handbrake 0.9.4 enough to know if all the above is appropriate.
The iPhone has a much more capable video decoding chip than the 5th gen iPod. This will not work.

Use the presets. They've changed a bit in 0.9.4; they're very well thought out and tested.

Also 2-pass is a waste of time at 2500kbps with SD content.
     
phildenegri
Fresh-Faced Recruit
Join Date: Dec 2009
Status: Offline
Reply With Quote
Dec 1, 2009, 06:56 PM
 
i used the ipod legacy setting and it came out pretty good using my ipod to play on my flat screen. what settings do i need to make the quality better for my macbook?
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Dec 1, 2009, 09:25 PM
 
Originally Posted by phildenegri View Post
i used the ipod legacy setting and it came out pretty good using my ipod to play on my flat screen.
Why use legacy instead of the newer iPod setting?

Originally Posted by phildenegri View Post
what settings do i need to make the quality better for my macbook?
"Try the Normal and High presets in Handbrake. They'll both play on your MacBook, it's just a quality vs size trade."
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Dec 1, 2009, 09:38 PM
 
On a side note:

Wouldn't it be great if you could have two versions of a rip in iTunes (let's say ATV and iPod), but it would show up only as ONE. When you sync it with the iPod, it will only sync the lower quality / bitrate version, when you watch it with the ATV, it'll grab the higher quality version.

*dream*

-t
     
Eug
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Dec 1, 2009, 10:09 PM
 
Originally Posted by mduell View Post
The iPhone has a much more capable video decoding chip than the 5th gen iPod. This will not work.
That's why I sold my 5G iPod. It has a tiny screen, and it just isn't powerful enough to display better quality material. In other words, stuff encoded for the 5G is useful just for the 5G (or maybe an iPhone). I really didn't want to have two copies of everything.

Use the presets. They've changed a bit in 0.9.4; they're very well thought out and tested.
I'll give them a shot, but the presets in previous versions have always been way lower quality than I'm comfortable with.

Also 2-pass is a waste of time at 2500kbps with SD content.
No it isn't, if you ever plan on watching it on a larger screen. Granted, the difference between 2-pass and 1-pass is usually minor at this bitrate, but it still does make a difference at times... though only on larger screens. Luckily I have a Core i7.

Originally Posted by turtle777 View Post
Wouldn't it be great if you could have two versions of a rip in iTunes (let's say ATV and iPod), but it would show up only as ONE. When you sync it with the iPod, it will only sync the lower quality / bitrate version, when you watch it with the ATV, it'll grab the higher quality version.

*dream*
See above. I bought a 16 GB iPhone to compensate for the increased usage of storage space. This way I have just ONE version of a rip in iTunes that looks half decent on a TV, with AppleTV if desired, and works on the iPhone too.
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Dec 1, 2009, 11:26 PM
 
Originally Posted by turtle777 View Post
Wouldn't it be great if you could have two versions of a rip in iTunes (let's say ATV and iPod), but it would show up only as ONE. When you sync it with the iPod, it will only sync the lower quality / bitrate version, when you watch it with the ATV, it'll grab the higher quality version.
Yea, it's too bad that's reserved for iTMS. I could even see wanting three, one at high quality (1080p, high complexity), one for AppleTV (720p, within the other ATV limitations), and one for your mobile device.
     
phildenegri
Fresh-Faced Recruit
Join Date: Dec 2009
Status: Offline
Reply With Quote
Dec 2, 2009, 09:52 AM
 
im just looking to find out how i can raise the quality is it by ave bit rate and what # is good or by sliding the constant quality to 100?
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Dec 2, 2009, 01:38 PM
 
Originally Posted by phildenegri View Post
im just looking to find out how i can raise the quality is it by ave bit rate and what # is good or by sliding the constant quality to 100?
There's no magic number that everyone thinks is good.
Try the High preset. If that's not good enough, raise the quality a few percent and try again. Sliding it to 100 will result in massive file sizes (probably 10x the size of the source), so that's a bad idea.
     
Eug
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Dec 8, 2009, 01:43 AM
 
So, I just installed the iTunes version of Star Trek, from the Star Trek Blu-ray package.

It is 2052 Kbps H.264, at 853x352.

The quality is reasonable, although it could always be better. It is a little better than what I get from my own 2500 Kbps 2-pass encodes from a DVD source though.

I guess this means though it wouldn't work on a 5G iPod then. So, is the 5G iPod orphaned?
( Last edited by Eug; Dec 8, 2009 at 02:05 AM. )
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Dec 9, 2009, 12:15 AM
 
They've got better source material than you do.

Have you tried the new (0.9.4) quality based presets? Even cranked up to 65% I doubt they'll hit 2000kbps average with most material.
     
Eug
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Dec 9, 2009, 01:35 AM
 
Actually I now also have an excellent source, a Blu-ray rip to 1920x800. My initial 848x352 non-anamorphic 2.5 Mbps transcode attempt looked somewhat better than the commercial iTunes one I got out of my Star Trek Blu-ray package, at least in some areas.

However, it didn't work on my iPhone. I can't remember if I turned off CABAC and B-frames or not, and I forgot to encode to m4v instead of mp4. Trying again now.

I haven't yet tried the constant quality settings. BTW, I'd like to find out what the RF numbers mean exactly. Any links? One of the issues I had with constant quality in previous iterations (from a few years ago) was that different material had vastly different bitrates at the same constant quality settings, so sometimes I'd have to reencode the same source material to get the desired file sizes and bitrates. Has that changed?
     
SpaceMonkey
Addicted to MacNN
Join Date: Oct 2002
Location: Washington, DC
Status: Offline
Reply With Quote
Dec 9, 2009, 10:31 AM
 
Originally Posted by Eug View Post
One of the issues I had with constant quality in previous iterations (from a few years ago) was that different material had vastly different bitrates at the same constant quality settings, so sometimes I'd have to reencode the same source material to get the desired file sizes and bitrates. Has that changed?
I doubt it. Wouldn't it defeat the entire point? If you have a desired file size or bit rate, then those are the parameters you should encode by, not constant quality. It's like using the "V" quality scales in LAME MP3 versus a constant or average bitrate MP3 encode.

"One ticket to Washington, please. I have a date with destiny."
     
Eug
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Dec 9, 2009, 01:13 PM
 
I know what you mean, but the file size differences were huge. So guess what I'm saying is it'd be nice to have sort of a constricted range in which "constant" quality could operate. This would help not only for reigning file sizes, but also would reign in bit-rate spikes.

In any case, for some reason two repeated re-encodes have failed to work on the iPhone with my usual settings. I could encode files at 853xXXX and even up to 3000 Kbps total bitrate, using 0.9.2 and 0.9.3. iTunes would allow me to import them, and they'd work fine on the iPhone 3G. Now, with similar settings, I have 2600 Kbps m4v files that iTunes will import but refuses to sync, saying that the iPhone doesn't support them. I believe the files were 848x352 at 2663 Kbps, with both B-frames and CABAC off. The advanced flags are the same ones used for the universal and iPhone presets. In fact, I just used the universal preset, and then increased the video bitrate using the average bitrate setting. (The stock universal preset in 0.9.4 is supposed to work fine on the iPhone.) I kept the audio bitrate the same at 160. (For the iPhone preset it's 128, but 160 is supported.)

I guess I'll try again with lower bitrates (as officially it's supposed to be up to only 2500 Kbps for the video IIRC), but like I said, even 2800-3000 Kbps files (including 160 Kbps audio) from 0.9.2 and 0.9.3 worked and still continue to work now. My 0.9.4 encodes at 2663 would be just a smidge over 2500 video, with roughly 160 Kbps audio.
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Dec 9, 2009, 02:48 PM
 
Originally Posted by Eug View Post
I haven't yet tried the constant quality settings. BTW, I'd like to find out what the RF numbers mean exactly. Any links? One of the issues I had with constant quality in previous iterations (from a few years ago) was that different material had vastly different bitrates at the same constant quality settings, so sometimes I'd have to reencode the same source material to get the desired file sizes and bitrates. Has that changed?
Rate factor determines how accurately the output frame represents the input frame, using a quality metric. The rule of thumb is 6 points on rate factor (12%) will double or halve the output size.
Wikipedia has some background info.

Here's what one of the x264 developers mentioned in IRC the other day:
[20:25] [Dark_Shikari] jbrjake: ratecontrol in x264 has a bunch of visual quality optimizations beyond the basic "constant quantizer" native to old stuff like xvid. But all of these are *offsets*: +s and -s on top of some core quality value.
[20:26] [Dark_Shikari] so while x264 works hard to make quality more visually consistent than with good old constant quantizer mode
[20:26] [Dark_Shikari] it still needs some baseline to work off of
[20:26] [Dark_Shikari] and that's the CRF value.
[20:31] [Dark_Shikari] the quantizer determines the accuracy to which image data is stored.
[20:31] [Dark_Shikari] The way that it does this is rather complicated, but it's simple enough to say that raising the quantizer by 6 lowers the precision by a factor of 2.
[20:32] [Dark_Shikari] So, the easiest way to set quality would just be a constant quantizer across the video.
[20:32] [Dark_Shikari] x264, however, has a wide range of visual optimizations that perfor much better than just blindly applying the same quant everywhere.
[20:32] [Dark_Shikari] But x264 still needs some base quantizer to work off when applying these optimizations.
[20:32] [Dark_Shikari] and CRF lets you pick that.
Originally Posted by Eug View Post
I know what you mean, but the file size differences were huge. So guess what I'm saying is it'd be nice to have sort of a constricted range in which "constant" quality could operate. This would help not only for reigning file sizes, but also would reign in bit-rate spikes.
Bitrate spikes should be handled by the advanced options level, vbv-maxrate, and vbv-bufsize to whatever your device can handle. If filesize comes out unacceptably large, you can drop the RF a few points and encode again on that zippy i7.

Originally Posted by Eug View Post
In any case, for some reason two repeated re-encodes have failed to work on the iPhone with my usual settings. I could encode files at 853xXXX and even up to 3000 Kbps total bitrate, using 0.9.2 and 0.9.3. iTunes would allow me to import them, and they'd work fine on the iPhone 3G. Now, with similar settings, I have 2600 Kbps m4v files that iTunes will import but refuses to sync, saying that the iPhone doesn't support them. I believe the files were 848x352 at 2663 Kbps, with both B-frames and CABAC off. The advanced flags are the same ones used for the universal and iPhone presets. In fact, I just used the universal preset, and then increased the video bitrate using the average bitrate setting. (The stock universal preset in 0.9.4 is supposed to work fine on the iPhone.) I kept the audio bitrate the same at 160. (For the iPhone preset it's 128, but 160 is supported.)

I guess I'll try again with lower bitrates (as officially it's supposed to be up to only 2500 Kbps for the video IIRC), but like I said, even 2800-3000 Kbps files (including 160 Kbps audio) from 0.9.2 and 0.9.3 worked and still continue to work now. My 0.9.4 encodes at 2663 would be just a smidge over 2500 video, with roughly 160 Kbps audio.
I think you're hitting a resolution/framerate limitation rather than a bitrate limitation. iTunes allows syncing content to iPhones if it's equal to or less than ~10.4 Mpixels/second (720 x 576 at up to 25 fps or 720 x 480 at up to 30 fps). Except for use on other devices, there's no point putting files larger than 480 wide on the iPhone.

For a baseline try the 0.9.4 iPhone preset. If it works but the quality isn't high enough, twiddle the rate factor to get the quality you want. At 480 width you probably won't get unplayable spikes unless you do something crazy with RF (like 90%).
( Last edited by reader50; Dec 9, 2009 at 05:22 PM. Reason: changed code to quote to kill the horizontal slider)
     
chabig
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status: Offline
Reply With Quote
Jan 1, 2010, 01:10 PM
 
What about the new "Universal" preset. I've tried it and it seems to be OK.
     
cgc
Professional Poster
Join Date: Mar 2003
Location: Down by the river
Status: Offline
Reply With Quote
Jan 1, 2010, 02:00 PM
 
A constant quality >70% isn't going to provide much improvement in quality. I've ripped excerpts of movies at various constant qualities from 50% to 100% in increments of 5% and really can't see any improvement over 70%. I reverted to 65% to keep an hour movie (exercise video) at ~ 1.5GB.
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Jan 1, 2010, 03:32 PM
 
Originally Posted by chabig View Post
What about the new "Universal" preset. I've tried it and it seems to be OK.
The upside of Apple Universal is it works on just about everything. The downside is the output is larger than an device optimized version.

My rule of thumb for typical DVD movies: iPhone preset will be slightly (tens of percent) faster to encode and half the size of Universal preset, but also lacking an AC3 track which accounts for nearly half the difference. High Profile preset will be slightly (tens of percent) slower to encode and 95% the size of Universal preset although with very slightly higher objective quality.

Originally Posted by cgc View Post
A constant quality >70% isn't going to provide much improvement in quality. I've ripped excerpts of movies at various constant qualities from 50% to 100% in increments of 5% and really can't see any improvement over 70%. I reverted to 65% to keep an hour movie (exercise video) at ~ 1.5GB.
This is in line with most observations. With better sources (BR, etc) you can generally drop another 5% which saves about 25% on file size.

That actually sounds quite large for a DVD rip, at 1.5GB/hr or 3500kbps. But I guess it would be high motion since it is exercise.
( Last edited by mduell; Jan 1, 2010 at 03:48 PM. )
     
cgc
Professional Poster
Join Date: Mar 2003
Location: Down by the river
Status: Offline
Reply With Quote
Jan 1, 2010, 06:11 PM
 
Originally Posted by mduell View Post
This is in line with most observations. With better sources (BR, etc) you can generally drop another 5% which saves about 25% on file size.

That actually sounds quite large for a DVD rip, at 1.5GB/hr or 3500kbps. But I guess it would be high motion since it is exercise.
The motion is accounted for by setting Interlace to Fast. I could probably drop the bitrate Constant Quality down to 60% but I think the reason I kept it at 70% was that the file size didn't shrink much and I was getting tired of playing with HandBrake (I've been doing a lot of transcoding to get my videos onto a G4 Mac at a quality level low enough so they didn't skip then I transcoded a bunch of videos to play on my DLNA TV which took a lot of trial and error, and finally I transcoded my P90X videos to put on my wife's laptop for my upcoming PCS). Had my fill with HB though it's a great app. Saw you in the HB forums as well...I'm "craigminah").
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Jan 1, 2010, 06:16 PM
 
Originally Posted by cgc View Post
The motion is accounted for by setting Interlace to Fast. I could probably drop the bitrate Constant Quality down to 60% but I think the reason I kept it at 70% was that the file size didn't shrink much and I was getting tired of playing with HandBrake
I know you're tired of playing around with it but fast deinterlace mostly sucks, try decomb instead. Or if that doesn't work well, try slow deinterlace. This may actually be contributing to higher bitrates/lower quality.

After you decide between decomb and slow deinterlace, retry the RF 20 / RF 16 comparison.
     
cgc
Professional Poster
Join Date: Mar 2003
Location: Down by the river
Status: Offline
Reply With Quote
Jan 1, 2010, 06:34 PM
 
Thanks for the tip...
     
tooki
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status: Offline
Reply With Quote
Jan 10, 2010, 09:40 AM
 
Originally Posted by Eug View Post
...
Picture Settings
- Anamorphic: Strict (or None if it's a non-anamorphic title)
...
All DVDs are anamorphic. 4:3 titles are compressed horizontally on playback, 16:9 titles are stretched horizontally. The native DVD format uses 720x480 (for NTSC) non-square pixels.

Using anamorphic mode in HandBrake simply allows the playback device to scale to its screen optimally, as opposed to picking it in advance, where you might achieve a smaller file, but at the cost of flexibility if you have a playback device with a different aspect ratio.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:01 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,