avtools-common-opts.texi 5.8 KB

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