View Full Version : MeGUI: Extract audio/video tracks from M4V container?
TECK
13th February 2012, 01:24
Hi,
I have a .m4v file that I would like to convert it into .mkv with MeGUI. My goal is to be able to extract also the audio/video tracks, if possible. I tried the AVS Script Creator with OneClick Encoder and it works "fairly" well.
The only confusing part is the forced audio/video encoding? I specifically select to don't encode the video or audio. Yet, the process goes to the regular steps and shows the encoding audio/video screen? Encoding the video takes the normal 1 hour elapsed time, completely ignoring my option to don't encode the video.
Is there an easier way to convert the file to an MKV container, without any encoding done to tracks?
I also tried XMedia Recode and I was able to convert the m4v file into a MKV container in about 30 seconds. Next, I extracted the tracks with MeGUI, encoded the AC3 track to the bitrate I was looking for and remuxed everything nice to a MKV container. My goal is to use MeGUI only and skip the converting steps done with XMedia.
What I don't like about XMedia is that even if I select to copy the video track, it does something to it and lowers the bitrate value from 4032 to 3947. Not sure what exactly is lost but normally when I extract a track nothing is changed to it.
The ideal solution will be to have a way extracting the audio and video tracks from the M4V container. From there, I can do whatever I want with the tracks in MeGUI.
TECK
13th February 2012, 06:04
Some update: I just tried FFCoder v1.3.0.3 and it extracts perfectly the audio and video tracks from a M4V container. If this tool has the capacity to do it in seconds, I'm sure MeGUI can do it also. Can you please let me know what are the right steps to extract the tracks in MeGUI?
I noticed that FFCoder also loses a little bit of video bitrate, but is less than XMedia Recode.
hello_hello
15th February 2012, 11:37
I find the most handy tool for working with MKV files is MKVMergeGUI which is part of MKVToolNix (http://www.bunkus.org/videotools/mkvtoolnix/). It'll remux most of the common file types (MP4, M4V, AVI etc) into MKVs without any quality loss.
Once you have the video and audio in an MKV container, MKVCleaver (http://www.videohelp.com/tools/MKVcleaver) can extract the individual streams. If you use it to extract the audio for example, then convert it to the desired format using MeGUI or another converter (I use foobar2000 quite a bit myself) you can then use MKVMergeGUI to add the new audio track while deleting the original audio and saving the output as a new MKV. That sort of thing....
MeGUI does have it's own muxers (no re-encoding). You'll find them under the Tools menu. The HD Streams Extractor is also there, which is a GUI for eac3to (http://forum.doom9.org/showthread.php?t=125966), a common tool used for audio re-encoding and extracting, amongst other things. They may not natively work with M4V files, but simply changing the extension to MP4 instead of M4V should fix that.
MeGUI's main "Input" tab lets you encode only audio, only video or both etc. Each has a separate Queue button for adding them individually to the job queue. To encode the video only and use existing audio you'd make sure the Audio Input section is empty, setup the video encode, then use the AutoEncode button which allows you to add existing audio before the encoding job is added to the queue. There's lots of ways to do it. I've never used the One Click encoder myself so I've no idea what it will or won't do. A quick look seems to indicate it does have a "don't encode" option for the video. If it's not working maybe it's a bug. You could report it here (http://forum.doom9.org/showthread.php?t=151159).
Personally I use MKVMergeGUI and MKVCleaver a lot for remuxing and extracting streams. Not because they're any better than using MeGUI for the job (in fact MeGUI uses MKVToolNix) but because I find it more convenient. I stick shortcuts to the programs in the Windows Sendto folder, so that way if I want to (for example) remux an MP4 as an MKV, I can just right click on it and select SendTo-MKVMergeGUI.
I noticed that FFCoder also loses a little bit of video bitrate, but is less than XMedia Recode.
If FFCoder (I don't know anything about it) is just remuxing the streams and not re-encoding, the bitrate, quality should remain unchanged. How are you determining the bitrate is slightly different?
TECK
15th February 2012, 12:53
You mean that you drop the M4V file into MKVMerge GUI and mux it to MKV container?
From what I know, it will convert the file but only save the audio, not video. I'm not sure you understand what I asked. All I need to know is how to extract the audio/video tracks from a M4V container with MeGUI or if I can convert a M4V file into MKV using MeGUI. Please let me know the exact steps you do for the conversion. No need to go in detail, I'm very familiar with MeGUI.
Edit: The mmg.exe file is present into MeGUI, you don't need to download it separately. I use it all the time to fix the muxed MKV files produced by MeGUI. I check the bitrate/media with MediaInfo.
hello_hello
16th February 2012, 04:45
You mean that you drop the M4V file into MKVMerge GUI and mux it to MKV container?
Yes.
From what I know, it will convert the file but only save the audio, not video. I'm not sure you understand what I asked.
It'll remux both audio and video. I use MKVMergGUI to remux AVI, MP4 and M4V files as MKVs quite regularly. It might pay to check the output file extension is MKV and not MKA.
All I need to know is how to extract the audio/video tracks from a M4V container with MeGUI or if I can convert a M4V file into MKV using MeGUI. Please let me know the exact steps you do for the conversion. No need to go in detail, I'm very familiar with MeGUI.
Personally I'd use MKVYoolNix/MKVMergeGUI as it seems more reliable and it's more versatile. I just remuxed a test m4v file containing two audio streams with MKVMergeGUI without a problem.
I then tried it using MeGUI's Adaptive Muxer (Tools-Muxers) as it seems to be the only one which will open M4V files, but it gave me an error. So I changed the extension to MP4 and tried MEGUI's MKV Muxer. It opened the MP4(M4V) file and allowed me to use it for both the video and audio input and resaved it as an MKV but unfortunately didn't allow me to choose which audio stream to include. Once it'd resaved it as an MKV file though, MeGUI's HD Streams Extractor (from the tools menu) could then open it and extract the video and audio.
Edit: The mmg.exe file is present into MeGUI, you don't need to download it separately. I use it all the time to fix the muxed MKV files produced by MeGUI. I check the bitrate/media with MediaInfo.
So it is, I'd never notice MKVMergeGUI was also included. Mind you I don't mind having it installed twice. I just checked and MeGUI is still using a slightly older version of MKVToolNix than current.
I'm not sure I'd take anything MediaInfo says as gospel. If you know you're only remuxing the streams and not converting, there's no reason why they should change at all. In fact I'm not sure there's any way they could..... Unless a particular muxer cuts off one stream if there's two of different lengths. VirtualDub cuts the audio to match the video by default, and if you include a negative audio delay I'm pretty sure it cuts the start of the audio by the delay amount. MKVMergeGUI also seems to cut the beginning of the audio if you mux it with a negative delay value. I'm not sure if any muxers would do the same to the video stream.... I guess the only way to know for sure would be to see if the video has the same number of frames before and after muxing, otherwise maybe MediaInfo is just calculating the bitrate slightly differently for some reason.
TECK
16th February 2012, 04:49
They will probably update it to 5.3.0 on the next dev build. I'm still puzzled that you managed to mux a .m4v file into .mkv without losing the video track. Are you sure the video is still there? Audio works fine, I tested this.
hello_hello
16th February 2012, 05:25
I'm positive. The file below remuxed perfectly.
Sometimes M4V files can be a little "peculiar" in ways I don't understand. If you have a "problem" M4V file maybe try using YAMB to remux it as an MP4 or extract the individual streams, then from there remux it as an MKV. Or try MeGUI's MP4 muxer. To be honest though, I don't recall MKVMergeGUI ever failing to remux a M4V file.
http://i43.tinypic.com/2bbhfs.gif
TECK
16th February 2012, 05:34
In my case I see the same tracks, except that the output has a .mka extension, instead of .mkv. It is changed automatically by MKVmerge. The only solution I found was to actually extract the tracks with FFCoder and then re-encode them into a MKV container. So the original question pops again, is there a way to extract the tracks of a M4V container (which is identical to MP4) in MeGUI?
Just curious, what happens if you open your video.m4v file with HD Streams Extractor? Can you see the tracks and extract them? I cannot, with my file. Yet it works perfect in FFCoder... go figure.
What I'm trying to avoid is the use of a zillion tools, when I can actually take advantage of everything that is bundled into MeGUI. I like that MeGUI has a great update feature so I don't have to go in circles and check every week for new files.
hello_hello
16th February 2012, 06:08
In my case I see the same tracks, except that the output has a .mka extension, instead of .mkv. It is changed automatically by MKVmerge. The only solution I found was to actually extract the tracks with FFCoder and then re-encode them into a MKV container. So the original question pops again, is there a way to extract the tracks of a M4V container (which is identical to MP4) in MeGUI?
Did you try changing the extension back to MKV? What type of video stream does the M4V file contain?
I don't think MeGUI's extraction tools will work with M4V files. The MKV remuxer seems to be happy if you change the extension to MP4, then if it successfully remuxes it as an MKV you should be able to use the HD Streams Extractor from there. I don't know of any other way.
Just curious, what happens if you open your video.m4v file with HD Streams Extractor? Can you see the tracks and extract them? I cannot, with my file. Yet it works perfect in FFCoder... go figure.
I can't even see the M4V file using the HD Streams Extractor, let alone open it. It's not listed as a supported file type and it doesn't have a "show all files" option.
tebasuna51
16th February 2012, 11:37
...
I can't even see the M4V file using the HD Streams Extractor, let alone open it. It's not listed as a supported file type and it doesn't have a "show all files" option.
eac3to don't support mp4 container then never can open .mp4 or .m4v
To extract tracks from mp4 container you can use MP4Box (like GUI's YAMB or FFCoder use)
TECK
16th February 2012, 21:23
Thanks Tebasuna. It would be great if MP4Box extraction support will be added to MeGUI, I posted this into request thread (http://forum.doom9.org/showthread.php?p=1558919#post1558919).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.