I've been trying to remove unneeded audio streams from an MKV (Matroska) file. The reason why I want to do this is to avoid having to manually select the wanted stream in Windows Media Player.
The input file gives the following ffmpeg info:
Stream #0.0: Video: mpeg4, yuv420p, 704x396 [PAR 1:1 DAR 16:9], 29.98 tbr, 1k tbn, 29.98 tbc Stream #0.1(eng): Audio: aac, 24000 Hz, 5.1, s16 Stream #0.2(jpn): Audio: aac, 24000 Hz, 5.1, s16 Stream #0.3(eng): Subtitle: 0x0000 Stream #0.4(eng): Subtitle: 0x0000 Stream #0.5: Attachment: 0x0000 Stream #0.6: Attachment: 0x0000
Since I want streams 0, 1 and 3 (sub), my ffmpeg command looks like this:
ffmpeg -i input.mkv -map 0:0 -map 0:1 -map 0:3 -vcodec copy -acodec libmp3lame -newsubtitle test.mkv
which strangely gives the error:
At least one output file must be specified
Removing the subtitles:
ffmpeg -i input.mkv -map 0:0 -map 0:1 -vcodec copy -acodec libmp3lame test.mkv
gives me this:
Number of stream maps must match number of output streams
I seems I don't really understand how the "map" option works. Would someone help me figure it out?