Quantcast

Handling files with multiple audio Tracks

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Handling files with multiple audio Tracks

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.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Handling files with multiple audio Tracks

Tom Evans
On Thu, May 10, 2012 at 11:46 AM, Tarun singhal <[hidden email]> wrote:
> 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
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Handling files with multiple audio Tracks

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



On Thu, May 10, 2012 at 4:23 PM, Tom Evans <[hidden email]> wrote:

> On Thu, May 10, 2012 at 11:46 AM, Tarun singhal <[hidden email]>
> wrote:
> > 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
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Handling files with multiple audio Tracks

Tom Evans
On Thu, May 10, 2012 at 12:04 PM, Tarun singhal <[hidden email]> wrote:
> 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
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Loading...