h.264 MKV to MP4 without transcoding?

Discussion in 'Mac OS X System & Mac Software' started by fryke, Jul 22, 2007.

  1. fryke

    fryke Moderator Staff Member Mod

    Joined:
    Sep 22, 2000
    Messages:
    14,295
    Likes Received:
    9
    Trophy Points:
    0
    Occupation:
    IT Administrator
    Location:
    macosx.com
    ffmpegx? I haven't really used that program widely and am perplexed. ;) Is there any way to convert a 720p (HDTV) MKV file to an MP4 (for AppleTV) without the video being transcoded? I mean: Basically, the MKV _should_ contain an industry-standard H.264 stream for the video, no?
     
  2. fryke

    fryke Moderator Staff Member Mod

    Joined:
    Sep 22, 2000
    Messages:
    14,295
    Likes Received:
    9
    Trophy Points:
    0
    Occupation:
    IT Administrator
    Location:
    macosx.com
    Found a (non-free) solution. Quicktime Pro and Perian FTW. :) With QT & Perian 1.x, I can open the .mkv file in Quicktime. Then I export as MPEG-4 (H.264) using "passthrough" (i.e. it doesn't reencode). Should work beautifully. My demo file crashes the AppleTV, though. ;) ... I think there was something wrong with the MKV-file, though, since it also gives an error message on VLC. I'll try with another to verify.
     
  3. Captain Code

    Captain Code Moderator Staff Member Mod

    Joined:
    Aug 29, 2001
    Messages:
    3,113
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Software Engineering Student
    Location:
    Ontario, Canada
    I've found mkv files are terrible, often audio is out of sync etc. It's an open source version of H.264 which they claim is better than Apple's implementation and Apple's has some problems.
    Playing them on my G5 didn't work so well but on my MBP it worked ok. Nothing to do with CPU power it just seems VLC on PPC isn't as good.

    FFmpegX didn't work for me at all, but I didn't try QT Pro.
     
  4. Mikuro

    Mikuro Crotchety UI Nitpicker

    Joined:
    Mar 21, 2005
    Messages:
    2,839
    Likes Received:
    3
    Trophy Points:
    0
    Part of the problem is that Apple does not support the full H.264 or MPEG4 standards. Don't ask me why. They've been very slow on implementing advanced features like B-frames. I'm not entirely up to date on this myself, so I don't know exactly what all is currently missing from QuickTime's H.264 implementation, but I'm fairly sure something is. So you can encode video with standards-compliant encoders like x264 and wind up with a non-QT-compatible stream. If you don't use the advanced options, though, QT should play it fine. (Fat lot of good that is to you when you have an already-encoded file, I know...)

    It's true that a lot of encoders (mostly Windows-based, I think) really do piss on ths standards, though. I imagine the developers/users just see that it plays in WMP and assume that means it's valid. Also, QuickTime is notoriously non-fault-tolerant.

    I think Perian takes control of MPEG4 and H.264 decoding, supporting the full standards, but you probably don't have that installed on your AppleTV (it is supposedly possible, though!). Actually, if you did have Perian installed on your AppleTV, you wouldn't need to convert it to mp4 in the first place. :)

    Dumping streams from one container to another is rarely as simple as it ought to be. ffmpegX allows you to pass video through from any format to AVI, and VLC allows you to pass video from any format TO any format, but neither of these have great success rates in my experience. *sigh*
     
  5. fryke

    fryke Moderator Staff Member Mod

    Joined:
    Sep 22, 2000
    Messages:
    14,295
    Likes Received:
    9
    Trophy Points:
    0
    Occupation:
    IT Administrator
    Location:
    macosx.com
    I know that I could install Perian on the AppleTV, but I somehow just don't want to open it up just yet. Also, you can't use iTunes to synch MKVs after installing Perian on the AppleTV, you'd have to use a separate folder... I like the all-in-one-approach of Apple here. (I wish, though, iTunes would simply accept everything QuickTime can play - and AppleTV would accept QT plugins through some interface...)
     
  6. Mikuro

    Mikuro Crotchety UI Nitpicker

    Joined:
    Mar 21, 2005
    Messages:
    2,839
    Likes Received:
    3
    Trophy Points:
    0
    That would be nice. However, I don't think all QuickTime codecs would work on an AppleTV. The Perian folks had to go out of their way to make it compatible with the AppleTV. My impression is that it's not TOO hard, but most codecs would probably need to be updated. At least the ones dealing with sound.
     
  7. pistooli

    pistooli Registered

    Joined:
    Jun 10, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    "passthrough" export in QuickTime Pro works like a charm... a 720p HD mkv file is converted to Apple TV format in less than 15 mins on a MBP... :)
     
  8. triggs

    triggs Registered

    Joined:
    Dec 11, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I just found a good solution to this. The shareware program Playback, which is an excellent Mac media server for (in my case) the PS3. If you select a directory for streaming that has some MKV files in it, it offers you the option to have them repackaged as MP4 files, without losing any of the resolution. It worked great on my ripped Blu-Ray discs of Hellboy and Old School, but seems to be crapping out on the Planet Earth series. Hopefully I'll get that figured out, because this is working great otherwise.
     
  9. triggs

    triggs Registered

    Joined:
    Dec 11, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Video Monkey is another good (free) solution that I recently came across. It's a beta program, but has been quite stable on my iMac running 10.6. It only has a handful of Apple devices as presets though. It's a single developer doing it in his free time, so it's slow to update but works great for me.
     
  10. fryke

    fryke Moderator Staff Member Mod

    Joined:
    Sep 22, 2000
    Messages:
    14,295
    Likes Received:
    9
    Trophy Points:
    0
    Occupation:
    IT Administrator
    Location:
    macosx.com
    I haven't seen it doing it without re-encoding, though..? Using it all the time. Great VisualHub replacement.
     
  11. bmscmoreira

    bmscmoreira Registered

    Joined:
    Jan 16, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Use Subler (http://code.google.com/p/subler/).
    Open mkv file, then save as mp4. Should take seconds, no need to re-encode, and it's free and a great application.
     
  12. fryke

    fryke Moderator Staff Member Mod

    Joined:
    Sep 22, 2000
    Messages:
    14,295
    Likes Received:
    9
    Trophy Points:
    0
    Occupation:
    IT Administrator
    Location:
    macosx.com
    Exactly what I needed, sadly the resulting files don't work with Apple TV most of the time. :/
     
  13. bmscmoreira

    bmscmoreira Registered

    Joined:
    Jan 16, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Yes... I sometimes get audio out of sync too. Not a perfect solution, unfortunately...
     
  14. ruckerz

    ruckerz Registered

    Joined:
    Jan 28, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    h264 has a lot of variety in it. Apple TV 2g will only play main profile lvl 3.1 . Many of the mkv's I've found are encoded with High Lvl 4.1 and AppleTV throws it back at you saying it's not playable. (Even though it imports into iTunes, maybe plays on your iMac, but when you airplay it, you get an error).

    Check your files with http://mediainfo.sourceforge.net/en for the video specs.
     

Share This Page