1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

H264 (FFmpeg) Handbrake

Discussion in 'Apple TV and Home Theater' started by ironjaw, Jul 5, 2008.

  1. macrumors 6502

    Ok so I have tried searching Handbrake for a definitive answer - read their wiki, etc. I have also searched Macrumours.

    The reason i'm posting here is because I don't want to be "yelled" at Hanbrake forums (they aren't friendly).

    Under Handbrake when selecting MP4 you get two (5 in total incl. the 3 audio) codec options - FFmpeg and H264

    I've noticed that FFmpeg encodes alot faster than H264 (I get around 200fps) compared to 40fps on H264

    Is it worth using FFmpeg?
  2. macrumors 603


    If you can get it to work, then that's all that really counts.

    There are some minor differences, if I'm remembering right, in terms of options supported but for the most part if it works and you're happy with the result, it doesn't matter which one you use.
  3. macrumors 6502

    That sounds great - the difference being 21 minutes with FFmpeg, compared to 2 hours with H264:D
  4. macrumors 6502

    The ffmpeg codec is MPEG-4, note that Apple quote the following specs for MPEG-4 video on the AppleTV:

    This means that it isn't useful for HD encodes, or even for some DVD encodes.

    What will happen is that the movie will play and appear in iTunes on your computer, but will not sync or appear in your library on the ATV.

    You really have to use H.264 for the ATV, which I agree is a pain, since the MPEG-4 encoded material looks pretty good for the bitrate, and encodes so much faster.

    Cheers, Ed.
  5. macrumors 604

    Cave Man

    Sounds like you need to build a hackintosh. ;)

    Mine transcodes a 2 hour movie into 2500 bit rate/H.264/AAC/AC3 in 35 minutes (one pass) or 50 minutes (two pass).
  6. macrumors 603


    I thought that the ffmpeg codec can also encode into H.264... was I wrong?
  7. macrumors 6502

    Well you got me there - I have been thinking about.:D

    You know what would be great if someone could explain how to use (or even code a GUI) for x264farm which basically will split a single encode over the network (just like xgrid) to your other macs. Truly distributed computing:D

    More info here and here
  8. macrumors member

    This is an option that I would truly appreciate too, ironjaw.
  9. macrumors 6502

    Alan Taylor

    OMFG - so the past 6 months that I spent ripping and encoding everything I own into .mp4 with Handbrake has been a waste of time????

    I did everything on the AppleTV setting, but chose the MPEG-4 codec which makes the encoder FFmpeg...
  10. macrumors regular

    This all depends on what options you have enable in x264 and the resolution of your source file. One computer can encode at 300 fps and another with identical components can encode at 2.
  11. macrumors regular

    If they're greater than the stated resolution in the specs, yes, in all likelihood. However, AppleTV's stated specs are somewhat fungible if you read enough over at the VisualHub/Handbrake/doom9 forums. Unfortunately, the one space that Apple devices *aren't* fungible in is resolution. Also, Apple TV has a built in hardware decoder for acceleration of H.264 decoding, so its XviD (MPEG-4) decoding will be slower, which is probably why there's a lower stated resolution even though the codec itself is less intensive.
  12. macrumors regular

    don't hold your breath :eek: the only good video authoring tool GUI that supports Mac and is written from the ground open instead of just passing files to an open source application is Handbrake. I'd suggest learning how to use the command line if you enjoy a challenge, or how to change the H.264 options in Handbrake to speed it up. There's a good page in their wiki about it, and the easiest ones to lower for more speed are the output resolution, "subme", and the motion estimation method.

    Using the command line has an extremely steep learning curve, as you need to learn terminal, how to compile open source programs, how to get them to compile correctly on mac, which programs work best for your workflow, how to write a shell script to integrate the programs, how to make Quicktime happy, which options to use, how to use those options, how different options affect speed and quality, AND what apple tv supports.

    By far, the best option right now is to just trust Handbrake and its presets. If you plan on altering a preset, post in their general forum exactly what preset you're starting from and what exactly you're changing, and what you need it to support. They're one of the most angry forums I've been on, but well-deservedly so, they have to deal with a lot of crap from people who change presets and then wonder why they won't work with their devices, or people simply complaining the app is crashing with no information about what they were doing at the time or what the error was.

    Also, they have to do a LOT of work, writing video conversion software is very very very hard. Most programs like VisualHub, or "iPod conversion" software you see is just a GUI written on top of ffmpeg, the most popular open source video tool.
  13. macrumors 6502

    Alan Taylor

    Hmmm, well I've notice that Handbrake seems to be dropping the resolution so that's good. And Visualhub - everything I do in there is under the 'iTunes' tab so I'm guessing they will work....

    I guess we will have to see when I buy one!
  14. macrumors 6502

    What's the point of using a Preset if you then change it :)

    Odds are that some will work where the aspect ratio means it comes in under the resolution limit, but most won't.

    Of course the SVN version of HandBrake will transcode all of your MPEG-4 videos to H.264 - so all may not be lost :)

    Cheers, Ed.
  15. macrumors 6502

    You'll notice that when you select the Video codec it specifies the codec and then also what library is used to encode using that codec.

    Options for an MP4 file are:

    MPEG-4 (ffmpeg)
    MPEG-4 (Xvid)
    H.264 (x264)

    So HandBrake has two libraries that you can use for encoding MPEG-4 (part 2) and only uses x264 for encoding H.264 (not ffmpeg, even though ffmpeg can do it).



    Cheers, Ed.
  16. macrumors 6502

    Ok so I guess its back to the old H264 codec:D No more 200fps for me:eek:

    What about x264farm anyone tried that or got it to work?

    It really does look promising - I think if we get enough support (I don't think alot of people know x264farm) it would benefit alot of users here that encode to appletv. I mean the idea behind is perfect

Share This Page