Zeeshan Quireshi
C# Be Sharp !
Well guys as Matroska(MKV) is getting popular by the day and with most HD Content being distributed in the MKV Container I’m writing this tutorial to help those who want to work with MKV or want to convert them to something else(MP4 here) .
Software You’ll Need:
1. MKVToolNix - *www.bunkus.org/videotools/mkvtoolnix/downloads.html
2. H.264 Info - *sourceforge.net/project/showfiles.php?group_id=138139&package_id=225029
3. MeGUI - *sourceforge.net/projects/megui
Part 1 : Demuxing an MKV into elementary streams
1. Start MKVMergeGUI from the MKVToolNix Installation Folder
2. Drag and Drop your MKV Video file to the “Input Files” container .
3. Notice the Streams you want to extract .
*farm3.static.flickr.com/2146/2124961454_cebe61547e_o.png
4. Now open a Command Prompt from
Start->Program Files->accessories->Command Prompt
5. Change to the directory where you have MKVToolNix installed
6. Now to demux the file you’ll use a program called mkvextract .
7. On the command prompt , type this code:
mkvextract tracks <Full MKV Path> 1:<Full path where you want to store your Extracted Video> 2:<Full path where you want to store your Extracted Audio>
Note: The most simple way to enter path of a file in CMD is to just drag and drop it into the Prompt and it’s path will automatically be added .
*farm3.static.flickr.com/2169/2124187061_ede9f20f26_o.png
8. This will extract the Video and Audio streams separately in the locations C:\Video.264 c:\Audio.aac
Part 2: Encoding the Video and Audio
1. Open up H264Info
*farm3.static.flickr.com/2337/2124961202_ef9d79403c_o.png
2. Load the file using the input button and then change the Profile Level of the file to 4.1 , this will make sure that the H.264 Video plays well on most HD Players and the Xbox 360 as well .
3. Save the output as video-4.1.264
4. Now if you want to encode the audio then encode it to whatever format you like using any encoder like dBPoweramp or whichever encoder you like . we’ll leave the audio encoding part here as AAC works fine .
Part 3: Muxing into an MPEG-4 File
1. Now , to combine these streams into s single MP4 file we’ll have to Multiplex it.
2. Fire up MeGUI
3. Go to Tools->MP4 Muxer
*farm3.static.flickr.com/2109/2124961578_88cf0769e3_o.png
4. Now set the Video Input , the Frame Rate , the Audio Input and Finally select the Output Destination .
5. The resultant file is a fully standards compliant mp4 file and will play in any player that supports H.264 and AAC .
Software You’ll Need:
1. MKVToolNix - *www.bunkus.org/videotools/mkvtoolnix/downloads.html
2. H.264 Info - *sourceforge.net/project/showfiles.php?group_id=138139&package_id=225029
3. MeGUI - *sourceforge.net/projects/megui
Part 1 : Demuxing an MKV into elementary streams
1. Start MKVMergeGUI from the MKVToolNix Installation Folder
2. Drag and Drop your MKV Video file to the “Input Files” container .
3. Notice the Streams you want to extract .
*farm3.static.flickr.com/2146/2124961454_cebe61547e_o.png
4. Now open a Command Prompt from
Start->Program Files->accessories->Command Prompt
5. Change to the directory where you have MKVToolNix installed
6. Now to demux the file you’ll use a program called mkvextract .
7. On the command prompt , type this code:
mkvextract tracks <Full MKV Path> 1:<Full path where you want to store your Extracted Video> 2:<Full path where you want to store your Extracted Audio>
Note: The most simple way to enter path of a file in CMD is to just drag and drop it into the Prompt and it’s path will automatically be added .
*farm3.static.flickr.com/2169/2124187061_ede9f20f26_o.png
8. This will extract the Video and Audio streams separately in the locations C:\Video.264 c:\Audio.aac
Part 2: Encoding the Video and Audio
1. Open up H264Info
*farm3.static.flickr.com/2337/2124961202_ef9d79403c_o.png
2. Load the file using the input button and then change the Profile Level of the file to 4.1 , this will make sure that the H.264 Video plays well on most HD Players and the Xbox 360 as well .
3. Save the output as video-4.1.264
4. Now if you want to encode the audio then encode it to whatever format you like using any encoder like dBPoweramp or whichever encoder you like . we’ll leave the audio encoding part here as AAC works fine .
Part 3: Muxing into an MPEG-4 File
1. Now , to combine these streams into s single MP4 file we’ll have to Multiplex it.
2. Fire up MeGUI
3. Go to Tools->MP4 Muxer
*farm3.static.flickr.com/2109/2124961578_88cf0769e3_o.png
4. Now set the Video Input , the Frame Rate , the Audio Input and Finally select the Output Destination .
5. The resultant file is a fully standards compliant mp4 file and will play in any player that supports H.264 and AAC .