Forum     

Go Back   Digit Technology Discussion Forum > Community > Tutorials
Register FAQ Calendar Mark Forums Read

Tutorials This section offers tutorials and How to's on just about anything related to computers and IT. Note: All tutorials are courtesy the posters and not verified by Digit

Reply
 
LinkBack (6) Thread Tools Display Modes
Old 20-12-2007, 07:20 PM   6 links from elsewhere to this Post. Click to view. #1 (permalink)
C# Be Sharp !
 
Zeeshan Quireshi's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
Lightbulb MKV [Demuxing , Encoding and Muxing] Tutorial

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 - http://www.bunkus.org/videotools/mkv...downloads.html

2. H.264 Info - http://sourceforge.net/project/showf...kage_id=225029

3. MeGUI - http://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 .



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 .



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



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



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 .
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
Zeeshan Quireshi is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 21-12-2007, 06:22 AM   #2 (permalink)
In The Zone
 
Vivek788's Avatar
 
Join Date: Jul 2006
Location: Cochin
Posts: 339
Default Re: MKV [Demuxing , Encoding and Muxing] Tutorial

nice...very useful post indeed...
__________________
Viva Green Computing!!
http://www.vivtech.blogspot.com/
Vivek788 is offline   Reply With Quote
Old 21-12-2007, 10:46 AM   #3 (permalink)
Alter Bridge=GOD
 
nish_higher's Avatar
 
Join Date: Jun 2006
Location: Deep Inside Of Nowhere
Posts: 1,813
Default Re: MKV [Demuxing , Encoding and Muxing] Tutorial

hey can't we save the file as avi using avi muxer??thanks for this tutorial
__________________
Apple Macbook Pro 17

Last edited by nish_higher; 21-12-2007 at 11:01 AM.
nish_higher is offline   Reply With Quote
Old 21-12-2007, 06:07 PM   #4 (permalink)
Alter Bridge=GOD
 
nish_higher's Avatar
 
Join Date: Jun 2006
Location: Deep Inside Of Nowhere
Posts: 1,813
Default Re: MKV [Demuxing , Encoding and Muxing] Tutorial

can u tell me---what was the need of converting video.264 to video-4.1.264 when in the 3rd step u r using video.264

am i missing something


eDit---

tried and this error popped up

Processing ended at 18:26:11

------------------------------------------------------

Log for job job1

Job commandline: "C:\Program Files\megui\tools\mp4box\mp4box.exe" -add "F:\video-4.1.264" -add "F:\audio.aac" -fps 23.976 -tmp G:\ -new "G:\Transformers.mp4"
AVC-H264 import - frame size 1024 x 432 at 23.976 FPS
Import results: 206453 samples - Slices: 2523 I 112051 P 91879 B - 208857 SEI - 2404 IDR
Stream uses B-slice references - max frame delay 2
AAC import - sample rate 11025 - MPEG-2 audio - 3 channels
Error importing F:\audio.aac: Bad Parameter

------------------------------------------------------

End of log for job1
------------------------------------------------------
__________________
Apple Macbook Pro 17

Last edited by nish_higher; 21-12-2007 at 06:27 PM.
nish_higher is offline   Reply With Quote
Old 22-12-2007, 01:02 PM   #5 (permalink)
C# Be Sharp !
 
Zeeshan Quireshi's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
Default Re: MKV [Demuxing , Encoding and Muxing] Tutorial

Quote:
Originally Posted by nish_higher
can u tell me---what was the need of converting video.264 to video-4.1.264 when in the 3rd step u r using video.264
Well the Xbox 360 and most "normal" HD Players do not suport Level 5.1 H.264 Content , so changing the Level to 4.1 Makes it compatible with most the H.264 Players out there .

Also , level 5.1 means having a Bitrate of greater than 240 mb/s which is much much greater than the 36 mb/s which the HD-DVD and Blu-ray support , so even the most advanced optical technologies today can only support a maximum of Level 4.1 H.264 Content , so that's why we make it sure than the Level Rating of the content is changed to 4.1 or lower .

as for the Error , i think you've misspelled the filename .
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
Zeeshan Quireshi is offline   Reply With Quote
Old 25-12-2007, 06:21 AM   #6 (permalink)
Right Off the Assembly Line
 
Join Date: Dec 2007
Posts: 1
Default Re: MKV [Demuxing , Encoding and Muxing] Tutorial

Thanks for the info!

How do I go about doing this for a file with AC3 audio?

Ive tried with several different videos but always get the same error.

This is the log from MeGUI

Log for job job2
Job commandline: "C:\Program Files\megui\tools\mp4box\mp4box.exe" -add "C:\video41.264" -add "C:\audio.ac3" -fps 23.976 -tmp C:\ -new "C:\video41-muxed.mp4"
AVC-H264 import - frame size 1280 x 528 at 23.976 FPS
Import results: 198866 samples - Slices: 2279 I 71772 P 124815 B - 200966 SEI - 2100 IDR
Stream uses B-slice references - max frame delay 2
Unknown input file type
Error importing C:\audio.ac3: Corrupted Data in file/stream


Does the ac3 file need to be converted to another format? I am planning to reburn this to watch on an HD-DVD standalone player and would like to keep the multi-channel audio

Thanks,

Sachin
sushtsi is offline   Reply With Quote
Old 25-12-2007, 07:47 AM   #7 (permalink)
vaibhavtek
Guest
 
Posts: n/a
Default Re: MKV [Demuxing , Encoding and Muxing] Tutorial

nice 1 will try.
  Reply With Quote
Old 25-12-2007, 11:49 AM   #8 (permalink)
C# Be Sharp !
 
Zeeshan Quireshi's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
Default Re: MKV [Demuxing , Encoding and Muxing] Tutorial

@sushtsi , yes mate you need to convert it to AAC or MP3 as these are the two popular codecs that mp4 supports .
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
Zeeshan Quireshi is offline   Reply With Quote
Old 25-12-2007, 12:46 PM   #9 (permalink)
Dreamweaver
 
Gigacore's Avatar
 
Join Date: Aug 2006
Location: Bangalore
Posts: 3,885
Default Re: MKV [Demuxing , Encoding and Muxing] Tutorial

Awesome tutorial mate
__________________
Today's noobs are tomorrow's geeks. Don't make fun of them.. encourage them. - Gigacore

Follow me on twitter.com/gigacore
Gigacore is offline   Reply With Quote
Old 04-10-2009, 02:58 PM   #10 (permalink)
Right Off the Assembly Line
 
Join Date: Oct 2009
Posts: 1
Angry Re: MKV [Demuxing , Encoding and Muxing] Tutorial

Well I've tried almost "EVERYTHING" to split my 8GB MKV (of Transformers 2) cuz its heavy to play with any player.

Anywayz.......I'm still unable to split using "MKVtoolnix" software, I've tried every option every tutorial on NET.....but useless, every time it exports a SINGLE FILE of 8mb thats it.
No error nothing else ..... !

CAN ANYONE HELP ME WITH THIS ???

Please I will appreciate it .... as I've spent more than 3 hours messing with dat F****g software MKVToolnix.

PLEASE HELP !!!!!!!!!!!!
-----------------------------------------
Posted again:
-----------------------------------------
Well I've tried almost "EVERYTHING" to split my 8GB MKV (of Transformers 2) cuz its heavy to play with any player.

Anywayz.......I'm still unable to split using "MKVtoolnix" software, I've tried every option every tutorial on the NET.....but useless, every time it exports a SINGLE FILE of 8mb thats it.
No error nothing else ..... !

CAN ANYONE HELP ME WITH THIS ???

Please I will appreciate it .... as I've spent more than 3 hours messing with dat F****g software MKVToolnix.

PLEASE HELP !!!!!!!!!!!!

Last edited by Salman82; 04-10-2009 at 03:01 PM. Reason: Automerged Doublepost
Salman82 is offline   Reply With Quote
Old 26-10-2009, 02:45 PM   #11 (permalink)
In The Zone
 
ramprasad's Avatar
 
Join Date: May 2004
Location: 00-1D-7D-5A-34-2E
Posts: 374
Default Re: MKV [Demuxing , Encoding and Muxing] Tutorial

Useful tut...
@Salman82 : will try and tell u
ramprasad is offline   Reply With Quote
Old 17-07-2010, 04:51 AM   #12 (permalink)
Right Off the Assembly Line
 
Join Date: Jul 2010
Posts: 1
Default Re: MKV [Demuxing , Encoding and Muxing] Tutorial

Thanks a ton Zeeshan.
I am very happy to see my first custom made mkv.
:clap:
fraekz is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.thinkdigit.com/forum/tutorials/76199-mkv-demuxing-encoding-muxing-tutorial.html
Posted By For Type Date
mkv muxer - Virgilio Ricerca Web This thread Refback 08-02-2012 10:54 PM
Cbox This thread Refback 11-06-2011 08:13 AM
mkv demux - Google Search This thread Refback 21-05-2011 06:22 PM
Clix This thread Refback 03-04-2011 09:58 PM
curioustolearn's Bookmarks on Delicious This thread Refback 17-11-2010 05:03 PM
Www.coolbuddy.videos Q&A | Drag to top This thread Refback 23-07-2010 07:05 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Video encoding Cool Buddy Hardware Q&A 4 18-11-2007 12:13 PM
mp3 encoding tukaibatman Software Q&A 4 04-07-2007 11:47 PM
Video Encoding saurabh.sauron Software Q&A 8 15-02-2006 09:11 PM
about dvd encoding anil_861 Software Q&A 2 08-02-2006 09:42 PM
DrDivx Encoding!!!! plsoft QnA (read only) 5 22-03-2005 06:57 PM


All times are GMT +5.5. The time now is 06:11 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2