Go Back   MacRumors Forums > Special Interests > Visual Media > Digital Video

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 29, 2013, 12:30 PM   #1
bedifferent
Guest
 
Join Date: Jan 2009
Location: NY
Remux Handbraked mkv's to m4v container

I spent 1-2 years learning everything I could in order to digitize all my DVD's. My goal was to obtain the best quality and ditch the discs. As I have a 12-Core Mac Pro with 32GB RAM, I tweaked handbrake with various rips until I had the perfect presets and let 'er rip. At the time, DTS sound, etc were only supported in MKV containers via Handbrake. Now, I need to remux those Blu-Ray encodes to M4V (shame I didn't wait for new Handbrake nightlies with DTS in m4v support, oh well).

Since these are Blu-Ray encodes, I have multiple audio tracks (1 - Stereo 2 - DTS or AC3 - 3+ for directors commentary's/etc). As I understand, remuxing simply passing the data to a new container, ex mkv-m4v. I'm concerned as Subler does not appear to handle passthru for DTS or other high end encodes (could be wrong now), and the few times I tried Subler it couldn't handle multiple audio tracks.

I only have a few to remux, if re-encoding is the only way to ensure everything is passed through, I'll do it, but I hate to re-encode when a remux passthru would make most sense. Aside from Subler, any other apps that may work?

Thanks everyone! Greatly appreciate it. I'll check out the latest Subler beta in the meantime and read some more threads.
bedifferent is offline   0 Reply With Quote
Old Jan 29, 2013, 09:33 PM   #2
ppc_michael
Guest
 
Join Date: Apr 2005
Location: Los Angeles, CA
Send a message via AIM to ppc_michael
It is my understanding that M4V allows for only AAC or AC3 audio, which may be the problem. If you have DTS streams (or others like PCM or MP3), they will need to be transcoded before you mux them in.

As far as muxing goes, I use ffmpeg for that. In its purest form, it is a command line application, but there are several GUI wrappers available. You can also use ffmpeg to convert your audio to AAC or AC3 all in the same go, but typically I have been unhappy with ffmpeg's audio compression and I usually do it with a separate encoder (such as neroaacenc).
ppc_michael is offline   0 Reply With Quote
Old Jan 30, 2013, 02:02 AM   #3
floh
macrumors 6502
 
Join Date: Nov 2011
Location: Stuttgart, Germany
Same here, I use ffmpeg for remuxing. And I also think that m4v does not support DTS. Why do you need m4v? It's a very Apple format and mostly used for iTunes, without much application aside. It is essentially a stripped down ".mp4" container, and I would recommend you to use the latter because of its high flexibility.

The GUI wrappers for ffmpeg are mostly not very userfriendly, with few exceptions (Handbrake is one of them). I actually programmed a GUI that does exactly what you are looking for: Remux data streams (with ffmpeg) into a new container without reencoding anything:
http://sourceforge.net/projects/containerswitch/

You can just try of it works on your files. It does not support .m4v as output container, but if you need it I can quickly add it.

Good luck!
floh is offline   0 Reply With Quote
Old Jan 30, 2013, 10:18 AM   #4
bedifferent
Thread Starter
Guest
 
Join Date: Jan 2009
Location: NY
Handbrake has been able to use DTS and DTS-HD/MA passthru in M4V containers for a while now. I used MKV containers as it didn't when I digitized my media last year. I would rather not re-encode via Handbrake to maintain those codecs/tracks, but it seems I may have no choice. Subler and MP4Tools do handle DTS, I tried it yesterday. However, I have 3-5 tracks in my Blu-Ray encodes, the first being stereo for iOS devices (which play fine through VLC on my iPad), the second being full DTS or AC3 surround sound, and the following any additional commentaries I wish to preserve. Both app's had difficulty remuxing more than one audio track.

I have a 2012 Mac Mini as my HTPC, attached to a Pioneer Elite AVR with B&W speaks. Handbrake allowed me to shrink down a ~50GB Blu-Ray to ~8-10 GB's depending. I compared my encodes to source material, and they're frakin' unreal. Granted it takes 4-8 hours on my 12-Core Pro, but definitely worth it.

So it seems I'll have to Handbrake them.
bedifferent is offline   0 Reply With Quote
Old Jan 30, 2013, 10:32 AM   #5
floh
macrumors 6502
 
Join Date: Nov 2011
Location: Stuttgart, Germany
Quote:
Originally Posted by bedifferent View Post
So it seems I'll have to Handbrake them.
Ah, there's got to be a better way if you already have them in such great quality! Have you tried if the remuxing with multiple audio tracks works with my little ffmpeg-frontend? It should in my opinion... I don't wanna invest the time for nothing, but if you can create an .mp4 container that does what you want, I will gladly add the .m4v option within an hour or so. Just give me a heads-up...

You can also directly try ffmpeg on the console if you are familiar with that.
floh is offline   1 Reply With Quote
Old Jan 30, 2013, 10:34 AM   #6
bedifferent
Thread Starter
Guest
 
Join Date: Jan 2009
Location: NY
Quote:
Originally Posted by floh View Post
Ah, there's got to be a better way if you already have them in such great quality! Have you tried if the remuxing with multiple audio tracks works with my little ffmpeg-frontend? It should in my opinion... I don't wanna invest the time for nothing, but if you can create an .mp4 container that does what you want, I will gladly add the .m4v option within an hour or so. Just give me a heads-up...

You can also directly try ffmpeg on the console if you are familiar with that.
Wow, thanks so much, you didn't have to go to all the trouble. I re-encoded a 18GB MKV of "Dark City", you should see my handbrake string lol. Took 7 hours, but quality is on par. I would be in your debt if this saves me time and maintains quality. I'll give it a go now. Thanks so much man!

PS I miss Germany, I'm so jealous. If you're adopting... lol
bedifferent is offline   0 Reply With Quote
Old Jan 30, 2013, 10:40 AM   #7
floh
macrumors 6502
 
Join Date: Nov 2011
Location: Stuttgart, Germany
Quote:
Originally Posted by bedifferent View Post
PS I miss Germany, I'm so jealous. If you're adopting... lol
Nah, my own kid is 4 months old and all I can take at the moment. Although very cute.

By the way: .m4v is really the same thing as .mp4, just with a different name, so you could even try just renaming the .mp4 file after conversion. The MPEG group intended only the .mp4 file extension for the container, but Apple wanted some further destinction and introduced .m4v for video, .m4a for audio, .m4p for DRM-protected files and a couple more... But there is just an .mp4 container in there.
floh is offline   1 Reply With Quote
Old Jan 30, 2013, 10:48 AM   #8
bedifferent
Thread Starter
Guest
 
Join Date: Jan 2009
Location: NY
Quote:
Originally Posted by floh View Post
Nah, my own kid is 4 months old and all I can take at the moment. Although very cute.

By the way: .m4v is really the same thing as .mp4, just with a different name, so you could even try just renaming the .mp4 file after conversion. The MPEG group intended only the .mp4 file extension for the container, but Apple wanted some further destinction and introduced .m4v for video, .m4a for audio, .m4p for DRM-protected files and a couple more... But there is just an .mp4 container in there.
I'm sure he's a (cute) handful

Yeah I always post M4V although I often wonder if I should just use MP4.

So I did it, the video is exactly the same - only issue, it passed only one of five audio tracks. Thankfully it was the DTS track. I can live with it. Remuxed an 18GB mkv in seconds! You are the best! Watching it now through VLC, checked to make sure only one audio track was available.

Attached captures of the media information while in VLC. The first two are from the original MKV, the second from the remuxed MP4.
Attached Thumbnails
Click image for larger version

Name:	Media Information 2.jpg
Views:	20
Size:	67.6 KB
ID:	393586   Click image for larger version

Name:	Media Information.jpg
Views:	19
Size:	65.3 KB
ID:	393587   Click image for larger version

Name:	Screen Shot 2013-01-30 at 10.49.06 AM.jpg
Views:	17
Size:	48.5 KB
ID:	393588  

bedifferent is offline   0 Reply With Quote
Old Jan 30, 2013, 10:55 AM   #9
Menneisyys2
macrumors 603
 
Join Date: Jun 2011
Quote:
Originally Posted by bedifferent View Post
I'm sure he's a (cute) handful

Yeah I always post M4V although I often wonder if I should just use MP4.

So I did it, the video is exactly the same - only issue, it passed only one of five audio tracks.
1. You can always enable all audio tracks to be passed thru in Subler - just enable their checkboxes after loading them.

2. There are several alternatives; the best of them is MP4Tools, which has some advantages over Subler; most importantly, it's able to both passthru an AC3 track AND create an AAC one of it at the same time. Also, it has more advanced track deleting / extracting / importing capabilities.
Menneisyys2 is offline   1 Reply With Quote
Old Jan 30, 2013, 10:57 AM   #10
floh
macrumors 6502
 
Join Date: Nov 2011
Location: Stuttgart, Germany
I'm sorry you didn't get all the audio tracks. In theory, it should have worked. I will have a closer looks at this soon and let you know if I found a fixable problem. I don't know if I ever tested the tool on a file with more than one audio track, I definitely should have...

BTW: I just came back from New Zealand. Now that's a country to be jealous of!
floh is offline   1 Reply With Quote
Old Jan 30, 2013, 11:04 AM   #11
bedifferent
Thread Starter
Guest
 
Join Date: Jan 2009
Location: NY
Quote:
Originally Posted by Menneisyys2 View Post
1. You can always enable all audio tracks to be passed thru in Subler - just enable their checkboxes after loading them.

2. There are several alternatives; the best of them is MP4Tools, which has some advantages over Subler; most importantly, it's able to both passthru an AC3 track AND create an AAC one of it at the same time. Also, it has more advanced track deleting / extracting / importing capabilities.
See my post (#4), I tried each, for some reason even the beta Subler does not handle multiple DTS tracks well. Kept placing a commentary track as the default track no matter what I did

Same goes for MP4Tools (got the full "suite" when MKVTools 2 split off into other apps). Actually, it crashed on every MKV encode I tried. Bummer.

----------

Quote:
Originally Posted by floh View Post
I'm sorry you didn't get all the audio tracks. In theory, it should have worked. I will have a closer looks at this soon and let you know if I found a fixable problem. I don't know if I ever tested the tool on a file with more than one audio track, I definitely should have...

BTW: I just came back from New Zealand. Now that's a country to be jealous of!
No reason to be sorry mate! This is perfect for now. I was able to get the right audio track as default, so worse comes to worse, I have the video and main audio track in the MP4. Life saver.

Is there anything I need to install backend wise?

New Zealand, I've been wanting to go. I've been to Australia many times, and was so close. I've been lucky in life, having grown up in the UK, spent much of my childhood traveling through Europe. Thankfully I get back a few weeks a year. So many friends have moved to UK/EU, I'm this close.

By the way, thanks again everyone for helping! These forums are the main reason I'm here, and enjoy helping others, we all started some where. Thanks again!
bedifferent is offline   0 Reply With Quote
Old Jan 30, 2013, 11:08 AM   #12
Menneisyys2
macrumors 603
 
Join Date: Jun 2011
Quote:
Originally Posted by bedifferent View Post
Same goes for MP4Tools (got the full "suite" when MKVTools 2 split off into other apps). Actually, it crashed on every MKV encode I tried.
Are you sure you used the latest version? The previous versions (up to Nov / 2012) were completely different from the current one (and the betas of the latter I've been using since last Summer). The old MP4Tools indeed crashed a lot. The new series is far better - I haven't ever encountered any crash with it.
Menneisyys2 is offline   0 Reply With Quote
Old Jan 30, 2013, 11:10 AM   #13
bedifferent
Thread Starter
Guest
 
Join Date: Jan 2009
Location: NY
Quote:
Originally Posted by Menneisyys2 View Post
Are you sure you used the latest version? The previous versions (up to Nov / 2012) were completely different from the current one (and the betas of the latter I've been using since last Summer). The old MP4Tools indeed crashed a lot. The new series is far better - I haven't ever encountered any crash with it.
Thanks! Just checked, I have Version 3.1.4 (3.1.4). I believe I downloaded the current version. I'll check again.

Thanks again
bedifferent is offline   0 Reply With Quote
Old Jan 30, 2013, 11:27 AM   #14
Menneisyys2
macrumors 603
 
Join Date: Jun 2011
Quote:
Originally Posted by bedifferent View Post
Thanks! Just checked, I have Version 3.1.4 (3.1.4). I believe I downloaded the current version. I'll check again.

Thanks again
3,2,2 is the latest, released early January.
Menneisyys2 is offline   0 Reply With Quote
Old Jan 30, 2013, 11:32 AM   #15
bedifferent
Thread Starter
Guest
 
Join Date: Jan 2009
Location: NY
Quote:
Originally Posted by Menneisyys2 View Post
3,2,2 is the latest, released early January.
Doh! How did I miss that? Been in a meeting, will check now. Thanks!

Update: Found 3.2.4 - 1/28/13 just out, trying it now

tried it, I get this error message in red:

Quote:
MP4tools can only edit the tracks of MP4 or M4V videos.

Last edited by bedifferent; Jan 30, 2013 at 11:58 AM.
bedifferent is offline   0 Reply With Quote
Old Jan 30, 2013, 04:23 PM   #16
Menneisyys2
macrumors 603
 
Join Date: Jun 2011
Quote:
Originally Posted by bedifferent View Post
Doh! How did I miss that? Been in a meeting, will check now. Thanks!

Update: Found 3.2.4 - 1/28/13 just out, trying it now

tried it, I get this error message in red:
Yup, editing - but it can also remux MKV's to M4V's. If you want to edit the tracks of MKV's but keeping them as MKV's, use MKVTools from the same dev.

Also, for plain MKV track deletion / addition (but not in-app audio transcoding!), I love the free Mkvtoolnix.
Menneisyys2 is offline   0 Reply With Quote
Old Jan 30, 2013, 04:26 PM   #17
bedifferent
Thread Starter
Guest
 
Join Date: Jan 2009
Location: NY
Quote:
Originally Posted by Menneisyys2 View Post
Yup, editing - but it can also remux MKV's to M4V's. If you want to edit the tracks of MKV's but keeping them as MKV's, use MKVTools from the same dev.

Also, for plain MKV track deletion / addition (but not in-app audio transcoding!), I love the free Mkvtoolnix.
Hmmm, ok. When I open the mkv I receive this error:

(also have MKVToolNix, didn't know it can remux MKV to MP4/M4V)
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2013-01-30 at 4.25.33 PM.jpg
Views:	15
Size:	27.8 KB
ID:	393641  
bedifferent is offline   0 Reply With Quote
Old Jan 30, 2013, 06:29 PM   #18
Menneisyys2
macrumors 603
 
Join Date: Jun 2011
Quote:
Originally Posted by bedifferent View Post
Hmmm, ok. When I open the mkv I receive this error:
That's because you're in the second or third tab (Edit Tracks / Edit Files) and not the first ("MP4"). Switch back to the first and try reopening / dragging the MKV file. It WILL work.

Quote:
(also have MKVToolNix, didn't know it can remux MKV to MP4/M4V)
It can't remux MKV's to MP4/M4V, it's "only" an excellent track editor / splitter. For example, it's the only tool to add a (VobSub) IDX file to an MKV file - something MKVTools isn't capable of.
Menneisyys2 is offline   0 Reply With Quote
Old Jan 30, 2013, 11:34 PM   #19
bedifferent
Thread Starter
Guest
 
Join Date: Jan 2009
Location: NY
Quote:
Originally Posted by Menneisyys2 View Post
That's because you're in the second or third tab (Edit Tracks / Edit Files) and not the first ("MP4"). Switch back to the first and try reopening / dragging the MKV file. It WILL work.



It can't remux MKV's to MP4/M4V, it's "only" an excellent track editor / splitter. For example, it's the only tool to add a (VobSub) IDX file to an MKV file - something MKVTools isn't capable of.
Awesome. Trying it out now, sorry for my confusion, multi-tasking a ****load and being blond isn't helping

Ok, so I'm in the MP4 tab, and I see the attached window. Do I check all the boxes for video, audio tracks, subtitles, making sure it is "passthru", then save it? The "pass thru" is in red which according to the app says it is not recommended.
Attached Thumbnails
Click image for larger version

Name:	MP4tools.png
Views:	82
Size:	105.2 KB
ID:	393705  

Last edited by bedifferent; Jan 30, 2013 at 11:44 PM.
bedifferent is offline   0 Reply With Quote
Old Jan 31, 2013, 12:13 AM   #20
bedifferent
Thread Starter
Guest
 
Join Date: Jan 2009
Location: NY
It worked! Got an m4v file with all the tracks and perfect quality. Thanks so much!!! Gonna pay for MP4Tools, definitely the way to go.
bedifferent is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Digital Video

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
How many ac-3 tracks in m4v container? Number6 Apple TV and Home Theater 10 Dec 12, 2013 02:14 AM
iPad 3 - MKV to MP4 remux (not re-coding) rumpelstilzchen iPad 33 Feb 19, 2013 09:40 AM
MKV to M4V Container Change mic j Apple TV and Home Theater 32 Nov 28, 2012 06:53 AM
Remux mkv to mp4 - how long? digitaldave Apple TV and Home Theater 2 Nov 2, 2012 02:10 AM
How do you remux M4V to MKV? Jim.R Apple TV and Home Theater 12 Oct 29, 2012 05:30 AM

Forum Jump

All times are GMT -5. The time now is 06:51 PM.

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

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