Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

hpnas

macrumors member
Original poster
Mar 12, 2009
70
57
In anticipation of getting my new iPad I have been playing around with Subler and converting some existing MKVs into M4V format. I passthru the video and remux the audio to AAC 2 channel from AC3 or DTS.

I did notice that the resulting M4V is basically the same size as the original MKV. Is this correct and is this the best way to convert an MKV to an iPad friendly format without re-encoding (Handbrake)?
 

MonkeySee....

macrumors 68040
Sep 24, 2010
3,858
437
UK
Good post. I'm interested in this as i've spent ages converting MKV to M4v. Didin't realise I could just change the container. :eek:

Look forward to a response. :)
 

thenaes

macrumors member
Nov 20, 2011
55
0
It depends if the source file has AC3 or DTS -- if it is DTS the file will be a good bit smaller. If it is AC3 it won't be much smaller, only by a little bit. The only thing Subler does is re-encode the audio, it doesn't touch the video at all.

It is by far the best way to go from mkv > m4v without any loss in video quality.
 

AtomicEdge

macrumors regular
Mar 23, 2009
173
0
Yeah I agree with MonkeySee about the MKV conversion. On my MacMini which I use for converting and as a media server, it can take about 50 minutes to convert a 720p TV episode. How is it that the ATV3 has got everyone talking about this Subler, but in all my searching before I have never stumbled into it?!

I will try it out tonight.
 

MonkeySee....

macrumors 68040
Sep 24, 2010
3,858
437
UK
Doesn't that depend somewhat on what is in the original MKV?

B

I'm not sure? I read on another thread that someone ran it through subler? What nornmally takes me a good hour should take a few minutes.

I have no idea though. :eek:
 

AtomicEdge

macrumors regular
Mar 23, 2009
173
0
I'm not sure? I read on another thread that someone ran it through subler? What nornmally takes me a good hour should take a few minutes.

I have no idea though. :eek:

It has to be x264 encoded video inside the mkv container I believe. I think this is pretty common.
 

khollister

macrumors 6502a
Feb 1, 2003
541
39
Orlando, FL
It has to be x264 encoded video inside the mkv container I believe. I think this is pretty common.

If your MKV's are blu-ray rips, the video stream can be one of 3 formats
  1. MPEG2
  2. VC-1
  3. AVC (i.e. H.264)

While most new BD's are using AVC, many older titles are MPEG2 or VC-1 which must be transcoded to H.264.

Also, you are not going to want to just remux a full BD MKV (20-30GB) for iPad use. You will something like Handbrake, iFlicks or iVI to handle that.
 

khollister

macrumors 6502a
Feb 1, 2003
541
39
Orlando, FL
Yeah I agree with MonkeySee about the MKV conversion. On my MacMini which I use for converting and as a media server, it can take about 50 minutes to convert a 720p TV episode. How is it that the ATV3 has got everyone talking about this Subler, but in all my searching before I have never stumbled into it?!

I will try it out tonight.

The reason ATV3 has people talking about muxing using things like Subler and MP4Tools is due to it being 1080p and there being a lot of blu-ray rips in MKV containers in people's libraries. When the ATV was 720, most everything had to be transcoded, so the talk was mostly about Handbrake and such.

It also helps that much of the blu-ray video content is already in H.264 format and is therefore compatible.

Be aware that ATV (whatever the version) only plays AC3 (Dolby Digital) or stereo (AAC). DTS material, whether DTSMA-HD or lossy DTS core must be transcoded to AC3 for ATV playback. Not all of the remuxing tools can do that.

Both MP4 (aka m4v) and MKV are containers that can contain video and audio streams with various codecs. MKV is universal - there are no practical limits on what codecs can be encapsulated. MP4 is more specific, and Apple's support of MP4/m4v is far more restrictive, especially on ATV.

Muxing is the process of assembling streams inside of a container. Transcoding is the conversion of streams to a different codec. Muxing is much faster than transcoding. I have a 6-core MacPro; I can remux a BD MKV in 10-15 minutes. Transcoding a full BD MKV takes 2-4 hours
 

mic j

macrumors 68030
Mar 15, 2012
2,664
156
Subler conversion problem

I have been trying to convert a BD mkv to m4v using Subler (v.15) but I keep getting an error (Audio Converter could not initialize). The audio tracks are TrueHD and 3+2/1. Anyone have any suggestions on what to do?
 

MiamiBourne

macrumors regular
Jan 26, 2009
172
32
Audio Converter error as well...

I have been trying to convert a BD mkv to m4v using Subler (v.15) but I keep getting an error (Audio Converter could not initialize). The audio tracks are TrueHD and 3+2/1. Anyone have any suggestions on what to do?

I'm getting the same error. Could it be because the video ripped from the BluRay (The Matrix) is VC-1 instead of h264?
 

unobtainium

macrumors 68030
Mar 27, 2011
2,614
3,883
I'm getting the same error. Could it be because the video ripped from the BluRay (The Matrix) is VC-1 instead of h264?

Are either of you using Mountain Lion? I can't get either MP4Tools or Subler to work in the developer preview. Keep throwing up error messages about audio conversion.
 

mic j

macrumors 68030
Mar 15, 2012
2,664
156
Are either of you using Mountain Lion? I can't get either MP4Tools or Subler to work in the developer preview. Keep throwing up error messages about audio conversion.

Not using ML. I stopped trying to do this and just went ahead and transcoded everything.
 

Mackan

macrumors 65816
Sep 16, 2007
1,427
96
If you want consistency, making sure all your movies will play on the iPad, then re-encoding them with Handbrake is probably best even if takes longer time.

It's true that you can switch container via subler, but there are no guarantees that all them will play well on the iPad. It depends on the encoding settings for each movie, which may vary.

I have found that the image degradation is negligible after converting with Handbrake. Using the constant quality setting with variable frame rate also reduces the file size a lot, which I value.

I do use other programs than Handbrake and Subler to handle audio conversion, though.
 

mic j

macrumors 68030
Mar 15, 2012
2,664
156
If you want consistency, making sure all your movies will play on the iPad, then re-encoding them with Handbrake is probably best even if takes longer time.

It's true that you can switch container via subler, but there are no guarantees that all them will play well on the iPad. It depends on the encoding settings for each movie, which may vary.

I have found that the image degradation is negligible after converting with Handbrake. Using the constant quality setting with variable frame rate also reduces the file size a lot, which I value.

I do use other programs than Handbrake and Subler to handle audio conversion, though.
I agree with you on the playability. I just had too many re-containerized files that would not play. Just wasn't worth the hassle for the quality improvement (which I could not really see anyway).

Would you elaborate on your audio conversion process?
 

Mackan

macrumors 65816
Sep 16, 2007
1,427
96
I agree with you on the playability. I just had too many re-containerized files that would not play. Just wasn't worth the hassle for the quality improvement (which I could not really see anyway).

Would you elaborate on your audio conversion process?

Sure. I discovered that both Subler and Handbrake aren't doing a great job when it comes to audio conversion. And you have very crude audio settings to chose from.

For example, when having a 5.1 AC3/DTS track, you can let Handbrake downmix it to a stereo track. You can chose normal stereo, or Dolby Pro Logic II, etc. However, the downmix matrices are not documented anywhere. I had a look at a downmixed 2 channel DPLII track, and it had severe clipping. It seemed like the downmix matrix was not normalized, or something else was bad. In either way, I can't take the risk of having Handbrake produce severely clipped stereo tracks that sound horrible to listen to. Also, the volume of the tracks are usually too low. You can control this via the gain function, and also apply some dynamic compression. However, both options are too crude and are a gamble, today. Gain function doesn't seem to take into account clipping, and there is no normalization function.

My problem with Subler is similar. No real documentation, too crude settings, and several failures of channel mappings when going from a 5.1 track to 2 channel track. I simply cannot use software that don't produce reliable results, because it's quite tedious having to doublecheck the results after each conversion.

With that said, both programs are of course excellent. It's just that they lack precision and quality I need when it comes to audio conversion.

So what I do instead, is to use ffmpeg to extract the AC3/DTS track from my MKV, and let it uncompress to a .caf file (which supports larger 2GB file size). Having the .caf file, I downmix it with Sox, using a well working stereo downmix matrix, that is normalized.

After having the downmixed .caf file, I open it up in Audacity, and apply desired dynamic compression, and amplification of the track to reach a good volume. Finally, I produce a playable .aac track via the afconvert utility. Then I mux the videostream (from Handbrake) and the .aac track together with Subler, adding subtitles, chapters, artwork. I also use another program to produce an additional AC3 track from DTS, which I also just mux with Subler.

While the above process gives me what I want, it would of course be more convenient to just use one program like Handbrake to achieve everything. But for audio conversion, it not reliable for me, yet.
 

mic j

macrumors 68030
Mar 15, 2012
2,664
156
Sure. I discovered that both Subler and Handbrake aren't doing a great job when it comes to audio conversion. And you have very crude audio settings to chose from.

For example, when having a 5.1 AC3/DTS track, you can let Handbrake downmix it to a stereo track. You can chose normal stereo, or Dolby Pro Logic II, etc. However, the downmix matrices are not documented anywhere. I had a look at a downmixed 2 channel DPLII track, and it had severe clipping. It seemed like the downmix matrix was not normalized, or something else was bad. In either way, I can't take the risk of having Handbrake produce severely clipped stereo tracks that sound horrible to listen to. Also, the volume of the tracks are usually too low. You can control this via the gain function, and also apply some dynamic compression. However, both options are too crude and are a gamble, today. Gain function doesn't seem to take into account clipping, and there is no normalization function.

My problem with Subler is similar. No real documentation, too crude settings, and several failures of channel mappings when going from a 5.1 track to 2 channel track. I simply cannot use software that don't produce reliable results, because it's quite tedious having to doublecheck the results after each conversion.

With that said, both programs are of course excellent. It's just that they lack precision and quality I need when it comes to audio conversion.

So what I do instead, is to use ffmpeg to extract the AC3/DTS track from my MKV, and let it uncompress to a .caf file (which supports larger 2GB file size). Having the .caf file, I downmix it with Sox, using a well working stereo downmix matrix, that is normalized.

After having the downmixed .caf file, I open it up in Audacity, and apply desired dynamic compression, and amplification of the track to reach a good volume. Finally, I produce a playable .aac track via the afconvert utility. Then I mux the videostream (from Handbrake) and the .aac track together with Subler, adding subtitles, chapters, artwork. I also use another program to produce an additional AC3 track from DTS, which I also just mux with Subler.

While the above process gives me what I want, it would of course be more convenient to just use one program like Handbrake to achieve everything. But for audio conversion, it not reliable for me, yet.

Thanks for that info. That's quite a process!
 

spacepower7

macrumors 68000
May 6, 2004
1,509
1
The subler documentation/wiki is confusing when it comes to alternative groups or fall back tracks..... Both audio and subtitles. Most of my experience works 90% of the time.

But......

I have some movies tha have 2 channel AAC and 5.1 AAC and sometimes QuickTime and iTunes play both sound mixes at once which sounds bad.

I'd be willing to make a screencast if someone could explain it.

Another question, will the AppleTV send 5.1 AAC over HDMI to a compatible receiver or is it downmixing to 2 channel PCM or 2 channel dongle PLII?
 

NiklasK

macrumors member
Aug 18, 2008
55
0
Sweden
Sorry if this is called as hijacking of this thread but I+m having some issues understanding the process of repacking a file using Subler. I have previously used MKVTools and iFlicks that do similar things. Unfortunately I cant seem to understand the workflow of using subler. For example what do I do if there is a mkv file with dts track and I want to remux the video, re encode the dts track to a AC3 track and a AAC 2-channel track?

The way it automatically adds metadata is a nice bonus but is there any roadmaps on any plans on including chaptername fetching from tagchip etc..?
 

mic j

macrumors 68030
Mar 15, 2012
2,664
156
Sorry if this is called as hijacking of this thread but I+m having some issues understanding the process of repacking a file using Subler. I have previously used MKVTools and iFlicks that do similar things. Unfortunately I cant seem to understand the workflow of using subler. For example what do I do if there is a mkv file with dts track and I want to remux the video, re encode the dts track to a AC3 track and a AAC 2-channel track?

The way it automatically adds metadata is a nice bonus but is there any roadmaps on any plans on including chaptername fetching from tagchip etc..?
IMO, MKVTools is a much better choice when audio conversion is needed.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.