Revision cf752d02

View differences:

doc/ffmpeg.texi
622 622
@section Advanced options
623 623

  
624 624
@table @option
625
@item -map @var{input_stream_id}[:@var{sync_stream_id}]
626
Set stream mapping from input streams to output streams.
627
Just enumerate the input streams in the order you want them in the output.
628
@var{sync_stream_id} if specified sets the input stream to sync
629
against.
625
@item -map @var{input_file_id}.@var{input_stream_id}[:@var{sync_file_id}.@var{sync_stream_id}]
626

  
627
Designate an input stream as a source for the output file. Each input
628
stream is identified by the input file index @var{input_file_id} and
629
the input stream index @var{input_stream_id} within the input
630
file. Both indexes start at 0. If specified,
631
@var{sync_file_id}.@var{sync_stream_id} sets which input stream
632
is used as a presentation sync reference.
633

  
634
The @code{-map} options must be specified just after the output file.
635
If any @code{-map} options are used, the number of @code{-map} options
636
on the command line must match the number of streams in the output
637
file. The first @code{-map} option on the command line specifies the
638
source for output stream 0, the second @code{-map} option specifies
639
the source for output stream 1, etc.
640

  
641
For example, if you have two audio streams in the first input file,
642
these streams are identified by "0.0" and "0.1". You can use
643
@code{-map} to select which stream to place in an output file. For
644
example:
645
@example
646
ffmpeg -i INPUT out.wav -map 0.1
647
@end example
648
will map the input stream in @file{INPUT} identified by "0.1" to
649
the (single) output stream in @file{out.wav}.
650

  
651
For example, to select the stream with index 2 from input file
652
@file{a.mov} (specified by the identifier "0.2"), and stream with
653
index 6 from input @file{b.mov} (specified by the identifier "1.6"),
654
and copy them to the output file @file{out.mov}:
655
@example
656
ffmpeg -i a.mov -i b.mov -vcodec copy -acodec copy out.mov -map 0.2 -map 1.6
657
@end example
658

  
659
To add more streams to the output file, you can use the
660
@code{-newaudio}, @code{-newvideo}, @code{-newsubtitle} options.
661

  
630 662
@item -map_meta_data @var{outfile}[,@var{metadata}]:@var{infile}[,@var{metadata}]
631 663
Deprecated, use @var{-map_metadata} instead.
632 664

  

Also available in: Unified diff