summaryrefslogtreecommitdiff
path: root/doc/avtools-common-opts.texi
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-09-03 14:55:39 +0200
committerAnton Khirnov <anton@khirnov.net>2011-09-11 17:30:05 +0200
commit99442bfe20796316b26856e71cfb70ab501a6345 (patch)
treed1c98fa923a66aa6af2ba64752c332343330d414 /doc/avtools-common-opts.texi
parent3a37392efef930bb7c109d2041d5c9ea5bb2a7de (diff)
doc/avtools-common-opts: write a section about stream specifiers.
Diffstat (limited to 'doc/avtools-common-opts.texi')
-rw-r--r--doc/avtools-common-opts.texi44
1 files changed, 31 insertions, 13 deletions
diff --git a/doc/avtools-common-opts.texi b/doc/avtools-common-opts.texi
index e7c1bba4ac..0f0ecdf943 100644
--- a/doc/avtools-common-opts.texi
+++ b/doc/avtools-common-opts.texi
@@ -11,6 +11,35 @@ corresponding value to true. They can be set to false by prefixing
with "no" the option name, for example using "-nofoo" in the
commandline will set to false the boolean option with name "foo".
+@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.
+
+A stream specifier is a string generally appended to the option name and
+separated from it by a colon. E.g. @code{-codec:a:1 ac3} option contains
+@code{a:1} stream specifer, which matches the second audio stream. Therefore it
+would select the ac3 codec for the second audio stream.
+
+A stream specifier can match several stream, the option is then applied to all
+of them. E.g. the stream specifier in @code{-b:a 128k} matches all audio
+streams.
+
+An empty stream specifier matches all streams, for example @code{-codec copy}
+or @code{-codec: copy} would copy all the streams without reencoding.
+
+Possible forms of stream specifiers are:
+@table @option
+@item @var{stream_index}
+Matches the stream with this index. E.g. @code{-threads:1 4} would set the
+thread count for the second stream to 4.
+@item @var{stream_type}[:@var{stream_index}]
+@var{stream_type} is one of: 'v' for video, 'a' for audio, 's' for subtitle and
+'d' for data. If @var{stream_index} is given, then matches stream number
+@var{stream_index} of this type. Otherwise matches all streams of this type.
+@item @var{program_id}[:@var{stream_index}]
+If @var{stream_index} is given, then matches stream number @var{stream_index} in
+program with id @var{program_id}. Otherwise matches all streams in this program.
+@end table
@section Generic options
These options are shared amongst the av* tools.
@@ -117,19 +146,8 @@ muxer:
ffmpeg -i input.flac -id3v2_version 3 out.mp3
@end example
-You can precisely specify which stream(s) should the codec AVOption apply to by
-appending a stream specifier of the form
-@option{[:@var{stream_type}][:@var{stream_index}]} to the option name.
-@var{stream_type} is 'v' for video, 'a' for audio and 's' for subtitle streams.
-@var{stream_index} is a global stream index when @var{stream_type} isn't
-given, otherwise it counts streams of the given type only. As always, the index
-is zero-based. For example
-@example
--foo -- applies to all applicable streams
--foo:v -- applies to all video streams
--foo:a:2 -- applies to the third audio stream
--foo:0 -- applies to the first stream
-@end example
+All codec AVOptions are obviously per-stream, so the chapter on stream
+specifiers applies to them
Note -nooption syntax cannot be used for boolean AVOptions, use -option
0/-option 1.