Optimizing the Handbrake AppleTV Preset

Discussion in 'Apple TV and Home Theater' started by fivepoint, Aug 29, 2008.

  1. fivepoint macrumors 65816


    Sep 28, 2007
    Many of us use the AppleTV Preset in Handbrake to rip DVD content for viewing on our AppleTVs. While the value of this preset is amazing in its ability to keep everything simple and unconfusing... I (and many others) are wondering if there are any good suggestions for improving our image quality on standard DVD rips.

    If there are any Handbrake gurus out there... could you please run through some of the basics including adding double-pass, increasing the kbps, etc. as well as any more advanced things that might be useful.

    One specific question I have... what is the maximum kbps AppleTV can handle? How many kbps do most DVDs use? I'd assume that there is no benefit to setting Handbrake at 5000 kbps if the DVD source only has 3000 to begin with?

    Any clarification on this, would be most helpful! Thanks so much, guys!

    Also, everyone, since we're in the AppleTV forum, lets keep the conversation focused on ripping content for that only. No talk of iPod compatibility or iPhone compatibility. Lets just not go there.
  2. Chris Rogers macrumors 6502a

    Chris Rogers

    Jul 8, 2008
    my house
  3. dogtanian macrumors 6502


    Jun 26, 2007
    Bournemouth, UK
    Good post.

    I currently encode on Apple TV setting also and will generally do a 2 pass and sometimes up the bitrate to 3000 if i'm feeling fruity...

    Not sure of the real benefits of this though so will be looking out for what becomes of this thread :)
  4. bacaramac macrumors 65816


    Dec 29, 2007
  5. fivepoint thread starter macrumors 65816


    Sep 28, 2007
    I'm going to be sure to check out that link... but before I do, I just want to say that my experience with the HB forums has not been good. Unlike here, people are generally UNWILLING to help out, and easily frustrated when you don't know as much jargon as they do... even though that is one of the main points of a forum, to help those less informed and to share ideas.

    I will most likely never ask a question in that forum again, because of the negative responses and needless hostility I've encountered there.

    That being said, thanks for the link! Seriously.
  6. paol macrumors member

    Jun 7, 2008
    I am happy to see a discussion here at this friendly forum :)

    I don't have much experience with transcoding DVD yet, I have been focused on transcoding HD lately.

    I think HB:s AppleTV preset is a very good compromise. Depending on your preference you can get better quality and/or lower filesize but at a greatly reduced encoding speed.

    With my testing of HD-sources I have found that the ATV easily can handle 10 000 kb/s or more. Peaks of 20 000 kb/s seems ok too :eek: And that is streaming over an .n network (TimeCapsule). That high bitrate is unnecessary with DVD since they are max 10 000 kb/s with mpeg2 which is a lot less inefficient than h.264.

    For all my encodes I use CRF. That means that a lower quality is used when the video is low detail or fast moving, and a higher quality on slow moving, high detail scenes. I am very pleased with the results. But you risk having scenes with a higher bitrate than the ATV can handle. But I think there is very little chance of that happening on a DVD-source.

    You can get smaller filesizes by turning on CABAC on the advanced pane. I usually save a little less than 10 %. However, CABAC will lower the bitrate the ATV can handle a LOT. I never use it for HD-sources, but you can get away with it for DVD:s if you limit the peak bitrate.
  7. dynaflash macrumors 68020

    Mar 27, 2003
    Actually its the opposite. With crf you get the same quality regardless of the scenes/source. However the bitrate will vary to maintain that quality level. Hence the unpredictable bitrate from source to source.

    Without going into alot of semantics here is what I tend to use on all of my SD DVD sources.

    Constant Quality (the macgui defaults to crf so don't worry about that)

    0.9.2: 70%
    Dev snapshots (due to vaq): 68%

    Loose Anamorphic (used to mostly use Strict)

    x264 Advanced Options String (this is actually where all of the cool stuff is):


    Note: If you want to speed it up a touch. Remove trellis. Also note: this uses cabac. which gets you in my testing about a 20% drop in file size and hence bitrate, but is *not* officially supported by apple. If you want to remove cabac add "cabac=0" to the end of the string.

    Or, in the macgui if you paste this string in then uncheck the cabac widget it will insert it for you.

    Word of warning: Beware super grainy/noisy sources like mid 80's live concert footage, crf will give you pretty high bitrates with those.

    You will find that reencodes of some of your favorites movies may actually come out at a lower bitrate than the atv's 2500 and look quite a bit better. Otoh, some may come out higher.

    I am very familiar with my sources and pretty much know what to expect. YMMV.

    Also, if you try it on HD sources (like from an eyetv) back the percentage down into the 60% range.

    As far as the hows and why's ? I would leave that to the HB forums. ;)
  8. paol macrumors member

    Jun 7, 2008
    That makes sense. Thanks for the clarification :eek:

    I know that you usually don't stream, instead keep everything on your gigantic HD :D But do you know if the ATV can handle that while streaming and CABAC on for a SD source? Because it definitely can't with a HD source (for HD without CABAC maxrate=12000:vbv-bufsize=9000 seems to be working fine). I haven't done much testing of the limits for SD material.

    On the HD sources I tried, CABAC saved approx 8 %. I must try with SD, 20 % is quite significant.

    This is what I usually use:

    With these settings the encode will progress at around 6-8 fps instead of over 30 with the AppleTV preset.

    A simple explanation of settings:
    B-frame: The more you have, the smaller the file. x264 will determine how many b-frames it will use up to the max you specify, it will seldom use more than 4, so 3-6 are good values that the ATV can handle.

    Reference frames: More = higher quality, don't know how it affects filesize but I think it will remain the same. Higher value = slower encode. There is a limit to how many the ATV can handle I think.

    Mixed Reference frames (mixed-refs): Better compresion = smaller file size. Takes longer to encode.

    Sub-pixel motion estimation (sub-q): Higher value increase quality and encoding time. A value of 6 or 7 enables x264 to do other cool things like:

    B-frame rate distortion (brdo): Higher quality at the cost of longer encoding time.

    no-fast-pskip: Reduces chance of blocking in solid colors, as usual it increases encoding time ;)

    If you use CABAC, you can enable Trellis which makes a more informed decision on which details to keep.

    I am no encoding or video expert, this is just what I have learned across the net. I hope I got everything right :cool:

    I use CRF @60-64%. If you use ABR instead, turning on the two-pass option you allow Handbrake to vary the bitrate more since it knows the complexity of the scenes beforehand. This will increase quality and encoding time, file size is not affected.

    I can see a clear difference between for example CRF 60% and CRF 64% on the computer, using still frames. But on my 50" plasma, I can't so I have begun to use 60-62% more.
  9. ddoonie macrumors regular

    Jun 4, 2008
    Thank you for those tips!

    I have been trying to optimize my encodes for the past week or so, with hundreds of test encodes etc... NOw they all look the same to me :) How do you test them on your computer, i've been using quicktime, playing all samples simultaneously, and command+` them...

    I'm not an owner of an ATV yet, but i still do stream my movies...

    These are the settings i have settled on so far, trying to keep my encodes to no more than around 2GB with max quality...

    Can anyone tell me if they see a problem? ps, i'm using the matrix from http://forum.doom9.org/showthread.php?p=887125#post887125

    CRF 64%, Denoise weak, detelecine yes, deblock yes, decomb default


Share This Page