Handbrake settings for ATV3 (CLI)

Discussion in 'Apple TV and Home Theater' started by HackerJL, Apr 5, 2012.

  1. HackerJL, Apr 5, 2012
    Last edited: Apr 6, 2012

    macrumors regular

    Joined:
    Sep 19, 2009
    #1
    I have been scouring the net trying to get the answer to my situation.

    I have a ton of blurays that I converted to mkv over the last 6-8 months. in 1080P. I then converted them with mac.jedi's handbrake automation system (http://forums.macrumors.com/showthread.php?t=805573) to Appletv2. I kept the MKV's since I knew I would end up throwing the 720p version out and keeping the 1080p when the v.3 or whatever comes out.

    So now I see there is no preset for the appletv3, handbrake forums state that you are to use the High Profile setting up to 1080p. Others say they just increase the ATV2 settings up to 1080p.

    Now, what I found is that the handbrake gui, I need to go into picture settings, change anamorphic to custom, and then increase the height to 1080, while keeping aspect ratio. Making sure large file size is checked and away we go. Is that right?

    Moreso to the point. If it is right, how do I adapt that into CLI. The handbrake presets are currently set to (as per https://trac.handbrake.fr/wiki/BuiltInPresets#highprofile)
    Code:
     ./HandBrakeCLI -i DVD -o ~/Movies/movie.mp4  -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 --detelecine --decomb --loose-anamorphic -m -x b-adapt=2:rc-lookahead=50
    Is it as simple as adding (in bold):

    Code:
     ./HandBrakeCLI -i DVD -o ~/Movies/movie.mp4  -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 --detelecine --decomb [B]--maxHeight <1080> --maxWidth <1920> --custom-anamorphic  --keep-display-aspect[/B] -m -x b-adapt=2:rc-lookahead=50
    Or I could add that to the appletv2 preset? Any input is appreciated!
     
  2. roidy, Apr 5, 2012
    Last edited: Apr 5, 2012

    macrumors 6502a

    Joined:
    Dec 30, 2008
    Location:
    Nottingham, UK
    #2
    Firstly, if your sources are blu-ray then you don't need the --detelecine or --decomb settings.

    Apart from that all you should really need is --strict-anamorphic or -w 1920 --loose-anamorphic, no need to set --maxHeight or --maxWidth

    Just a note, if you did ever need to use --maxHeight or --maxWidth then the correct format is --maxHeight 1080 --maxWidth 1920. You don't need the < > brackets.
     
  3. thread starter macrumors regular

    Joined:
    Sep 19, 2009
    #3
    Thanks for the reply.

    Any harm in leaving detelecine and decomb? Extra time is not my concern.

    Which is better. Strict or loose?

    What's the harm in forcing the max height and width?

    Many thanks again
     
  4. macrumors 6502a

    Joined:
    Dec 30, 2008
    Location:
    Nottingham, UK
    #4
    I know decomb wont harm anything, not sure about detelecine, I wouldn't use it.

    Shouldn't make any difference, but just check my original post, I edited it, if you use loose you need to set the width.

    -w 1920 --loose-anamorphic

    No idea:confused: Probably wont harm anything, but it shouldn't really be needed. If you do use it make sure not to include the < > :D
     
  5. macrumors regular

    Joined:
    Jan 8, 2007
    Location:
    West Bend, WI
    #5
    If you have 1080p mkv files why not just remux them to mp4 (m4v) files? It will only take a few minutes per file.
     
  6. thread starter macrumors regular

    Joined:
    Sep 19, 2009
    #6
    I understand that only works if you have a certain audio codec etc. Doesnt work for them all.
     
  7. macrumors 6502

    obsidian1200

    Joined:
    Jun 19, 2010
    Location:
    Albuquerque, NM
    #7
    I think you meant certain video codec(?), since you can convert the audio without touching the video.
     
  8. thread starter macrumors regular

    Joined:
    Sep 19, 2009
    #8
    Okay, I ended up using custom-anamorphic, and set the width and height. In itunes it shows up as video dimensions of 2529x1072. Is it since I used the 'keep aspect ratio' option? What gives?
     
  9. macrumors 68020

    Joined:
    Mar 15, 2012
    #9
    Didn't Roidy say to just set the width to 1920? Height will be dictated by the various movie aspect ratios and is variable.
     
  10. thread starter macrumors regular

    Joined:
    Sep 19, 2009
    #10
    If I just set the width (with loose-anamorphic), my video gets converted to 1925X816. Thats enough to be 720, not even close to 1080. I could just stick to my appletv2 presets if I wanted that.

    If I set both the width and the height (1920x1080) my video comes out 1920x1072. Why doesnt it come out 1080 or higher (like 1920 coming out at 1925)
     
  11. macrumors 68020

    Joined:
    Mar 15, 2012
    #11
    Movies have all different heights, some are the full 1080, some have a black area top and bottom as they are displayed in a more theatrical format. It depends on the movie. So even if the output is 1080 in height, the black top and bottom is automatically cut off by Handbrake as a way to minimize file size. Do you really want all those Mb just saying "be black". :) That's where the 816 is coming from, it's trimmed it down. So you define the width 1920 and let the particular movie format dictate the height.

    I'm curious why you don't use High Profile Anamorphic strict for an aTV 3 as has been suggested by Handbrake officionado's on the forum?
     
  12. macrumors 6502a

    Joined:
    Dec 30, 2008
    Location:
    Nottingham, UK
    #12
    Post the exact command line you used, because if you set the width to 1920 you should never get an encode thats bigger.

    You shouldn't set the height as it's dependent on the aspect ratio of the source and how much you're cropping off the top and bottom for the black bars.

    For instance if your source is 1920x1080 but has black bars top and bottom that are say 100 pixels high then the output file should, after cropping be, 1920x880.

    If you crop those 100 pixels top and bottom and set both a width and height value all you do is stretch the encoded video vertically.
     
  13. thread starter macrumors regular

    Joined:
    Sep 19, 2009
    #13
    Ah...that answers ALL my questions. Didnt know they did such a thing for the black, now it all makes sense. Thank you!
     
  14. thread starter macrumors regular

    Joined:
    Sep 19, 2009
    #14
    Ya..this makes a ton more sense now that I know Handbrake cuts the black off...

    on to the strict setting. Where did you find that? I only found this:
    https://forum.handbrake.fr/viewtopic.php?f=7&t=23648

    No mention of strict. The highprofile preset uses loose by default.
     
  15. macrumors 68020

    Joined:
    Mar 15, 2012
    #15
    Dynaflash is the Handbrake guru around here...his words are wisdom;).

    Post is #350 in the "1080p Handbrake settings for new Apple TV?" in this forum.

    Per Dynaflash:
    "And like I said over there - releasing a preset...even if it's the same as High Profile but calling it AppleTV3 would stop all these questions
    Easy ....

    1. Choose High Profile
    2. Turn off Detelecine
    3. Set to Strict Anamorphic in Picture settings
    4. Hit the "+" Button in the Presets Drawer
    5. Type "AppleTV 3" for a Preset Name
    6. Set Use Picture Size: Source Maximum
    7. Check "Use Picture Filters"
    8. Click Add.

    ... at least until hb releases an atv3 preset. Which will pretty much be this barring a couple minor changes at most."
     
  16. thread starter macrumors regular

    Joined:
    Sep 19, 2009
    #16
    Okay, thanks. I am starting to agree its stupid that there isnt a new preset for atv3. Thanks for the help.

    If anyone is interested, this is the code I am using now:
    Code:
    --large-file -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 --decomb --width 1920 --strict-anamorphic -m -x b-adapt=2:rc-lookahead=50
     
  17. macrumors 68020

    Joined:
    Mar 27, 2003
    #17
    Well, its not really "stupid" ... its just that we released hb 0.9.6 before the atv 3 came out. Therefore there was no way to prepare a preset for it in time and we do not hold back releases of Handbrake for a device announcement.

    It will be in the next release or probably shortly in the nightlies.

    The post I made referenced above was obviously for the macgui and run in testing by me on my atv 3 which I got *after* we released 0.9.6. We presume if you are using the cli your capabilities are way above average in terms of command line options etc. so that you can suss out on your own what you need to do to get what you want.
     
  18. thread starter macrumors regular

    Joined:
    Sep 19, 2009
    #18
    Sorry, 'stupid' was not meant to be mean. I thought handbrake did their preset updates separately of the program. I obviously shouldnt assume anything.

    So my command looks good?
     
  19. macrumors 68020

    Joined:
    Mar 27, 2003
    #19
    No Problem.

    No though we are talking about that very thing right now. That said preset updates would be trivial for the HB Gui's since they read a xml plist. Much like you can now import and export presets from the Gui's, however that would not help you with the CLI since it has to be hardcoded in. The CLI doesn't read a plist.

    Not sure tbh as I *never* use the cli . Does it do what you want ? If so its good.
     
  20. macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy part of the Pacific NW
    #20
    Just a note to add to this older thread, in case other people find it via Google -

    The Handbrake nightlies now have an ATV 3 preset.
     
  21. macrumors 6502

    LevMac

    Joined:
    Feb 23, 2008
    Location:
    QLD, Australia
    #21
    Can you explain to me how to download handbrake with the apple tv 3 settings please? I've been looking everywhere but no one explains how to get it
     
  22. macrumors 68020

    Joined:
    May 27, 2008
    #22
    the item you quoted, says "The Handbrake nightlies".
    if you type "handbrake nightlies" into google, it's the first link that comes up.
     
  23. macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy part of the Pacific NW
    #23
    Yeah, what waw74 said - exactly.

    Or just click here and then grab the "Mac" nightly.

    Usually the nightly releases are very stable, but occasionally one might be problematic. If you have trouble with one of the nightly releases, wait a couple days and grab a new nightly release.
     
  24. thread starter macrumors regular

    Joined:
    Sep 19, 2009
    #24
    Correction. The new version out within the last few hours (stable) has appletv3 in it. Both CLI and GUI. :)
     
  25. macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy part of the Pacific NW
    #25
    Yeah my last nightly (from roughly a week ago IIRC) just announced 0.9.8 was available and updated itself to the stable version. :D

    I haven't used the CLI in a couple years since the GUI works very well. Now I just click on the ATV3 preset, adjust the CQ slider a tad and let it go (okay, I did save that as a new preset).
     

Share This Page