avtools-common-opts.texi 7.1 KB

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