Converting mkv's for ATV, Windows equiv of MKVTools?

Discussion in 'Apple TV and Home Theater' started by shorn, Jan 8, 2011.

  1. shorn macrumors regular

    Jun 29, 2010
    Hi all,

    Heres my set up. I have a 24" iMac, which has my entire music library, all completely tagged and managed in iTunes.

    I also have a media PC in the lounge which runs XBMC with all my movies and TV shows stored, on a eSata 4 Days HD enclosure (DAS401.) This all works fairly well, but I've been looking at the Apple TV recently, but as the majority of my movies are 720p MKV rips, I thought it would be far too much to convert them all.

    However, after reading a thread or two on here, I found MKV tools, and the came to the realisation that the majority of my (250 rips) are h.264 video anyway. Therefore a lot of them can be repacked as MP4 (m4vs). The one thing I'm a tad unsure about is the audio. The majority of my rips are AC3 5.1, and for my test file that I created I converted this to AAC 5.1 and 2.0, but am i right in thing that ac3 5.1 can be passed through, so provided my audio system can decode it then I should be fine? Also if it converts it to AAC 5.1, what is the quality like? At the moment I need the 2.0 as I only have a stereo system anyway, but might upgrade at some point.

    What I also want to know is if there is a windows equivalent of MKVTools, as I would rather have my PC sat there doing the donkeywork converting them all as opposed to the iMac. (This also gives me the option to use both and get them done quicker!)

    On a side note, I've used iFlicks to add metadata to the converted file, and add to iTunes. It works well.

    My goal would be to Firewire 800 a Drobo (That contains all my TV and Movies) to the iMac. Everything loaded into iTunes and then served to the AppleTV. I presume a Drobo via Firewire to the iMac will be quick enough for the AppleTV to stream from?
  2. Firewolve macrumors member

    Jul 21, 2009
    I do have the exact same problem. I have tons of HD-mkvs including a h264 video track and ac3 or dts audio tracks.

    With MKVExtract or tsMuxeR (I prefer windows tools for this task as I use my server running that stuff) I can demux them and get a h264 + ac3/dts files.

    Did I get it correctly that it isn't a good idea to mux a m4v with only a ac3 audio track if I need to play it on my tv (stereo - without a 5.1 receiver) but also want to have the 5.1 track for future use? Isn't AppleTV2 able to playback 2.0 stereo sound using the ac3 5.1 track?

    If not I guess I have to get two audio tracks (per language) to the m4v-file - one ac3 and one aac. Unfortunately I could not find a tool which can do that (get h264 + ac3/dts and output m4v with ac3+aac) apart from mkvtool which unfortuntely only runs on Macs and - much worse - doesn't work for me with files larger than 4GB (although I use the current version).

    In short :): I want to convert my
    mkvs (h264 video, ac3 or dts audio) to
    m4vs (video passthrough, audio suitable for a 5.1 and a 2.0 setup)
    primarily for playback on an AppleTV 2.

    Thank you very much in advance for your help :)
  3. shorn thread starter macrumors regular

    Jun 29, 2010
    Well I have had great success with MKVTools so far, converting to an m4v by passing through h.264 video, and converting the DTS/ac3 track to aac 5.1 & aac 2.0. It takes a little longer, but I gather I have all bases covered. I was only able to test last night when a friend bought his AppleTV round.

    I've also read that its not a good idea to have a m4v with just the ac3 5.1 track, thats why ive added the 2.0 as well.

    My only bug with this is that when you play back via iTunes, the two tracks are selectable, but they show as "Undetermined Audio Track 1" & "Undetermined Audio Track 2" Would be nice if these could show with the correct information. Anyone know how to?

    Again, still searching for a windows solution!
  4. Firewolve macrumors member

    Jul 21, 2009
    But isn't AAC 5.1 a change for the worse (quality-wise) compared to AC3 5.1?
  5. shorn thread starter macrumors regular

    Jun 29, 2010
    Don't know? Is it? I guess I could pass through the ac3 5.1 and create an aac 2.0 track. I assume that would work?
  6. Firewolve macrumors member

    Jul 21, 2009
    I don't know, but that's what handbrake (which doesn't help us in this case as it cannot passthrough the video track) does per default: it passes through the ac3 5.1 (as track 2) and creates an AAC track (as track 1).
  7. shorn thread starter macrumors regular

    Jun 29, 2010
    Ahh, I might do that in future then! Saves a bit of encoding time anyhow! good stuff!
  8. Idgit macrumors 6502


    Mar 14, 2004
    My favourite app for this sort of thing is Subler. It's free, fast, and has any easy to use interface.
  9. shorn thread starter macrumors regular

    Jun 29, 2010
    I have played with Subler in the past, will have a look at it again now.
    I have been very impressed with MKVTools, however one thing that annoys me is how it displays the outputted tracks as Undetermined in iTunes. I would like it to state that they are English, do you know of subler does this?
  10. Idgit macrumors 6502


    Mar 14, 2004
    Yes, you can select and change the language of the audio and video tracks in Subler.

    Also, the developer of Subler recently posted that the next version will allow you to show the audio channels number.
  11. shorn thread starter macrumors regular

    Jun 29, 2010
    OK thats good, im just having a go with Subler now. It appears though that I only have the option to convert the audio or leave it untouched. I would prefer to have a 5.1 pass thru and a 2.0 aac track to cover all bases. This does not seem possible with Subler?
  12. Idgit macrumors 6502


    Mar 14, 2004
    Since audio conversion was just added, I'll guess that audio passthrough will be added in a future release.

    You might want to contact the developer and ask him. He seems to respond to comments in Subler's MacUpdate review/comments section.
  13. Idgit macrumors 6502


    Mar 14, 2004
    Alternatively, you could extract the 5.1 audio track using MKVTools and then add to extracted track to the movie in Subler.
  14. shorn thread starter macrumors regular

    Jun 29, 2010
    Thats an idea, but again its just adding a further step. I would prefer a more automated way. For now I think I'll stick with MKVTools, as I did another movie last night and that picked up that it was English, and it displays this in iTunes. It doesn't say which is 2.0 and which is 5.1, but I guess that will be easy to tell from whats outputted from the ATV.

    Still looking for a windows equivalent though!
  15. BlackMangoTree macrumors 6502a

    Sep 30, 2010
  16. shorn thread starter macrumors regular

    Jun 29, 2010
    Well picked up my AppleTV today, got it connected in a breeze. I had a few movies that I had converted from MKVs with DTS > m4v with a 5.1 pass thru and 2.0 track. Also had some TV shows ripped fresh from DVD with Handbrake using the ATV2 preset. They display great as well.

    Again, still looking for a windows MKVtools solution so I can get everything converted asap.

    Thinking about it, I guess I could use MKVExtract (I think thats the one) to extract the streams, find something to convert the audio to AAC 2.0 and then just use MKVTools to mux it all. Just allows me to do more of the hard work on the PC.
  17. ozblogger, Jan 11, 2011
    Last edited: Jan 11, 2011

    ozblogger macrumors newbie

    Aug 10, 2008
    Try Yamb

    it's a front-end for mp4box and if you add in locations for mkvextract, it can remux a MKV (H264/Ac3/AAC) to MP4 with one click.
    Usually takes about 7 mins for a 120min 720p video for me

    I've also had success in re-muxing some XVID/AC3 files into mp4 too (without conversion) , that have played on ATV2 using YAMB

    I'm currently looking for a batch script, that will do a folder of videos in a go ...
    Luckily Yamb creates a log that has the cmd line commands in it, so shouldn't be that hard.

    tip: rename mp4 to m4v if you have ac3 in it (learnt it the hard way)
  18. shorn thread starter macrumors regular

    Jun 29, 2010
    Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5)

    Hey that's great. I'll take a look into that. Just doing a few conversions on the mac St the moment to try and get the best solution.
  19. andre.abreu macrumors newbie


    Jan 11, 2011
    Brasil, Rio de Janeiro
    Subler (for Mac) is more stable than yamp!

    Now if I can sugest...

    1st. step: you need confirm if you movies is profile Main/High@3.1 or less! If so high you cant play on apple tv 2g. Use mediainfo to see!

    step 2: install ffmpeg (Mac : Linux: Windows: )

    step 3: convert 1 by 1 ... i.e.

    ffmpeg -i movie.mkv -vcodec copy -acodec copy -acodec libfaac -ac 2 -ar 44100 -ab 128k -f mp4 movie.m4v -newaudio

    This comand make movie.m4v with tree tracks:

    video - mpeg-4 profile 3.1 "passed-truth"
    audio - ac3 6ch (5.1) "passed-truth"
    audio - aac 2ch

    You can experiment do this automatic using bash script...

    for I in `ls *mkv` 
       ffmpeg -i $I -vcodec copy -acodec copy -acodec libfaac -ac 2 -ar 44100 -ab 128k -f mp4 $I.m4v -newaudio
    Copy this code on file located in your movie folders... and execute this command:

    #chmod +x file_you_named

    for execute type #./file_you_named

    After u can use iDentify to obtain info/cover about movie from IMDB, tagCHIMP and etc...

    If you movies is not profile 3.1 you can improve ffmpeg command!

    I hope to help and sorry for my bad English!
  20. Teejvan macrumors newbie

    Jan 17, 2011

    This works great on Windows. I use it to demux .mkv and mux it to.m4v. If the soundtrack file is AC3 then you can pass it through, if it's DTS it can transcode it to AC3.
  21. Teejvan macrumors newbie

    Jan 17, 2011
    The Apple TV 2 will quite happily play all manner of h264 up to 4.1. It's fantastic.

Share This Page