avtools-common-opts.texi 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. All the numerical options, if not specified otherwise, accept in input
  2. a string representing a number, which may contain one of the
  3. International System number postfixes, for example 'K', 'M', 'G'.
  4. If 'i' is appended after the postfix, powers of 2 are used instead of
  5. powers of 10. The 'B' postfix multiplies the value for 8, and can be
  6. appended after another postfix or used alone. This allows using for
  7. example 'KB', 'MiB', 'G' and 'B' as postfix.
  8. Options which do not take arguments are boolean options, and set the
  9. corresponding value to true. They can be set to false by prefixing
  10. with "no" the option name, for example using "-nofoo" in the
  11. command line will set to false the boolean option with name "foo".
  12. @anchor{Stream specifiers}
  13. @section Stream specifiers
  14. Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
  15. are used to precisely specify which stream(s) does a given option belong to.
  16. A stream specifier is a string generally appended to the option name and
  17. separated from it by a colon. E.g. @code{-codec:a:1 ac3} option contains
  18. @code{a:1} stream specifer, which matches the second audio stream. Therefore it
  19. would select the ac3 codec for the second audio stream.
  20. A stream specifier can match several stream, the option is then applied to all
  21. of them. E.g. the stream specifier in @code{-b:a 128k} matches all audio
  22. streams.
  23. An empty stream specifier matches all streams, for example @code{-codec copy}
  24. or @code{-codec: copy} would copy all the streams without reencoding.
  25. Possible forms of stream specifiers are:
  26. @table @option
  27. @item @var{stream_index}
  28. Matches the stream with this index. E.g. @code{-threads:1 4} would set the
  29. thread count for the second stream to 4.
  30. @item @var{stream_type}[:@var{stream_index}]
  31. @var{stream_type} is one of: 'v' for video, 'a' for audio, 's' for subtitle,
  32. 'd' for data and 't' for attachments. If @var{stream_index} is given, then
  33. matches stream number @var{stream_index} of this type. Otherwise matches all
  34. streams of this type.
  35. @item p:@var{program_id}[:@var{stream_index}]
  36. If @var{stream_index} is given, then matches stream number @var{stream_index} in
  37. program with id @var{program_id}. Otherwise matches all streams in this program.
  38. @item #@var{stream_id}
  39. Matches the stream by format-specific ID.
  40. @end table
  41. @section Generic options
  42. These options are shared amongst the av* tools.
  43. @table @option
  44. @item -L
  45. Show license.
  46. @item -h, -?, -help, --help
  47. Show help.
  48. @item -version
  49. Show version.
  50. @item -formats
  51. Show available formats.
  52. The fields preceding the format names have the following meanings:
  53. @table @samp
  54. @item D
  55. Decoding available
  56. @item E
  57. Encoding available
  58. @end table
  59. @item -codecs
  60. Show available codecs.
  61. The fields preceding the codec names have the following meanings:
  62. @table @samp
  63. @item D
  64. Decoding available
  65. @item E
  66. Encoding available
  67. @item V/A/S
  68. Video/audio/subtitle codec
  69. @item S
  70. Codec supports slices
  71. @item D
  72. Codec supports direct rendering
  73. @item T
  74. Codec can handle input truncated at random locations instead of only at frame boundaries
  75. @end table
  76. @item -bsfs
  77. Show available bitstream filters.
  78. @item -protocols
  79. Show available protocols.
  80. @item -filters
  81. Show available libavfilter filters.
  82. @item -pix_fmts
  83. Show available pixel formats.
  84. @item -sample_fmts
  85. Show available sample formats.
  86. @item -loglevel @var{loglevel} | -v @var{loglevel}
  87. Set the logging level used by the library.
  88. @var{loglevel} is a number or a string containing one of the following values:
  89. @table @samp
  90. @item quiet
  91. @item panic
  92. @item fatal
  93. @item error
  94. @item warning
  95. @item info
  96. @item verbose
  97. @item debug
  98. @end table
  99. By default the program logs to stderr, if coloring is supported by the
  100. terminal, colors are used to mark errors and warnings. Log coloring
  101. can be disabled setting the environment variable
  102. @env{AV_LOG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
  103. the environment variable @env{AV_LOG_FORCE_COLOR}.
  104. The use of the environment variable @env{NO_COLOR} is deprecated and
  105. will be dropped in a following FFmpeg version.
  106. @item -report
  107. Dump full command line and console output to a file named
  108. @code{@var{program}-@var{YYYYMMDD}-@var{HHMMSS}.log} in the current
  109. directory.
  110. This file can be useful for bug reports.
  111. It also implies @code{-loglevel verbose}.
  112. Note: setting the environment variable @code{FFREPORT} to any value has the
  113. same effect.
  114. @item -cpuflags flags (@emph{global})
  115. Allows setting and clearing cpu flags. This option is intended
  116. for testing. Do not use it unless you know what you're doing.
  117. @example
  118. ffmpeg -cpuflags -sse+mmx ...
  119. ffmpeg -cpuflags mmx ...
  120. ffmpeg -cpuflags 0 ...
  121. @end example
  122. @end table
  123. @section AVOptions
  124. These options are provided directly by the libavformat, libavdevice and
  125. libavcodec libraries. To see the list of available AVOptions, use the
  126. @option{-help} option. They are separated into two categories:
  127. @table @option
  128. @item generic
  129. These options can be set for any container, codec or device. Generic options
  130. are listed under AVFormatContext options for containers/devices and under
  131. AVCodecContext options for codecs.
  132. @item private
  133. These options are specific to the given container, device or codec. Private
  134. options are listed under their corresponding containers/devices/codecs.
  135. @end table
  136. For example to write an ID3v2.3 header instead of a default ID3v2.4 to
  137. an MP3 file, use the @option{id3v2_version} private option of the MP3
  138. muxer:
  139. @example
  140. ffmpeg -i input.flac -id3v2_version 3 out.mp3
  141. @end example
  142. All codec AVOptions are obviously per-stream, so the chapter on stream
  143. specifiers applies to them
  144. Note @option{-nooption} syntax cannot be used for boolean AVOptions,
  145. use @option{-option 0}/@option{-option 1}.
  146. Note2 old undocumented way of specifying per-stream AVOptions by prepending
  147. v/a/s to the options name is now obsolete and will be removed soon.
  148. @include avoptions_codec.texi
  149. @include avoptions_format.texi