Index: en/mencoder.xml =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/xml/en/mencoder.xml,v retrieving revision 1.48 diff -u -b -w -r1.48 mencoder.xml --- en/mencoder.xml 11 Apr 2005 22:37:27 -0000 1.48 +++ en/mencoder.xml 12 Apr 2005 11:15:00 -0000 @@ -873,7 +873,7 @@ stream during the encoding. You can also extract the AC3 stream in order to mux it into containers such as NUT, Matroska or OGM. - mplayer source_file.vob -aid 129 -dumpaudio -dumpfile sound.ac3 + mplayer source_file.vob -aid 129 -dumpaudio -dumpfile sound.ac3 will dump into the file sound.ac3 the audio track number 129 from the file source_file.vob (NB: DVD VOB files usually use a different audio numbering, which means that the VOB audio track 129 is the 2nd audio track of the file). @@ -892,7 +892,7 @@ First of all, you will have to convert the DVD sound into a WAV file that the audio codec can use as input. For example: - mplayer source_file.vob -ao pcm:file=destination_sound.wav -vc dummy -aid 1 -vo null + mplayer source_file.vob -ao pcm:file=destination_sound.wav -vc dummy -aid 1 -vo null will dump the second audio track from the file source_file.vob into the file destination_sound.wav. You may want to normalize the sound before encoding, as DVD audio tracks @@ -903,7 +903,7 @@ can do the same job. You will compress in either Vorbis or MP3. For example: - oggenc -q1 destination_sound.wav + oggenc -q1 destination_sound.wav will encode destination_sound.wav with the encoding quality 1, which is roughly equivalent to 80Kb/s, and is the minimum quality at which you should encode if you care about quality. @@ -1290,6 +1290,113 @@ + +Muxing + + Now that you have you encoded video, you will more than likely want + to mux it with one or more audio tracks into a movie container, such + as AVI, OGM, Matroska, or NUT. + MEncoder is currently only able to output + a video bitstream into MPEG (which is limited to MPEG-1 and -2 video + streams) and AVI containers. + Unfortunately, there are issues with the AVI container. + + + +Limitations of the AVI container + + Although it's the most widely-supported container format after MPEG-1, + AVI also has some major drawbacks. + Perhaps the most obvious is the overhead. + For each chunk of the AVI file, 24 bytes are wasted on headers and + index. + This translates into a little over 5 MB per hour, or 1-2.5% + overhead for a 700 MB movie. This may not seem like much, but it could + mean the difference between being able to use 700 kbit/sec video or + 714 kbit/sec, and every bit of quality counts. + + + + In addition to gross inefficiency, AVI also has the following major + limitations: + + + + + + Only fixed-fps content can be stored. This is particularly limiting + if the original material you want to encode is mixed content, for + example a mix of NTSC video and film material. + Actually there are hacks that can be used to store mixed-framerate + content in AVI, but they increase the (already huge) overhead + fivefold or more so they are not practical. + + + + + Audio in AVI files must be either constant-bitrate (CBR) or + constant-framesize (i.e. all frames decode to the same number of + samples). + Unfortunately, the most efficient codec, Vorbis, does not meet + either of these requirements. + Therefore, if you plan to store your movie in AVI, you'll have to + use a less efficient codec such + as MP3 or AC3. + + + + + + With all of that said, MEncoder does not + support variable-fps output or Vorbis encoding. + Therefore, you may not see these as limitations if + MEncoder is the + only tool you will be using to produce your encodes. + However, it is possible to use MEncoder + only for the video encoding, and then use external tools to encode + the audio and mux it into another container format. + + + + +Muxing into the Matroska container + + The matroska project is a free, open standard container format, + aiming to be able to offer a lot of advanced features, which + older formats like AVI can't handle, on an extensible basis. + Matroska supports for example the storage of Variable Bitrate audio + content (VBR) without any hassles, Variable Framerates (VFR), + Chapters, attachment of files, Error Detection (EDC) and modern + A/V Codecs like "Advanced Audio Coding" (AAC), "Ogg Vorbis" or + "MPEG-4 AVC" (H.264), next to nothing handled by AVI. + + + + The tools required to merge Matroska tools are called + mkvtoolnix, and are available on most + Unix plateforms as well as Windows. + Matroska being an open standard, you may find other tools that suit + you better, but since mkvtoolnix is the most common, and is supported + by the Matroska team itself, we will only conver its usage. + + + + Probably the easiest way to get started with Matroska is to use the + graphical front-end shipped with mkvtoolnix, MMG + and follow the + + guide to mkvmerge GUI (mmg) + + + + You may also merge using the command line: + mkvmerge -o output.mkv input_video.avi input_audio1.mp3 input_audio2.ac3 + + + + + + @@ -1878,3 +1985,4 @@ +