Remux Handbraked mkv's to m4v container

Discussion in 'Digital Video' started by bedifferent, Jan 29, 2013.

  1. macrumors 603

    bedifferent

    Joined:
    Jan 8, 2009
    Location:
    NY
    #1
    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. :)
     
  2. Guest

    ppc_michael

    Joined:
    Apr 26, 2005
    Location:
    Los Angeles, CA
    #2
    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).
     
  3. macrumors 6502

    Joined:
    Nov 28, 2011
    Location:
    Stuttgart, Germany
    #3
    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!
     
  4. thread starter macrumors 603

    bedifferent

    Joined:
    Jan 8, 2009
    Location:
    NY
    #4
    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.
     
  5. macrumors 6502

    Joined:
    Nov 28, 2011
    Location:
    Stuttgart, Germany
    #5
    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.
     
  6. thread starter macrumors 603

    bedifferent

    Joined:
    Jan 8, 2009
    Location:
    NY
    #6
    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 ;)
     
  7. macrumors 6502

    Joined:
    Nov 28, 2011
    Location:
    Stuttgart, Germany
    #7
    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.
     
  8. thread starter macrumors 603

    bedifferent

    Joined:
    Jan 8, 2009
    Location:
    NY
    #8
    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 Files:

  9. macrumors 603

    Joined:
    Jun 7, 2011
    #9
    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.
     
  10. macrumors 6502

    Joined:
    Nov 28, 2011
    Location:
    Stuttgart, Germany
    #10
    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! :)
     
  11. thread starter macrumors 603

    bedifferent

    Joined:
    Jan 8, 2009
    Location:
    NY
    #11
    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.

    ----------

    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!
     
  12. macrumors 603

    Joined:
    Jun 7, 2011
    #12
    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.
     
  13. thread starter macrumors 603

    bedifferent

    Joined:
    Jan 8, 2009
    Location:
    NY
    #13
    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 :)
     
  14. macrumors 603

    Joined:
    Jun 7, 2011
    #14
    3,2,2 is the latest, released early January.
     
  15. bedifferent, Jan 30, 2013
    Last edited: Jan 30, 2013

    thread starter macrumors 603

    bedifferent

    Joined:
    Jan 8, 2009
    Location:
    NY
    #15
    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:

     
  16. macrumors 603

    Joined:
    Jun 7, 2011
    #16
    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.
     
  17. thread starter macrumors 603

    bedifferent

    Joined:
    Jan 8, 2009
    Location:
    NY
    #17
    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 Files:

  18. macrumors 603

    Joined:
    Jun 7, 2011
    #18
    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.
     
  19. bedifferent, Jan 30, 2013
    Last edited: Jan 30, 2013

    thread starter macrumors 603

    bedifferent

    Joined:
    Jan 8, 2009
    Location:
    NY
    #19
    Awesome. Trying it out now, sorry for my confusion, multi-tasking a ****load and being blond isn't helping :p

    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 Files:

  20. thread starter macrumors 603

    bedifferent

    Joined:
    Jan 8, 2009
    Location:
    NY
    #20
    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. :)
     

Share This Page