[FFmpeg-user] -map and matroska files

James Darnley james.darnley at gmail.com
Fri Nov 11 03:19:53 CET 2011

On 2011-11-11 03:12, Marios Titas wrote:
> Hi all,
> I have a video file with multiple audio streams and I want to select
> one of them. I did
>      ffmpeg -i input.mkv -map 0.0 -map 0.2 -y output.avi
> to select streams 0 (the video) and 2 (the desired audio stream) and
> this works fine. But if I try to output to matroska, ie
>      ffmpeg -i input.mkv -map 0.0 -map 0.2 -y output.mkv
> this fails with the following error:
>      Number of stream maps must match number of output streams
> Why is this happening?

Without the uncut output, we can never really know, but a guess leads me 
to think that you are not accounting for subtitles.

More information about the ffmpeg-user mailing list