Discussion:
[FFmpeg-user] Handling files with multiple audio Tracks
Tarun singhal
2012-05-10 10:46:02 UTC
Permalink
Hi all,

Is FFmpeg is capable of handling files with multiple audio track?
I mean how to choose which track we want in output.
Tom Evans
2012-05-10 10:53:37 UTC
Permalink
Post by Tarun singhal
Hi all,
Is FFmpeg is capable of handling files with multiple audio track?
I mean how to choose which track we want in output.
Yes, the -map option is what you are looking for.

Cheers

Tom
Tarun singhal
2012-05-10 11:04:40 UTC
Permalink
But if the input video contains 2 audio tracks and if I don't use map
option, shouldn't ffmpeg copy all the tracks to output by default. But I
observed By default it copies one audio and one video stream. If I am
correct, what is the rule behind copying audio tracks in output video
Post by Tom Evans
Post by Tarun singhal
Hi all,
Is FFmpeg is capable of handling files with multiple audio track?
I mean how to choose which track we want in output.
Yes, the -map option is what you are looking for.
Cheers
Tom
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Tom Evans
2012-05-10 11:16:51 UTC
Permalink
Post by Tarun singhal
But if the input video contains 2 audio tracks and if I don't use map
option, shouldn't ffmpeg copy all the tracks to output by default. But I
observed By default it copies one audio and one video stream. If I am
correct, what is the rule behind copying audio tracks in output video
Please don't top post.

ffmpeg comes with a manual that explains how to use it. The third
paragraph says:

Each input or output file can in principle contain any number of
streams of different types (video/audio/subtitle/attachment/data).
Allowed number and/or types of streams can be limited by the container
format. Selecting, which streams from which inputs go into output, is
done either automatically or with the "-map" option (see the Stream
selection chapter).

The 'Stream selection' chapter says:

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 the
stream with the most channels, for subtitle it's the first subtitle
stream. In the case where several streams of the same type rate
equally, the lowest numbered stream is chosen.

You can disable some of those defaults by using "-vn/-an/-sn" options.
For full manual control, use the "-map" option, which disables the
defaults just described.


Cheers

Tom

Continue reading on narkive:
Loading...