[FFmpeg-devel] [PATCH] Add detail to the documentation for ffmpeg -map.

Diego Biurrun diego
Wed Mar 2 14:53:35 CET 2011


On Mon, Feb 28, 2011 at 03:35:40PM +0100, Stefano Sabatini wrote:
> On date Monday 2011-02-28 09:25:04 -0500, Mike Scheutzow encoded:
> > Stefano wrote:
> > >+For example, to select stream 2 from input file @file{A.mov}
> > >+(specified by the identifier "0.2"), and stream 6 from input
> > >+ at file{B.mov} (specified by the identifier "0.6"), and copy them to
> > >+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
> > 
> > I don't understand what you mean by "identifier 0.6".
> > 
> > It's confusing to refer to the same thing as both 0.6 and 1.6.
> 
> It was a typo, fixed.
> 
> --- a/doc/ffmpeg.texi
> +++ b/doc/ffmpeg.texi
> @@ -622,11 +622,43 @@ Synchronize read on input.
>  
>  @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}]
> +
> +Specify an input stream to be a source for the output file. An input
> +stream is identified by two numbers: an input file index, specified by
> + at var{input_file_id}, and an input stream index within that file,
> +specified by @var{input_stream_id}. Both start counting from 0.  If
> +used, @var{sync_file_id}. at var{sync_stream_id} specifies which input
> +stream is used as a presentation sync reference.

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.

> +For example, if you have two streams in the first input file, these
> +streams are identified by "0.0" and "0.1". You can use @code{-map} to
> +select which one to map to the single stream of an output file.

Let's not overuse the verb map too much here: 

  You can use @code{-map} to select which stream to place in an output file.

> For example:
> + at example
> +ffmpeg -i INPUT OUTPUT -map 0.1
> + at end example
> +will map the input stream identified by "0.1" to the (single) output
> +stream.

will mark the input stream identified by "0.1" as (single) output stream.

> +For example, to select stream 2 from input file @file{A.mov}
> +(specified by the identifier "0.2"), and stream 6 from input
> + at file{B.mov} (specified by the identifier "1.6"), and copy them to
> +output file @file{out.mov}:

Didn't you say above that counting starts at 0?

Diego



More information about the ffmpeg-devel mailing list