[PATCH] doc: add details to the documentation for ffmpeg -map
Mike Scheutzow
mjs973
Fri Feb 11 20:43:04 CET 2011
Patch by Mike Sheutzow with some additions and changes by Stefano.
---
doc/ffmpeg.texi | 42 +++++++++++++++++++++++++++++++++++++-----
1 files changed, 37 insertions(+), 5 deletions(-)
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index f0f3b65..b9b7382 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.
--
1.7.2.3
--6TrnltStXW4iwmi0--
More information about the ffmpeg-devel
mailing list