I'm trying to use Ubuntu's ffmpeg to convert a file to MKV while copying all the video and subtitle streams, but converting all the audio streams to AC3.
Using this command:
ffmpeg -i input.mkv -map 0 -vcodec copy -scodec copy -acodec ac3 -ab 256k output.mkv
fails with
Number of stream maps must match number of output streams
Removing the -map 0
fixes the problem, but not all of the subtitle streams are in the output file.
Edit
Here's the full console output:
user@laptop:~/$ ffmpeg -i input.mkv -map 0 -vcodec copy -scodec copy -acodec ac3 -ab 256k output.mkv
ffmpeg version 0.8.5-6:0.8.5-0ubuntu0.12.10.1, Copyright (c) 2000-2012 the Libav developers
built on Jan 24 2013 14:49:20 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[matroska,webm @ 0xa0cb20] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'input.mkv':
Duration: 00:10:56.88, start: 0.000000, bitrate: 1536 kb/s
Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080, PAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0.1(eng): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s (default)
Stream #0.2(eng): Subtitle: pgssub (default)
Stream #0.3(fre): Subtitle: pgssub
Stream #0.4(spa): Subtitle: pgssub
Number of stream maps must match number of output streams