summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-11-12 17:22:57 +0100
committerAnton Khirnov <anton@khirnov.net>2021-11-16 10:51:32 +0100
commitbd55552d692254b53504357c6987eea976cff4f9 (patch)
tree5f32cb67ed83d8f37606d21339d727b1fcfa833e /doc
parentd4ae2a20e8783a3658d47bae952ae681c6465a39 (diff)
ffmpeg: rewrite setting the stream disposition
Currently, the code doing this is spread over several places and may behave in unexpected ways. E.g. automatic 'default' marking is only done for streams fed by complex filtergraphs. It is also applied in the order in which the output streams are initialized, which is effectively random. Move processing the dispositions at the end of open_output_file(), when we already have all the necessary information. Apply the automatic default marking only if no explicit -disposition options were supplied by the user, and apply it to the first stream of each type (excluding attached pics) when there is more than one stream of that type and no default markings were copied from the input streams. Explicitly document the new behavior. Changes the results of some tests, where the output file gets a default disposition, while it previously did not.
Diffstat (limited to 'doc')
-rw-r--r--doc/ffmpeg.texi37
1 files changed, 16 insertions, 21 deletions
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index 62d9703b7a..8418573618 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -560,27 +560,22 @@ ffmpeg -i INPUT -metadata:s:a:0 language=eng OUTPUT
@item -disposition[:stream_specifier] @var{value} (@emph{output,per-stream})
Sets the disposition for a stream.
-This option overrides the disposition copied from the input stream. It is also
-possible to delete the disposition by setting it to 0.
-
-The following dispositions are recognized:
-@table @option
-@item default
-@item dub
-@item original
-@item comment
-@item lyrics
-@item karaoke
-@item forced
-@item hearing_impaired
-@item visual_impaired
-@item clean_effects
-@item attached_pic
-@item captions
-@item descriptions
-@item dependent
-@item metadata
-@end table
+By default, the disposition is copied from the input stream, unless the output
+stream this option applies to is fed by a complex filtergraph - in that case the
+disposition is unset by default.
+
+@var{value} is a sequence of items separated by '+' or '-'. The first item may
+also be prefixed with '+' or '-', in which case this option modifies the default
+value. Otherwise (the first item is not prefixed) this options overrides the
+default value. A '+' prefix adds the given disposition, '-' removes it. It is
+also possible to clear the disposition by setting it to 0.
+
+If no @code{-disposition} options were specified for an output file, ffmpeg will
+automatically set the 'default' disposition on the first stream of each type,
+when there are multiple streams of this type in the output file and no stream of
+that type is already marked as default.
+
+The @code{-dispositions} option lists the known dispositions.
For example, to make the second audio stream the default stream:
@example