30 декабря 2016 г.

ffmpeg map 0 number of streams must match number of output streams

If a media file has more than one stream type, ffmpeg will choose only one:

By default, ffmpeg includes only one stream of each type (video, audio, subtitle) present in the input files and adds them to each output file. It picks the "best" of each based upon the following criteria: for video, it is the stream with the highest resolution, for audio, it is the stream with the most channels, for subtitles, it is the first subtitle stream. In the case where several streams of the same type rate equally, the stream with the lowest index is chosen.

If you need to copy all streams, use the “-map 0” option.

However, if it fails with “Number of stream maps must match number of output streams”, try upgrading your ffmpeg version, or replace it with libav.

To do that,

  • apt-get install libav-tools
  • run “avconv” with the same arguments you used for ffmpeg

Комментариев нет: