12.6. Stream copying
Prev | Chapter 12. Basic usage of MEncoder | Next

## 12.6. Stream copying

MEncoder can handle input streams in two ways: encode or copy them. This section is about copying.

- Video stream (option `-ovc copy`): nice stuff can be done :) Like, putting (not converting!) FLI or VIVO or MPEG-1 video into an AVI file! Of course only MPlayer can play such files :) And it probably has no real life value at all. Rationally: video stream copying can be useful for example when only the audio stream has to be encoded (like, uncompressed PCM to MP3).

- Audio stream (option `-oac copy`): straightforward. It is possible to take an external audio file (MP3, WAV) and mux it into the output stream. Use the `-audiofile `filename`` option for this.

Using `-oac copy` to copy from one container format to another may require the use of `-fafmttag` to keep the audio format tag of the original file. For example, if you are converting an NSV file with AAC audio to an AVI container, the audio format tag will be incorrect and it will have to be changed. For a list of audio format tags, check `codecs.conf`.

Example:

    mencoder input.nsv -oac copy -fafmttag 0x706D -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -o output.avi

Prev | Up | Next
12.5. Rescaling movies | Home | 12.7. Encoding from multiple input image files (JPEG, PNG, TGA, SGI)