[FFmpeg-cvslog] doc: add details to the documentation for ffmpeg -map

Mike Scheutzow git at videolan.org
Mon Mar 21 04:12:47 CET 2011


ffmpeg | branch: master | Mike Scheutzow <mjs973 at optonline.net> | Sun Mar 20 08:01:41 2011 +0100| [cf752d027fafe691951fa00d9c25e2fda032b536] | committer: Luca Barbato

doc: add details to the documentation for ffmpeg -map

Patch by Mike Sheutzow with some additions and changes by Stefano.

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cf752d027fafe691951fa00d9c25e2fda032b536
---

 doc/ffmpeg.texi |   42 +++++++++++++++++++++++++++++++++++++-----
 1 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index bc30ba3..46d3999 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -622,11 +622,43 @@ Synchronize read on input.
 @section Advanced options
 
 @table @option
- at item -map @var{input_stream_id}[:@var{sync_stream_id}]
-Set stream mapping from input streams to output streams.
-Just enumerate the input streams in the order you want them in the output.
- at var{sync_stream_id} if specified sets the input stream to sync
-against.
+ at item -map @var{input_file_id}. at var{input_stream_id}[:@var{sync_file_id}. at var{sync_stream_id}]
+
+Designate an input stream as a source for the output file. Each input
+stream is identified by the input file index @var{input_file_id} and
+the input stream index @var{input_stream_id} within the input
+file. Both indexes start at 0. If specified,
+ at var{sync_file_id}. at var{sync_stream_id} sets which input stream
+is used as a presentation sync reference.
+
+The @code{-map} options must be specified just after the output file.
+If any @code{-map} options are used, the number of @code{-map} options
+on the command line must match the number of streams in the output
+file. The first @code{-map} option on the command line specifies the
+source for output stream 0, the second @code{-map} option specifies
+the source for output stream 1, etc.
+
+For example, if you have two audio streams in the first input file,
+these streams are identified by "0.0" and "0.1". You can use
+ at code{-map} to select which stream to place in an output file. For
+example:
+ at example
+ffmpeg -i INPUT out.wav -map 0.1
+ at end example
+will map the input stream in @file{INPUT} identified by "0.1" to
+the (single) output stream in @file{out.wav}.
+
+For example, to select the stream with index 2 from input file
+ at file{a.mov} (specified by the identifier "0.2"), and stream with
+index 6 from input @file{b.mov} (specified by the identifier "1.6"),
+and copy them to the output file @file{out.mov}:
+ at example
+ffmpeg -i a.mov -i b.mov -vcodec copy -acodec copy out.mov -map 0.2 -map 1.6
+ at end example
+
+To add more streams to the output file, you can use the
+ at code{-newaudio}, @code{-newvideo}, @code{-newsubtitle} options.
+
 @item -map_meta_data @var{outfile}[, at var{metadata}]:@var{infile}[, at var{metadata}]
 Deprecated, use @var{-map_metadata} instead.
 




More information about the ffmpeg-cvslog mailing list