diff options
author | Alexandra Khirnova <alexandra@khirnov.net> | 2011-12-13 14:23:06 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-12-17 00:12:53 +0400 |
commit | a7b5e841ffe4b0f8423288965b8d069bd2a7a792 (patch) | |
tree | 8611ed6ef37a6c60be5efd515b5e4e0e011985db /doc | |
parent | bb9747c8eee134f2bf6058d368f8cbc799f4b7d3 (diff) |
avconv: support stream specifiers in -metadata and -map_metadata
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/avconv.texi | 38 | ||||
-rw-r--r-- | doc/avtools-common-opts.texi | 1 |
2 files changed, 31 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 diff --git a/doc/avtools-common-opts.texi b/doc/avtools-common-opts.texi index 372a6f2dc1..18e7ba5cbe 100644 --- a/doc/avtools-common-opts.texi +++ b/doc/avtools-common-opts.texi @@ -11,6 +11,7 @@ corresponding value to true. They can be set to false by prefixing with "no" the option name, for example using "-nofoo" in the command line will set to false the boolean option with name "foo". +@anchor{Stream specifiers} @section Stream specifiers Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers are used to precisely specify which stream(s) does a given option belong to. |