You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

194 lines
6.5KB

  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 specifer, 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 stream, 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 i:@var{stream_id}
  40. Match the stream by stream id (e.g. PID in MPEG-TS container).
  41. @item m:@var{key}[:@var{value}]
  42. Matches streams with the metadata tag @var{key} having the specified value. If
  43. @var{value} is not given, matches streams that contain the given tag with any
  44. value.
  45. Note that in @command{avconv}, matching by metadata will only work properly for
  46. input files.
  47. @end table
  48. @section Generic options
  49. These options are shared amongst the av* tools.
  50. @table @option
  51. @item -L
  52. Show license.
  53. @item -h, -?, -help, --help [@var{arg}]
  54. Show help. An optional parameter may be specified to print help about a specific
  55. item.
  56. Possible values of @var{arg} are:
  57. @table @option
  58. @item decoder=@var{decoder_name}
  59. Print detailed information about the decoder named @var{decoder_name}. Use the
  60. @option{-decoders} option to get a list of all decoders.
  61. @item encoder=@var{encoder_name}
  62. Print detailed information about the encoder named @var{encoder_name}. Use the
  63. @option{-encoders} option to get a list of all encoders.
  64. @item demuxer=@var{demuxer_name}
  65. Print detailed information about the demuxer named @var{demuxer_name}. Use the
  66. @option{-formats} option to get a list of all demuxers and muxers.
  67. @item muxer=@var{muxer_name}
  68. Print detailed information about the muxer named @var{muxer_name}. Use the
  69. @option{-formats} option to get a list of all muxers and demuxers.
  70. @item filter=@var{filter_name}
  71. Print detailed information about the filter name @var{filter_name}. Use the
  72. @option{-filters} option to get a list of all filters.
  73. @end table
  74. @item -version
  75. Show version.
  76. @item -formats
  77. Show available formats.
  78. The fields preceding the format names have the following meanings:
  79. @table @samp
  80. @item D
  81. Decoding available
  82. @item E
  83. Encoding available
  84. @end table
  85. @item -codecs
  86. Show all codecs known to libavcodec.
  87. Note that the term 'codec' is used throughout this documentation as a shortcut
  88. for what is more correctly called a media bitstream format.
  89. @item -decoders
  90. Show available decoders.
  91. @item -encoders
  92. Show all available encoders.
  93. @item -bsfs
  94. Show available bitstream filters.
  95. @item -protocols
  96. Show available protocols.
  97. @item -filters
  98. Show available libavfilter filters.
  99. @item -pix_fmts
  100. Show available pixel formats.
  101. @item -sample_fmts
  102. Show available sample formats.
  103. @item -loglevel @var{loglevel} | -v @var{loglevel}
  104. Set the logging level used by the library.
  105. @var{loglevel} is a number or a string containing one of the following values:
  106. @table @samp
  107. @item quiet
  108. @item panic
  109. @item fatal
  110. @item error
  111. @item warning
  112. @item info
  113. @item verbose
  114. @item debug
  115. @end table
  116. By default the program logs to stderr, if coloring is supported by the
  117. terminal, colors are used to mark errors and warnings. Log coloring
  118. can be disabled setting the environment variable
  119. @env{AV_LOG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
  120. the environment variable @env{AV_LOG_FORCE_COLOR}.
  121. The use of the environment variable @env{NO_COLOR} is deprecated and
  122. will be dropped in a following Libav version.
  123. @item -cpuflags mask (@emph{global})
  124. Set a mask that's applied to autodetected CPU flags. This option is intended
  125. for testing. Do not use it unless you know what you're doing.
  126. @end table
  127. @section AVOptions
  128. These options are provided directly by the libavformat, libavdevice and
  129. libavcodec libraries. To see the list of available AVOptions, use the
  130. @option{-help} option. They are separated into two categories:
  131. @table @option
  132. @item generic
  133. These options can be set for any container, codec or device. Generic options
  134. are listed under AVFormatContext options for containers/devices and under
  135. AVCodecContext options for codecs.
  136. @item private
  137. These options are specific to the given container, device or codec. Private
  138. options are listed under their corresponding containers/devices/codecs.
  139. @end table
  140. For example to write an ID3v2.3 header instead of a default ID3v2.4 to
  141. an MP3 file, use the @option{id3v2_version} private option of the MP3
  142. muxer:
  143. @example
  144. avconv -i input.flac -id3v2_version 3 out.mp3
  145. @end example
  146. All codec AVOptions are obviously per-stream, so the chapter on stream
  147. specifiers applies to them
  148. Note @option{-nooption} syntax cannot be used for boolean AVOptions,
  149. use @option{-option 0}/@option{-option 1}.
  150. Note2 old undocumented way of specifying per-stream AVOptions by prepending
  151. v/a/s to the options name is now obsolete and will be removed soon.
  152. @include avoptions_codec.texi
  153. @include avoptions_format.texi