|Dec 9, 2012, 05:26 PM||#1|
Review & tutorial: MKV2M4V MKV remuxer / converter for iDevices (and Apple TV)
I've published several articles on “remuxing” video converters, which make it possible to convert a lot of videos very quickly for consuming on iOS. Generally, with today's most widely used video formats (H.264), this only involves converting the audio (if it's not already AAC) and changing the container.
So far, the two remuxers I've recommended the most were the free Subler and (strictly the beta version of) MP4Tools. They're very fast and astonishingly useful tools.
However, there are a lot other remuxers too: iVI (not really a speed demon but has some nice features like metadata lookup), iFlicks (also not very fast but it too supports automatic metadata addition), AnyVideo Converter HD (a not full-featured but, if you know how to use it, very fast converter) and the subject of this article, the Mac-only, $3 MKV2M4V.
The App Store main page (link) of the latter:
(as with all the images in this article, click for a larger version!)
(Note that you won't want to pay attention to the user remarks and ratings. They're far worse than the app really is. Statements like “The latest update wont work on any files” (it does) or “User interface is just awful, took me 10m to only start converting, convertion takes hours, and even when the convertion is over I've got 3 files, 1 video and 2 audio files! I am really disappointed from this! I DEMAND a refund!” are absolutely wrong. Actually, the user interface of the app is far easier to learn than that of Subler or MP4Tools.)
The biggest problems
Let's start with the biggest, not-fixable problems of the app so that you don't waste more time reading this article if you see an absolute stumbling-block.
There are two of them:
- the app can't transfer (by reencoding if needed) more than two original audio tracks. This is a major problem if you want to retain, say, all the commentary tracks of a video. For example, the well-known Finnish sci-fi parody “Iron Sky” has two commentary tracks (Finnish and English) and two main audio tracks (one 5.1 and one 2-channel AC-3 tracks, having the same audio). This is at least three tracks if you want to preserve both commentaries, along with either of the main audio tracks.
- there is absolutely no support for embedded subtitles at all. It only supports external SRT subs, which means you need to extract them first with, say, Subler. This, should you want to use this app in batch mode, would result in a lot of additional work. (Needless to say, top remuxers like the most recommended MP4Tools and Subler both support embedded subtracks. Actually, Subler even supports their bitmap versions too – both OCR'ing and pass-through'ing-wise.)
OK, these are the major problems of the app you must be aware of. Don't even think of purchasing the app if they're a problem.
Before going further and I quickly explain how the app should be used, I tell you more of the advantages / disadvantages of the app. After all, there are a lot of alternatives on the market – it's better to decide if you need this app as quickly as possible.
Accepts both M4V (MP4 / MOV) and MKV input, meaning you can quickly, say, downmix the AC3 track of an already-converted M4V file now that AC3 is no longer supported in the vast majority of players.
Very easy-to-setup for batch mode (to convert more than one video at a time) – unlike MP4/MKVTools, where you do have to make some additional settings. Batch mode is particularly good compared to Subler, which has very weak batch support.
Cheap (compared to almost all the other remuxers; except for, of course, the free Subler).
Cons (in addition to the ones already explained)
Somewhat slow conversion, at least compared to the, in this regard, best tools (Subler, MP4Tools, AnyVideo Converter HD). It's still way faster than, say, iVI (Pro).
No support for video conversion for non-H.264 (for example, VC-1) input, unlike with MP4/MKVTools / iVI.
Uses at least twice the movie's filesize for temp files – can be an issue when, to speed things up, you use a small(er) SSD to write the target movie file to
(No MTS support)
How does it compare with other remuxers?
A full chart comparing it to all the above-mentioned other remuxers is HERE (click the link to see the chart). I've, in addition to the benchmarks, I've also elaborated on the chapter, downmixed (typically, AC3 / DTS → AAC) track addition, subtitle and batch support.
All benchmarks have been done under exactly the same circumstances. The tests have been run on a late 2009 MBP 17" with 2.8 GHz C2D; the source HDD is a 1TB one in the DVD bay; target drive was a Vertex 4 256 GB SSD with 55 GB free space. The source file was a 16 GB MKV I've directly ripped from the Finland-only version of Iron Sky. It has four audio tracks (5.1 + 2-ch AC3 for the main audio + 2-ch AC3 Finnish + English commentary tracks), a chapter track and three BD subtracks. (Of course, none of the remuxers support BD subtracks.)
As you can see,
iVI Pro took 51m:24s to remux the video with all four audio tracks enabled in the output (most of the time was spent on audio reencoding and particularly adding). When converting one audio track only, it needs 24m:18s to get the output file ready. That is, almost two times more than the second-slowest converter, MKV2M4V; more than three and four times slower than MP4Tools and Subler, respectively. Finally, it turned out to be about six times slower than AnyVideo Converter HD. (All with one track only.) The other converters did fare far better: iVI is particularly slow at converting videos with more than one audio track (if you want to keep them in the output). Actually, in this case, it is almost ten(!) times slower than Subler.
Subler: 7m:0s (measured twice) (With fewer audio tracks, it's a bit faster: 5m:58s (to 2-ch AAC); 6:07 (to multichannel AAC) for one track and 6m:10s for two)
MKV2M4V: I couldn't test this with four audio tracks as it's only able to process up to two input tracks. The results with the latter are as follows: 12m:55s (measured twice) for two tracks and 13m:48s for one.
MP4Tools beta: 18m:50s. (With fewer audio tracks, it's considerably faster: 7m:40s for one track and 12m:50s for two)
AnyVideo Converter HD: could only test the one-track output as it doesn't support multi-track export: 4m:20s (2ch AC3 -> 2-channel AAC; iPad 3 preset, everything auto); 5m:18s (5.1 -> 2ch AAC, iPad 3 preset, manually selected 5.1 AC3 input); 8m:32s (to AAC 5.1 – the 1080p Mac MOV preset)
(Note that I've posted a summary on AnyVideo Converter HD HERE.)
A mini-tutorial & tricks & tips
As you may have guessed, you'll need to drag-and-drop the video file in the main window (on the top right) of the app. If you more than one file, you can select the current one in the left pane. (It's annotated by red in the following screenshot.) The following screenshot shows four files dragged to the window. Of them, I've selected “IronSkyMAIN” and set some of its parameters:
- if you convert for an iDevice / Apple TV and don't need two input audio tracks, select “For an Apple TV” or “For an iDevice” to the left of the green-annotated, “Custom” radio button.
On the other hand, should you need two audio tracks, select “Custom” (green annotation) and, then, select “AAC” below (yellow annotation) so that you'll have audio on the iDevice. Also, select the two audio tracks in the input window (purple annotation).
You'll also want to set the target directory (blue annotation); preferably to another drive than the source one to speed up remuxing. (Here, the my source is a HDD in the DVD bay (the source is shown at the bottom of the window) and the target is my desktop on another drive, an SSD.)
Enable the “Track configuration and chapters” checkbox (black annotation) if the input video has chapters. Note: it'll slow down the remuxing process by about 20%.
Finally, click “Start” at the top left for the conversion to start.
|Dec 10, 2012, 06:22 AM||#2|
Nice review. You might take a look at iFFmpeg, too. That's what I use for remuxing at the moment because Subler is no longer an option for ML users.
Macbook Air 13" | 1.8GHz | 4GB RAM | 128GB SSD
Time Capsule 2TB
Apple TV 3
|Dec 10, 2012, 07:03 AM||#3|
THIS file is the AC3 encoder and (after decompressing) must be placed under ~/Library/Audio/Plug-Ins/Components in your home directory. I'll later explain when this needs to be done – the order of file copying / overwriting is very important! (Discussion links also linking to the file: thread on Subler's page; another one; and a Russian one with a decent Subler tutorial.)
THIS is the DTS decoder (current, 1.2.3 version; if it becomes unavailable some time in the future, you'll find the working link at Perian's main page). Just install it by clicking “Perian.prefPane” in it, which installs a new preference pane in the Other group of system-level System Preferences:
In the screenshot above, I've annotated the button you'll need to click, should you want to quickly disable Perian. Enabling it will be done via clicking it again when it shows “Install Perian”.
1.2 After installing and enabling Perian...
…you'll already be able to convert DTS (but not AC3!) audio tracks. Give a try to converting THIS file (it has both a DTS and an AC3 audio track) with Subler, making sure you don't untick anything in the “Select Tracks” dialog box. It's the first checkbox list, immediately displayed after selecting the file to load. I've annotated the checkbox showing, by default, Subler imports all tracks, including both AC3 and DTS, from the MKV file you open:
You can quickly learn the audio format a given track is using by casting a glance at the sixth, “Info” column. In this case, it's “DTS” in the annotated row.
The next, “Action” column tells Subler what to do with the given track. With DTS audio tracks, it'll always be “AAC – Dolby Pro Logic II” as DTS must be converted as it can't be natively included in target MP4 / MOV / M4V files, unlike AC3 tracks. In this column, you can also change the output format; generally, only change this if, for some reason, you need to use some other output downmixing. (You'll rarely need to – I don't know of any MP4 player hardware not being able to play back the default, most advanced, MOV container-compliant Dolby Pro Logic II audio.)
Now, let's take a look at the next row, the one with “AC3” type and “2” ID. In the “Action” column, we see the same “AAC – Dolby Pro Logic II”, meaning the AC3 audio track will also be converted into a Dolby Pro Logic II AAC track. Note that, unlike the one with the DTS audio tracks, the default value you'll see here depends on the state of a checkbox and a drop-down list in Preferences. You'll see the same if you enable the "Convert AC3 Audio to AAC" checkbox in Preferences > Audio, annotated by a rectangle in the following screenshot:
Note that if you don't check in this checkbox, you'll see “Passthru” upon the next file opening. Before learning how to enable the AC3 → AAC conversion under Mountain Lion, make sure you see this in this dialog by either making sure the "Convert AC3 Audio to AAC" checkbox is disabled or you manually click “AAC – Dolby Pro Logic II” in the “Action” column and set it to “Passthru”. Then, no failing AC3 -> AAC conversion attempts (which, again, makes it necessary to manually overwrite a file in the file system, which will be later explained) will take place – the input AC3 track will be simply written to the output. (Alternatively, you can just disable the entire AC3 track by unticking the checkbox in the first row.)
Also note that, should you enable the "Convert AC3 Audio to AAC" checkbox, the item you select “Downmix audio to:” drop-down list directly under it will be listed in the Action column:
The screenshot above shows opening files with AC3 tracks with the downmixing default set to “Stereo” (and with the AAC conversion enabled, of course):
Again, you can always override the default setting by directly clicking the entry in the Info column – no need to change the setting in Preferences.
1.2.1 All in all,
if you install Perian only (and make sure you enable it in System Preferences), you'll be able to convert DTS tracks to AAC and also convert MKV files with AC3 audio track(s), assuming you only “passthru” them (or disable them entirely).
1.3 Now, for the AC3 -> AAC conversion part...
As I've already hinted on, should you want to convert your AC3 track(s) to AAC('s) instead of just “pass-thruing” them into the target MP4 file, AC3 support must be separately enabled under Mountain Lion – as opposed to earlier OS X versions.
To do this, copy the (decompressed) AC3 encoder file I've linked to in Section 1.1, A52Codec.component to ~/Library/Audio/Plug-Ins/Components. There won't be anything in that directory if you haven't installed Perian before. The directory should look like as follows after you've done copying:
Note that, in the screenshot, I've also right-clicked the directory name to show you the entire path – it's under my home directory (/Users/werner in this case).
Also note the date of the file I've annotated. The ML-compatible A52Codec.component will have a timestamp of Jul 27, 2012.
If you have installed Perian, it'll put its own version of A52Codec.component with the timestamp Jul 23, 2011 (it's based on these timestamps that you can easily know which version is currently installed):
You can safely overwrite this file.
Note that, when you, in System Preferences, disable Perian (if it's installed), A52Codec.component will be immediately removed, regardless of its source (Perian or the updated, ML-compliant, new file). In addition, when you (re-)enable Perian, it'll overwrite the updated A52Codec.component file. Therefore, it's always best to make sure you do copy back the newer (2012), ML-friendly file to the directory after re-enabling Perian. This can easily be done manually – or with a script if you write one.
(More info: http://forums.macrumors.com/showpost...1&postcount=10 )
|Dec 10, 2012, 10:49 AM||#4|
Oh man, now I feel bad I made you write such a nice tutorial. I know you can make Perian work, but there is this bug when a process, I forgot which one, hoggs your CPU, because it tries to generate thumbnails if I remember right. As long as Apple does not fix that, I can't use it. I had to kill that process every time and it just got annoying over time. Thanks for the write up though.
Macbook Air 13" | 1.8GHz | 4GB RAM | 128GB SSD
Time Capsule 2TB
Apple TV 3
|Dec 10, 2012, 12:21 PM||#5|
No problem - I just copied the most relevant part of my dedicated, earlier tutorial.
It it doesn't help / not related, just uncheck the chapter track while opening an MKV file. It, then, won't pass-thru chapters and, consequently, won't try to generate thumbnails for them either.
|Dec 10, 2012, 06:01 PM||#7|
I've tried putting the ffmpeg binary in ~/Library/Application Support/iFFmpeg (as is recommended by the homepage - the directory needs to be manually created) but it didn't help either.
I couldn't drag-and-drop the ffmpeg binary in the app either. (The homepage states it should work and the app would use that binary.)
I could find only one bug report on the issue ( http://www.logicielmac.com/logiciel/iffmpeg-877.html ) - without any solution.
I have ML.
|Dec 11, 2012, 03:23 AM||#9|
|Dec 11, 2012, 04:58 AM||#10|
EDIT: he has compiled a new version; it's working great on my Mac. Have already purchased a license.
Last edited by Menneisyys2; Dec 11, 2012 at 09:49 AM.
|Aug 5, 2013, 05:07 PM||#11|
That's the most comprehensive tutorial I've seen on this subject yet! Thanks.
Regarding remuxing MKV to MP4/M4V, though: No matter what process I use, I ALWAYS GET A VARIABLE FPS RATE in the MP4/M4V. I've tried using Subler, MP4Tools, FFMPEG, and MKV2M4V, but they all do it.
Using iMediaHUD, here's the H.264 stream data:
Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings, CABAC : Yes Format settings, ReFrames : 5 frames Codec ID : V_MPEG4/ISO/AVC Duration : 1h 43mn Bit rate : 3 376 Kbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 29.970 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.122 Stream size : 2.39 GiB (88%) Writing library : x264 core 105 r1732 2b04482 Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=2pass / mbtree=1 / bitrate=3376 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00 Language : English Default : No Forced : No
Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings, CABAC : Yes Format settings, ReFrames : 5 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 1h 43mn Bit rate : 3 376 Kbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 29.970 fps Minimum frame rate : 29.412 fps Maximum frame rate : 30.303 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.122 Stream size : 2.45 GiB (90%) Writing library : x264 core 105 r1732 2b04482 Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=2pass / mbtree=1 / bitrate=3376 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00 Language : English
Does this happen with anyone else?
|Aug 5, 2013, 08:36 PM||#12|
Our household has become increasingly Apple-centric, but my main server and Blu-ray ripper is a Windows PC. I use MakeMKV and then Plex Media Server, but I wouldn't mind spending a few extra minutes converting the MKV files to MP4/M4V files to make it even easier to serve them up to my iOS devices and Apple TV's. What software options are there on the Windows side? I would like something that would be capable of handling Blu-ray subtitle formats (I only care about forced subs). Thanks!
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Best MKV to MP4 converter for ML?||blast87||OS X 10.8 Mountain Lion||16||Jul 29, 2014 04:12 AM|
|Mkv to Mpg converter?||bobright||Mac Applications and Mac App Store||10||Dec 29, 2012 02:51 AM|
|Tutorial: adding an iOS-friendly (AAC) audio to your now-unplayable (AC3) MKV's||Menneisyys2||iPad Apps||1||Nov 25, 2012 07:53 PM|
|Can people keep & sell iDevices if Apple infringes a patent?||moonman239||Apple, Industry and Internet Discussion||2||Jul 11, 2012 01:47 AM|
All times are GMT -5. The time now is 12:50 AM.