MKV tv shows to m4v handbrake settings help

Discussion in 'Apple TV and Home Theater' started by neo179neo, Oct 5, 2010.

  1. macrumors regular

    Sep 29, 2010
    Nottingham, UK

    I know that there are probably loads of threads on here asking this but ive got a lot MKV tv show torrents which i want to convert to m4v using handbrake... i want to keep the audio and video quality exactly the same...

    Can someone tell me what settings i need to keep to do this?
  2. macrumors 6502a

    Sep 30, 2010
    Simplest way is to get the nightly build of handbrake.

    Select the High Profile preset.

    Set The RF to 18.

    Will end up witha file thats pretty much identical to the original.
  3. macrumors member

    Aug 24, 2010
    for a 40 min hd mkv handbreak needs 4 Hours to convert the file to m4v on my 13 inch macbook pro.

    seems unusable...
  4. macrumors 6502a

    Sep 30, 2010
    Using the High Profile preset make sure you turn the filters off, will speed encoding times up.

    I am encoding some movies on my 2009 MacMini i haven't timed anything but doesn't seems too bad i just let it go while im asleep and at work, so doesn't bother me.

    on my 27 inch imac encoding speeds are far faster.

    The core Duo cpu is just slow.

    P.S Good things come to those who wait.
  5. macrumors member


    Oct 21, 2009
    Omaha, NE
    If the MKV files have already been encoded and use the h.264 codec, you can use Subler and convert them to m4v. Takes about 5 mins for a 2 hour movie and 10 mins for a 2 hour 720p movie.
  6. macrumors 6502a

    Sep 30, 2010
    That depends on how the video was encoded. I found in most cases i wont work. If the Profile or frames are too high you will need to de a re encode.
  7. macrumors member

    Jul 11, 2008
    MKVTools can split the audio and video and re-encode only when necessary. HandBrake will simply attempt to re-encode.

    While it is *not* as user-friendly as HandBrake, a few attempts with MKVTools and the 5+ mins it takes to split and re-encode a file will make you learn quickly.
  8. macrumors 6502a

    Sep 30, 2010
    Unfortunately this doesn't work on all movies.
  9. macrumors 6502

    Jul 2, 2008
    I used MKV Tools last night on two TV episodes. Both took less than 2 minutes to convert to m4v. Imported and tested in iTunes.

    ATV couldn't play the videos. Video length and thumbnail was there, but the error message was something to the effect of 'Can't play video at this time. Please try again later'

    Very strange. I used the Apple TV preset, figured what worked on the previous version would work on the new one. Is there something I am missing?
  10. macrumors member

    Jul 11, 2008
    I'll be happy to test this if I can acquire the source material.
  11. macrumors 6502

    Jul 2, 2008
    I wonder if the issue is related to speed of the network. I was on 802.11N rather than hardwired. I will test it hardwired and then report back.
  12. macrumors newbie

    Feb 12, 2007
    I have had the exact same issue with both Subler as well as MKVtools.

    I haven't researched extensively, so please forgive any ignorance, but I think the problem lies in the H.264 profile. The codec is compatible, as we know, but most MKV video tracks use a profile that is not playable on Apple TV. It doesn't seem like there's any way to change the profile without doing a full re-encode (a la Handbrake). If someone is well-versed in the codec/profile world, please share!

    I did a final test last night with a 1.5GB MKV file (a 30 min show). I created two M4V files, one with MKVtools and one with Handbrake. It took 5 minutes for the MKVtools file and 1.5 hours for Handbrake (MacBook Pro, 2.4 GHz Core 2 Duo, 4GB RAM). As expected, the MKVtools file appeared on the Apple TV, but displayed the error message when I tried to play it. The Handbrake file played flawlessly.

    At this point, there are a few questions:

    • Is it the H.264 profile that's causing the problem?
    • Is there a way to update the H.264 profile without re-encoding?
    • Is it an issue with the audio track (I believe MKVtools re-encodes the audio from AC3 to AAC, but can't confirm)?
    • Is there a simple setting in MKVtools that I'm unaware of that solves the problem?
    • If all hope is lost, are there optimal settings for Handbrake that speed up the re-encode process?
  13. macrumors 6502

    Sep 25, 2010
    I reencode everything. Remuxing is too prone to failure.
  14. macrumors 68000

    May 6, 2004
    First, find out info about your mkv with MediaInfo Mac (free)
    This will tell you about the 264 profile and audio codecs

    Try to convert with both video and audio passthru

    I converted a mkv high profile level 3.1 720p video that works fine on my iPad. I'll test on my AppleTV in a bit.

    I'll also test higher levels and will report back later today.

    The AppleTV is a little picky but supports much much complex encoding than the listed tech specs with means it is infinitely more useful than I thought and I don't have have to re-encode 100's of videos.

    I have a main profile level 4 1920x800 video that play flawless but some of my standard def that I accidentally encoded at high level 5 get stuck every 10 minutes. Honesty surprised that iTunes even tries to stream it.
  15. macrumors member

    Jul 7, 2008
    Just to make sure we're all on the same page, a good way to think of a video's avc profile is as a specification for what properties are allowed for that movie. A High 5.1 video can be encoded using more fancy settings than a Main 3.1 video, because the Main 3.1 profile is more restrictive. A few things to point out here. (a) Once encoded, you can't change the properties that make a video High 5.1 without re-encoding, (b) a High 5.1 video doesn't have to be encoded using the fancier settings, and (c) all it would take is for one of the "fancier settings" of a higher profile to be an problem, for a manufacturer to have to specify a lower profile is needed for video playback.

    I'm not sure about Subler, but here is what is going on with MKVtools. When it passes through video, it looks at the target device, and then edits the movie at the hex level to adjust the avc profile "label" to an appropriate value. So when the target device tries to play the video, it's fooled into thinking that the profile level is appropriate.

    A PS3 is happy with High 4.1. Most MKV files are High 5.1. There is not much difference between these two profiles that would show up in common encodes. So when the PS3 is fooled into playing a High 5.1 video that has been relabeled to High 4.1, then there usually is not issue. Unless I need to burn subtitles, I've never had to re-encode the video track for playback on PS3.

    The Apple TV, however is more restrictive. It wants a Main 3.1 profile. I don't have an Apple TV yet but I do have an iPad which has the same video requirements. The movies I tested with the newest version of MKVtools, using passthru for the video, played fine, but then I don't have hundreds of videos laying around to test (that's where beta testing is a big help :)). As I see it, there are two things that could be going on if the ATV won't play videos with a passed thru video track:

    • MKVtools did it's job, and the Apple TV is fooled into trying to play the video, but there was some setting when the video was encoded which is specific to a profile higher than Main 3.1, and ATV can't handle it. If this is the case, then there is nothing that can be done other than re-encoding the video.
    • MKVtools did not fool Apple TV into trying to play the video. If that's the case then there may be a fix.
    By the way, this discussion seems a bit off topic for this thread, so it might be more appropriate to start a new thread, or e-mail me if anyone wants to pursue this goal of being able to passthru mkv video tracks for playback on the ATV. I don't have access to these problem videos, so if you do and you want to find a fix, here are some things that you can try. By the way, the latest version of MKVtools is 2.4, so make sure you are using that.

    • Use an app like mediaInfo to check the avc profile of the created m4v video. If it hasn't changed, then that would be the issue.
    • It was mentioned that an older version of MKVtools did successfuly passthru the video tracks of these problem files. Can that be verified?
    • To rule out the audio as an issue, go to the mp4 tab and check the option that will re-encode the video for ATV. Make sure your resolution is not greater than 1280.
  16. macrumors 6502

    Jul 2, 2008

    Just tested: Original and Converted file (using MKVTools) are both High@L4.1
  17. macrumors 6502

    Jul 2, 2008

    Also confirmed my Handbrake encode earlier today of the same source is High@L3.1

    Looks like MKVTools isn't changing the profile.
  18. macrumors member

    Jul 7, 2008
    That's good news! It means that there is a good chance that this can be fixed and you'll be able to passthru your video tracks for the ATV. I just tested a batch of sample MKV's again, and the profiles are all being changed, so obviously there are some problem videos. The trouble is that I don't have any of these videos to use to find a fix. If someone can send me a link to a file either via PM or my e-mail at, then I'll see what I can do. You could also use the split capabilities of MKVtools to create a small sample of the problem MKV and send it to me directly. Just make sure that you are seeing the same problem with the sample.
  19. macrumors 6502

    Aug 9, 2007
    Allentown, PA
    To get MKVTools to work with the Apple TV, a couple of settings tweaks are needed. First, make sure you are using the latest version (2.4). Now on the MP4 tab:

    Video = passthrough
    Audio = passthrough, check add 2 channel track
    Third Column, Device = Apple TV

    Gives me a High@L3.1 profile that should be playable on an Apple TV. Unfortunately, I don't have mine yet, so I can't test, but it should work.
  20. macrumors 6502a

    Sep 30, 2010
    Just tested this out with a 720p high Profile 4.1 video and it stutters on the Apple Tv is various places.

    Over all this method has only work well on 1 video.
  21. macrumors member

    Jul 7, 2008
    Hmm. Well, it might be time for me to try to track down a unit to test on. It would be nice to get passthru to work consistently.
  22. macrumors 6502a

    Sep 30, 2010
    Don't forget that we are trying to get video that is out of the Apple TV specs to play.
  23. macrumors member

    Jul 7, 2008
    Sure, but note also that the typical handbrake setting, which I believe is High@L3.1 is also not what the apple specs call for, yet videos seem to play OK. This gets back to some of the points I brought up in my original post in this thread. Also, just to verify, I did a whole bunch of pass thru conversions for my iPad from a variety of mkv source videos and they all played fine, so it is doable on a device that apple says needs a main@L3.1 profile.

    On a side note, I see from other threads and in other forums that there may be an issue with other videos stuttering so it might be difficult to pinpoint if this is a video issue or an ATV issue.
  24. macrumors 6502a

    Sep 30, 2010
    The stuttering issue that i have and this issue are completely different.

    Sus out Thora Anime i have all their 720p anime none play once the video has been passed through with Mkvtools.
  25. macrumors 6502

    Jul 2, 2008
    Trying to download the latest version fo the beta, and I can't find it. The beta page has no link. Is there something being update?

Share This Page