Go Back   MacRumors Forums > Apple Hardware > Apple TV and Home Theater

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 9, 2007, 01:23 PM   #1
MacinJosh
macrumors 6502a
 
Join Date: Jan 2006
Location: Finland
MKV -> MP4 without conversion?

First off, MKV is a fecking pain in my ass and whoever came up with it should be hung by his balls.

Ok, now that I got that outta my way, my actual point is this:

A lot of MKV files are H.264 encoded so I was hoping to quickly change them into Apple TV/iTunes compatible files. I've been able to demux an MKV into 2 separate files; ****.h264 (video) and ****.ac3 (audio). Both play fine separately.

Now I need to figure how to mux them into an MP4 container. Does anyone have a clue on how to do this? I've tried the following programs:

ffmpegx (absolutely useless program, very unreliable)
mokgvm2dvd (another useless program... out of my 3 Macs, it ran only on 1 and didn't do anything useful)

So, before anyone tells me to convert, I have. VisualHub makes excellent conversions but I'd like to not convert because re-encoding loses quality and a simple demux->mux or passthrough conversion would be much faster.
MacinJosh is offline   0 Reply With Quote
Old Oct 9, 2007, 01:36 PM   #2
devman
macrumors 65816
 
devman's Avatar
 
Join Date: Apr 2004
Location: AU
I *think* mpegstreamclip will mux these for you if the filenames are the same - but I've never tried this myself. http://www.squared5.com/
devman is offline   0 Reply With Quote
Old Oct 9, 2007, 01:41 PM   #3
Jasonbot
macrumors 68020
 
Jasonbot's Avatar
 
Join Date: Aug 2006
Location: The Rainbow Nation RSA
Send a message via AIM to Jasonbot Send a message via MSN to Jasonbot
You could always use snapzXpro to take a video snapshot of the clip. its really rural but it should work.
__________________
[insert apple related products here]
Jasonbot is offline   0 Reply With Quote
Old Oct 9, 2007, 02:04 PM   #4
speakerwizard
macrumors 68000
 
speakerwizard's Avatar
 
Join Date: Aug 2006
Location: London
dunno about extracting the video but visual hub will convert
__________________
mac pro octo-core, 10GB, 5.25TB, 8800GT, 30"acd
iphone 3G, Macbook pro C2D
speakerwizard is offline   0 Reply With Quote
Old Oct 9, 2007, 02:12 PM   #5
MacinJosh
Thread Starter
macrumors 6502a
 
Join Date: Jan 2006
Location: Finland
Quote:
Originally Posted by speakerwizard View Post
dunno about extracting the video but visual hub will convert
Exactly what I said in my post... Please read it more carefully...
MacinJosh is offline   0 Reply With Quote
Old Oct 9, 2007, 02:17 PM   #6
Jasonbot
macrumors 68020
 
Jasonbot's Avatar
 
Join Date: Aug 2006
Location: The Rainbow Nation RSA
Send a message via AIM to Jasonbot Send a message via MSN to Jasonbot
If you have separate video+audio files you shouldnt have a problem using iMovie to put them both in and have them work, shouldnt be too hard. And after that you can make it all pretty and mp4ish by coverting using your converter of choice.
__________________
[insert apple related products here]
Jasonbot is offline   0 Reply With Quote
Old Oct 9, 2007, 02:17 PM   #7
killmoms
macrumors 68040
 
killmoms's Avatar
 
Join Date: Jun 2003
Location: Washington, DC
Send a message via AIM to killmoms Send a message via Yahoo to killmoms
Quote:
Originally Posted by MacinJosh View Post
First off, MKV is a fecking pain in my ass and whoever came up with it should be hung by his balls.

Ok, now that I got that outta my way, my actual point is this:

A lot of MKV files are H.264 encoded so I was hoping to quickly change them into Apple TV/iTunes compatible files. I've been able to demux an MKV into 2 separate files; ****.h264 (video) and ****.ac3 (audio). Both play fine separately.

Now I need to figure how to mux them into an MP4 container. Does anyone have a clue on how to do this? I've tried the following programs:

ffmpegx (absolutely useless program, very unreliable)
mokgvm2dvd (another useless program... out of my 3 Macs, it ran only on 1 and didn't do anything useful)

So, before anyone tells me to convert, I have. VisualHub makes excellent conversions but I'd like to not convert because re-encoding loses quality and a simple demux->mux or passthrough conversion would be much faster.
Not that I've done it before, but most of the time when I encounter H.264-encoded MKVs they use High Profile H.264, which QuickTime (and thus AppleTV/iPod) won't decode anyway. It's more than likely that to get a file that will play on both your iPod and AppleTV you'll need to convert anyway, since Main is the highest profile that'll work on the AppleTV and Baseline is the highest that'll work on the iPod.

EDIT: Don't have any MKVs to test with, but will QuickTime's "Extract" function work with Perian installed when you open an MKV and look at its properties (Cmd+J)?
__________________
thrillmoms.com - You know it.
Welcome to the family…
Mugi: Mid-2012 15" Retina MBP, 8GB RAM, 256GB SSD
Azusa: 64GB iPhone 5, Nagato: 16GB WiFi Retina iPad Mini
killmoms is offline   0 Reply With Quote
Old Oct 9, 2007, 02:28 PM   #8
MacinJosh
Thread Starter
macrumors 6502a
 
Join Date: Jan 2006
Location: Finland
Quote:
Originally Posted by Jasonbot View Post
You could always use snapzXpro to take a video snapshot of the clip. its really rural but it should work.
I don't understand... What's the point of that?
MacinJosh is offline   0 Reply With Quote
Old Oct 9, 2007, 02:29 PM   #9
MacinJosh
Thread Starter
macrumors 6502a
 
Join Date: Jan 2006
Location: Finland
Quote:
Originally Posted by Jasonbot View Post
If you have separate video+audio files you shouldnt have a problem using iMovie to put them both in and have them work, shouldnt be too hard. And after that you can make it all pretty and mp4ish by coverting using your converter of choice.
Ok, if you read my post carefully you'd get it.

I already know how to convert. VisualHub does a great job at it. I'm trying *not* to convert.
MacinJosh is offline   0 Reply With Quote
Old Oct 9, 2007, 02:36 PM   #10
MacinJosh
Thread Starter
macrumors 6502a
 
Join Date: Jan 2006
Location: Finland
Quote:
Originally Posted by devman View Post
I *think* mpegstreamclip will mux these for you if the filenames are the same - but I've never tried this myself. http://www.squared5.com/
Good idea but I can't get Streamclip to recognize the video part...
MacinJosh is offline   0 Reply With Quote
Old Oct 9, 2007, 02:39 PM   #11
MacinJosh
Thread Starter
macrumors 6502a
 
Join Date: Jan 2006
Location: Finland
Quote:
Originally Posted by killmoms View Post
Not that I've done it before, but most of the time when I encounter H.264-encoded MKVs they use High Profile H.264, which QuickTime (and thus AppleTV/iPod) won't decode anyway. It's more than likely that to get a file that will play on both your iPod and AppleTV you'll need to convert anyway, since Main is the highest profile that'll work on the AppleTV and Baseline is the highest that'll work on the iPod.

EDIT: Don't have any MKVs to test with, but will QuickTime's "Extract" function work with Perian installed when you open an MKV and look at its properties (Cmd+J)?
Excellent points. I forgot about the profile bits. However, I'll even settle for Leopard's Front Row playback if Quicktime supports High Profile natively or through a codec like x264.

The Extract function does not work in QT with perian...
MacinJosh is offline   0 Reply With Quote
Old Oct 9, 2007, 02:40 PM   #12
TuckBodi
macrumors 6502
 
Join Date: Jan 2007
Quote:
Originally Posted by MacinJosh View Post
Exactly what I said in my post... Please read it more carefully...
Why don't you go to the awkwardtv.org forums and do a little research before you bash on people trying to help you?!? They have a bunch of stuff on the issues with Matroska files and I know nito has been playing with it for his nitoTV plug-in. Never hurts to do a little searching on the web first...
TuckBodi is offline   -1 Reply With Quote
Old Oct 9, 2007, 02:44 PM   #13
MacinJosh
Thread Starter
macrumors 6502a
 
Join Date: Jan 2006
Location: Finland
Quote:
Originally Posted by TuckBodi View Post
Why don't you go to the awkwardtv.org forums and do a little research before you bash on people trying to help you?!? They have a bunch of stuff on the issues with Matroska files and I know nito has been playing with it for his nitoTV plug-in. Never hurts to do a little searching on the web first...
Dude, I'm not bashing anyone and I have done my research. There is no information that I find helpful. Everything is about conversions which I do already know about. What makes you think I'm bashing people??

EDIT: And I need my file to be compatible with iTunes so no plugin will do
MacinJosh is offline   0 Reply With Quote
Old Oct 9, 2007, 03:02 PM   #14
devman
macrumors 65816
 
devman's Avatar
 
Join Date: Apr 2004
Location: AU
Quote:
Originally Posted by TuckBodi View Post
Why don't you go to the awkwardtv.org forums and do a little research before you bash on people trying to help you?!? They have a bunch of stuff on the issues with Matroska files and I know nito has been playing with it for his nitoTV plug-in. Never hurts to do a little searching on the web first...

Wow, I didn't think he was bashing. His post was very clear but a couple of people in this thread do have serious comprehension problems.
devman is offline   3 Reply With Quote
Old Oct 10, 2007, 01:18 AM   #15
Westacular
macrumors regular
 
Join Date: Oct 2007
MKV isn't a bad container format; it's just that support for it on the Mac (outside of VLC) isn't that good. The big reason why you see H.264+AC3 rips in MKV containers is MKV does the best job at supporting that combination of codecs.

The MP4 container format does not support AC3 audio. Even if it did, QuickTime/AppleTV/etc won't decode AC3 without plug-ins.

You might be able to get away with converting the AC3 to AAC but keeping the original H.264, and muxing that into an MP4 file, if (as was pointed out) the H.264 stream fits within Apple's particular level of H.264 profile support. Otherwise you're stuck.

An often-recommended program used to create/manipulate mp4 files from raw streams is mp4box, a command line tool. A binary of it is included in ffmpegX but it's probably out of date and, sadly, a quick search doesn't reveal anyone who is making current OS X binaries of that available.
Westacular is offline   0 Reply With Quote
Old Oct 10, 2007, 01:48 AM   #16
Nermal
Moderator
 
Nermal's Avatar
 
Join Date: Dec 2002
Location: Whakatane, New Zealand
Try this: Open both files in QuickTime, Copy the video (you may need to select all first), then Add (Edit > Add to Movie) it to the audio. Then do a Save and create a self-contained movie. If this works then it'll generate a .mov, but it may still do what you want.
Nermal is offline   0 Reply With Quote
Old Oct 10, 2007, 04:17 AM   #17
MacinJosh
Thread Starter
macrumors 6502a
 
Join Date: Jan 2006
Location: Finland
Quote:
Originally Posted by Westacular View Post
MKV isn't a bad container format; it's just that support for it on the Mac (outside of VLC) isn't that good. The big reason why you see H.264+AC3 rips in MKV containers is MKV does the best job at supporting that combination of codecs.

The MP4 container format does not support AC3 audio. Even if it did, QuickTime/AppleTV/etc won't decode AC3 without plug-ins.

You might be able to get away with converting the AC3 to AAC but keeping the original H.264, and muxing that into an MP4 file, if (as was pointed out) the H.264 stream fits within Apple's particular level of H.264 profile support. Otherwise you're stuck.

An often-recommended program used to create/manipulate mp4 files from raw streams is mp4box, a command line tool. A binary of it is included in ffmpegX but it's probably out of date and, sadly, a quick search doesn't reveal anyone who is making current OS X binaries of that available.
Very good points. I found a Mac binary of MP4Box and played around with it but couldn't get any proper results. You're absolutely right about AC3. I'd need to convert it to AAC first. Seems like it's too much of a hassle. Until MKV gets better support on our platform, I think I'll stick to simple and easy conversions.
MacinJosh is offline   0 Reply With Quote
Old Oct 10, 2007, 06:28 AM   #18
MacinJosh
Thread Starter
macrumors 6502a
 
Join Date: Jan 2006
Location: Finland
Quote:
Originally Posted by Nermal View Post
Try this: Open both files in QuickTime, Copy the video (you may need to select all first), then Add (Edit > Add to Movie) it to the audio. Then do a Save and create a self-contained movie. If this works then it'll generate a .mov, but it may still do what you want.
QT doesn't want to open the video for some reason even though I've got a bunch of different h.264 codecs installed. I need to figure out how. Thanks for the tip though. I might give up on the issue though. Too big of a hassle for the gains.
MacinJosh is offline   0 Reply With Quote
Old Oct 10, 2007, 01:08 PM   #19
devman
macrumors 65816
 
devman's Avatar
 
Join Date: Apr 2004
Location: AU
Quote:
Originally Posted by MacinJosh View Post
QT doesn't want to open the video for some reason even though I've got a bunch of different h.264 codecs installed. I need to figure out how. Thanks for the tip though. I might give up on the issue though. Too big of a hassle for the gains.
Yep, you've got little hope with streamclip and qt not recognising the video. As for AC3, there is the a52codec plugin http://trac.cod3r.com/a52codec

Or you convert to AAC5.1.
devman is offline   0 Reply With Quote
Old Oct 10, 2007, 02:13 PM   #20
traderx1
macrumors member
 
Join Date: Mar 2007
[QUOTE=Westacular;4304049]MKV isn't a bad container format; it's just that support for it on the Mac (outside of VLC) isn't that good. QUOTE]

You are 100% correct. Apple support of other codecs is rather limited through quicktime/itunes. In fact this was issue back with divx/xvid. Now with .mkv growing significantly with the all these new HDDVD/Bluray, it is even more troublesome for us Mac users. VLC and Perian work great, but on your mac. If you are like me, you like to watch TV on your plasma/lcd and/or your computer may be in another room.

So I went and bought AppleTV on day 1. I do love it, but it has its problems, in the video department, meaning lack of codec supportand AC3 support. I have searched and searched for ways to play my .mkv files but with no luck. So I started using Visual Hub and converted my movies. This was somewhat time comsuming, although I just set it at night and go to bed. A single pass .mkv file around 4.5 gigs would take 1hr on a MacPro, and 2 pass was over 2 hrs. So it can take some time. And yes, by doing this you are not really doing a 1:1 conversion, there is compression using the format. The quality was still very good on my 50inch Plasma. But it was missing something the audio. The AppleTV converted files played is Dolby Prologic II. This is not good enough for me and probably not others. Half the fun in a movie are the sound effects.

So what did I do. I dumped my AppleTV for video purposes, and use for music only. And it is absolutely fantastic at that. I bought a TViX 4100sh (google it) which has native .mkv support with Dolby Digital and DTS. And it is working great. No more conversions, full audio support, and a big hard drive. No the user interface does not come close to AppleTV. But for purely watching video it does a great job and saves me some hassle also.

No this will not help you solve your problem with AppleTV but for those who are looking for ways to wathc .mkv, xvid, divx files...here is another alternative.

hopes this helps some people, although not the original poster.
traderx1 is offline   0 Reply With Quote
Old Oct 10, 2007, 02:37 PM   #21
Nermal
Moderator
 
Nermal's Avatar
 
Join Date: Dec 2002
Location: Whakatane, New Zealand
Quote:
Originally Posted by MacinJosh View Post
QT doesn't want to open the video for some reason even though I've got a bunch of different h.264 codecs installed. I need to figure out how. Thanks for the tip though. I might give up on the issue though. Too big of a hassle for the gains.
If QT won't recognise it now then it most likely still won't once you've put the video into a different container
Nermal is offline   0 Reply With Quote
Old Oct 10, 2007, 07:24 PM   #22
infolc
macrumors newbie
 
Join Date: Oct 2007
Location: France
You can use imkvextract to demux (=extract audio and video from) the mkv file. You'll end up with a h.264 file (video) and an audio file (ac3, mp3...). This process is painless and fast. It doesnt reencode or transcode anything. After that you'll have to mux these two files into one container (through mp4box) that's compatible with your software/hardware (mp4, avi...). reencoding the audio to another format like aac before muxing it isnt a problem. check the command line for mp4box, it's fairly simple.

i doubt it'll run with crossover for (intel only) mac but windows user say "gotsent" works great and automates the process entirely!!!

One last word, transcoding to mp4 (h.264) with visualhub for instance is a long, very long process but you wont lose much quality at the end... i just wonder whether it's necessary when you can just demux/mux.
__________________
Blog Mac et jeux en français: INFOLC

Last edited by infolc; Oct 10, 2007 at 07:34 PM.
infolc is offline   0 Reply With Quote
Old Oct 10, 2007, 07:27 PM   #23
Nermal
Moderator
 
Nermal's Avatar
 
Join Date: Dec 2002
Location: Whakatane, New Zealand
Quote:
Originally Posted by infolc View Post
You can use imkvextract to demux (=extract audio and video from) the mkv file. You'll end up with a h.264 file (video) and an audio file (ac3, mp3...). This process is painless and fast. It doesnt reencode or transcode anything.
In his first post he says that he's already done that.
Nermal is offline   0 Reply With Quote
Old Oct 10, 2007, 07:43 PM   #24
infolc
macrumors newbie
 
Join Date: Oct 2007
Location: France
Quote:
After that you'll have to mux these two files into one container (through mp4box)
the missing part...

i should add that to reencode audio, "max" works great!
__________________
Blog Mac et jeux en français: INFOLC

Last edited by infolc; Oct 10, 2007 at 07:56 PM. Reason: another thing
infolc is offline   0 Reply With Quote
Old Oct 11, 2007, 01:41 AM   #25
billabong
macrumors 6502
 
Join Date: Jan 2004
I've tried what you want to do before, and it's a hastle. They never seem to either play on the Apple TV or whatever, so I caved in to Visual Hub.. It's the best thing I have done, don't waste your time trying no mux remux and all that crap. Just get visual hub, it's fast, easy, and the files always work.
billabong is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Apple TV and Home Theater

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
MKV to MP4 Help ash211 Apple TV and Home Theater 11 Aug 13, 2014 01:48 PM
Best MKV to MP4 converter for ML? blast87 OS X 10.8 Mountain Lion 16 Jul 29, 2014 05:12 AM
I Hate MKV with a vengeance! MP4 Conversion with Handbrake? EmPPgamer Apple TV and Home Theater 55 May 16, 2014 06:37 AM
Tool to check MP4 file compatibility after conversion from MKV? DaPhatty Apple TV and Home Theater 6 May 5, 2014 09:32 AM
MKV to MP4 conversion nhlducks35 Apple TV and Home Theater 2 May 31, 2013 08:11 AM

Forum Jump

All times are GMT -5. The time now is 01:35 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC