diff options
author | Alexandra Khirnova <alexandra@khirnov.net> | 2011-12-13 10:23:06 +0000 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-12-16 21:12:53 +0100 |
commit | a7b5e841ffe4b0f8423288965b8d069bd2a7a792 (patch) | |
tree | 8611ed6ef37a6c60be5efd515b5e4e0e011985db /doc/avconv.texi | |
parent | bb9747c8eee134f2bf6058d368f8cbc799f4b7d3 (diff) | |
download | ffmpeg-a7b5e841ffe4b0f8423288965b8d069bd2a7a792.tar.gz |
avconv: support stream specifiers in -metadata and -map_metadata
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'doc/avconv.texi')
-rw-r--r-- | doc/avconv.texi | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/doc/avconv.texi b/doc/avconv.texi index 84e0c1c4ef..157e233cc6 100644 --- a/doc/avconv.texi +++ b/doc/avconv.texi @@ -170,9 +170,9 @@ For example, for setting the title in the output file: avconv -i in.avi -metadata title="my title" out.flv @end example -To set the language of the second stream: +To set the language of the first audio stream: @example -avconv -i INPUT -metadata:s:1 language=eng OUTPUT +avconv -i INPUT -metadata:s:a:0 language=eng OUTPUT @end example @item -target @var{type} (@emph{output}) @@ -677,14 +677,28 @@ avconv -i INPUT -map 0 -map -0:a:1 OUTPUT Note that using this option disables the default mappings for this output file. -@item -map_metadata[:@var{metadata_type}][:@var{index}] @var{infile}[:@var{metadata_type}][:@var{index}] (@emph{output,per-metadata}) +@item -map_metadata[:@var{metadata_spec_out}] @var{infile}[:@var{metadata_spec_in}] (@emph{output,per-metadata}) Set metadata information of the next output file from @var{infile}. Note that those are file indices (zero-based), not filenames. -Optional @var{metadata_type} parameters specify, which metadata to copy - (g)lobal -(i.e. metadata that applies to the whole file), per-(s)tream, per-(c)hapter or -per-(p)rogram. All metadata specifiers other than global must be followed by the -stream/chapter/program index. If metadata specifier is omitted, it defaults to -global. +Optional @var{metadata_spec_in/out} parameters specify, which metadata to copy. +A metadata specifier can have the following forms: +@table @option +@item @var{g} +global metadata, i.e. metadata that applies to the whole file + +@item @var{s}[:@var{stream_spec}] +per-stream metadata. @var{stream_spec} is a stream specifier as described +in the @ref{Stream specifiers} chapter. In an input metadata specifier, the first +matching stream is copied from. In an output metadata specifier, all matching +streams are copied to. + +@item @var{c}:@var{chapter_index} +per-chapter metadata. @var{chapter_index} is the zero-based chapter index. + +@item @var{p}:@var{program_index} +per-program metadata. @var{program_index} is the zero-based program index. +@end table +If metadata specifier is omitted, it defaults to global. By default, global metadata is copied from the first input file, per-stream and per-chapter metadata is copied along with streams/chapters. These @@ -696,6 +710,14 @@ of the output file: @example avconv -i in.ogg -map_metadata 0:s:0 out.mp3 @end example + +To do the reverse, i.e. copy global metadata to all audio streams: +@example +avconv -i in.mkv -map_metadata:s:a 0:g out.mkv +@end example +Note that simple @code{0} would work as well in this example, since global +metadata is assumed by default. + @item -map_chapters @var{input_file_index} (@emph{output}) Copy chapters from input file with index @var{input_file_index} to the next output file. If no chapter mapping is specified, then chapters are copied from |