[FFmpeg-user] Audio Stream Mapping issue
Tim Nicholson
tim.nicholson at bbc.co.uk
Tue Nov 15 10:42:09 CET 2011
On 15/11/11 08:46, Tim Nicholson wrote:
> According to http://ffmpeg.org/ffmpeg.html#Main-options
> "ffmpeg -i INPUT -map 0 -c:v libx264 -c:a copy OUTPUT
> encodes all video streams with libx264 and copies all audio streams"
>
> However I have an mxf file with 1 video and 4 audio streams I am trying
> to rewrap as a mov where I seem unable to get more than a single audio
> stream copied.
>
> I have tried the following command lines:-
>
> ffmpeg -i in.mxf -vcodec copy -acodec copy tim2.mov
>
> ffmpeg -i in.mxf -vcodec copy -acodec copy -ac 4 tim2.mov
>
> ffmpeg -i in.mxf -vcodec copy -c:a copy tim2.mov
>
> ffmpeg -i in.mxf -vcodec copy -c:a:0 copy -c:a:1 copy -c:a:2 copy -c:a:3
> copy tim2.mov
>
> fmpeg -i in.mxf -vcodec copy -ac 4 -c:a:0 copy -c:a:1 copy -c:a:2 copy
> -c:a:3 copy tim2.mov
>
> But all produce the same result:-
>
> [..]
> Stream mapping:
> Stream #0:0 -> #0:0 (copy)
> Stream #0:1 -> #0:1 (copy)
So to answer my own point it seems that the "-map 0" is essential to get
all the tracks*. However according to:-
http://ffmpeg.org/ffmpeg.html#Stream-selection
"By default ffmpeg tries to pick the "best" stream of each type present
in input files and add them to each output file. For video, this means
the highest resolution, for audio the highest channel count. For
subtitle it’s simply the first subtitle stream.
[...]
For full manual control, use the -map option, which disables the
defaults just described. "
In my case with only 1 video and 4 audios I would expect the "default"
of "highest resolution" and "highest channel count" to give me what I
wanted, but it would appear that the audio default is *not* the highest
channel count but the first channel as per the subtitle spec.
*just for the record I used:-
ffmpeg -i in.mxf -map 0 -vcodec copy -acodec copy tim2.mov
--
Tim
http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
More information about the ffmpeg-user
mailing list