[FFmpeg-cvslog] doc/avtools-common-opts: write a section about stream specifiers.
Anton Khirnov
git at videolan.org
Mon Sep 12 00:39:00 CEST 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Sep 3 14:55:39 2011 +0200| [99442bfe20796316b26856e71cfb70ab501a6345] | committer: Anton Khirnov
doc/avtools-common-opts: write a section about stream specifiers.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99442bfe20796316b26856e71cfb70ab501a6345
---
doc/avtools-common-opts.texi | 44 +++++++++++++++++++++++++++++------------
1 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/doc/avtools-common-opts.texi b/doc/avtools-common-opts.texi
index e7c1bba..0f0ecdf 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".
+ at 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
+ at 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:
+ at table @option
+ at 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.
+ at item @var{stream_type}[:@var{stream_index}]
+ at 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
+ at var{stream_index} of this type. Otherwise matches all streams of this type.
+ at 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.
+ at 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
- at option{[:@var{stream_type}][:@var{stream_index}]} to the option name.
- at var{stream_type} is 'v' for video, 'a' for audio and 's' for subtitle streams.
- at 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
- at 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
- at 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.
More information about the ffmpeg-cvslog
mailing list