The Matroska (mkv) file format is specified with the -f matroska option. It must be supported by ffmpeg (version 0.7.3) in Ubuntu 11.10. Use ffmpeg -formats for a list of supported file formats.
To combine specific streams (audio or video) from multiple files, use the -i option for each input and -map input_index[:stream_index] . For example, the following command combines the first stream of the first input with the second input and saves the codecs:
ffmpeg -i input.mkv -i input_audio.ogg -map 0:0 -map 1 \ -vcodec copy -acodec copy output.mkv
Dmitry Shkuropatsky
source share