formats.texi 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. @chapter Format Options
  2. @c man begin FORMAT OPTIONS
  3. The libavformat library provides some generic global options, which
  4. can be set on all the muxers and demuxers. In addition each muxer or
  5. demuxer may support so-called private options, which are specific for
  6. that component.
  7. Options may be set by specifying -@var{option} @var{value} in the
  8. FFmpeg tools, or by setting the value explicitly in the
  9. @code{AVFormatContext} options or using the @file{libavutil/opt.h} API
  10. for programmatic use.
  11. The list of supported options follows:
  12. @table @option
  13. @item avioflags @var{flags} (@emph{input/output})
  14. Possible values:
  15. @table @samp
  16. @item direct
  17. Reduce buffering.
  18. @end table
  19. @item probesize @var{integer} (@emph{input})
  20. Set probing size in bytes, i.e. the size of the data to analyze to get
  21. stream information. A higher value will enable detecting more
  22. information in case it is dispersed into the stream, but will increase
  23. latency. Must be an integer not lesser than 32. It is 5000000 by default.
  24. @item packetsize @var{integer} (@emph{output})
  25. Set packet size.
  26. @item fflags @var{flags} (@emph{input/output})
  27. Set format flags.
  28. Possible values:
  29. @table @samp
  30. @item ignidx
  31. Ignore index.
  32. @item genpts
  33. Generate PTS.
  34. @item nofillin
  35. Do not fill in missing values that can be exactly calculated.
  36. @item noparse
  37. Disable AVParsers, this needs @code{+nofillin} too.
  38. @item igndts
  39. Ignore DTS.
  40. @item discardcorrupt
  41. Discard corrupted frames.
  42. @item sortdts
  43. Try to interleave output packets by DTS.
  44. @item keepside
  45. Do not merge side data.
  46. @item latm
  47. Enable RTP MP4A-LATM payload.
  48. @item nobuffer
  49. Reduce the latency introduced by optional buffering
  50. @end table
  51. @item seek2any @var{integer} (@emph{input})
  52. Allow seeking to non-keyframes on demuxer level when supported if set to 1.
  53. Default is 0.
  54. @item analyzeduration @var{integer} (@emph{input})
  55. Specify how many microseconds are analyzed to probe the input. A
  56. higher value will enable detecting more accurate information, but will
  57. increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
  58. @item cryptokey @var{hexadecimal string} (@emph{input})
  59. Set decryption key.
  60. @item indexmem @var{integer} (@emph{input})
  61. Set max memory used for timestamp index (per stream).
  62. @item rtbufsize @var{integer} (@emph{input})
  63. Set max memory used for buffering real-time frames.
  64. @item fdebug @var{flags} (@emph{input/output})
  65. Print specific debug info.
  66. Possible values:
  67. @table @samp
  68. @item ts
  69. @end table
  70. @item max_delay @var{integer} (@emph{input/output})
  71. Set maximum muxing or demuxing delay in microseconds.
  72. @item fpsprobesize @var{integer} (@emph{input})
  73. Set number of frames used to probe fps.
  74. @item audio_preload @var{integer} (@emph{output})
  75. Set microseconds by which audio packets should be interleaved earlier.
  76. @item chunk_duration @var{integer} (@emph{output})
  77. Set microseconds for each chunk.
  78. @item chunk_size @var{integer} (@emph{output})
  79. Set size in bytes for each chunk.
  80. @item err_detect, f_err_detect @var{flags} (@emph{input})
  81. Set error detection flags. @code{f_err_detect} is deprecated and
  82. should be used only via the @command{ffmpeg} tool.
  83. Possible values:
  84. @table @samp
  85. @item crccheck
  86. Verify embedded CRCs.
  87. @item bitstream
  88. Detect bitstream specification deviations.
  89. @item buffer
  90. Detect improper bitstream length.
  91. @item explode
  92. Abort decoding on minor error detection.
  93. @item careful
  94. Consider things that violate the spec and have not been seen in the
  95. wild as errors.
  96. @item compliant
  97. Consider all spec non compliancies as errors.
  98. @item aggressive
  99. Consider things that a sane encoder should not do as an error.
  100. @end table
  101. @item use_wallclock_as_timestamps @var{integer} (@emph{input})
  102. Use wallclock as timestamps.
  103. @item avoid_negative_ts @var{integer} (@emph{output})
  104. Possible values:
  105. @table @samp
  106. @item make_non_negative
  107. Shift timestamps to make them non-negative.
  108. Also note that this affects only leading negative timestamps, and not
  109. non-monotonic negative timestamps.
  110. @item make_zero
  111. Shift timestamps so that the first timestamp is 0.
  112. @item auto (default)
  113. Enables shifting when required by the target format.
  114. @item disabled
  115. Disables shifting of timestamp.
  116. @end table
  117. When shifting is enabled, all output timestamps are shifted by the
  118. same amount. Audio, video, and subtitles desynching and relative
  119. timestamp differences are preserved compared to how they would have
  120. been without shifting.
  121. @item skip_initial_bytes @var{integer} (@emph{input})
  122. Set number of bytes to skip before reading header and frames if set to 1.
  123. Default is 0.
  124. @item correct_ts_overflow @var{integer} (@emph{input})
  125. Correct single timestamp overflows if set to 1. Default is 1.
  126. @item flush_packets @var{integer} (@emph{output})
  127. Flush the underlying I/O stream after each packet. Default 1 enables it, and
  128. has the effect of reducing the latency; 0 disables it and may slightly
  129. increase performance in some cases.
  130. @item output_ts_offset @var{offset} (@emph{output})
  131. Set the output time offset.
  132. @var{offset} must be a time duration specification,
  133. see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
  134. The offset is added by the muxer to the output timestamps.
  135. Specifying a positive offset means that the corresponding streams are
  136. delayed bt the time duration specified in @var{offset}. Default value
  137. is @code{0} (meaning that no offset is applied).
  138. @end table
  139. @c man end FORMAT OPTIONS
  140. @anchor{Format stream specifiers}
  141. @section Format stream specifiers
  142. Format stream specifiers allow selection of one or more streams that
  143. match specific properties.
  144. Possible forms of stream specifiers are:
  145. @table @option
  146. @item @var{stream_index}
  147. Matches the stream with this index.
  148. @item @var{stream_type}[:@var{stream_index}]
  149. @var{stream_type} is one of following: 'v' for video, 'a' for audio,
  150. 's' for subtitle, 'd' for data, and 't' for attachments. If
  151. @var{stream_index} is given, then it matches the stream number
  152. @var{stream_index} of this type. Otherwise, it matches all streams of
  153. this type.
  154. @item p:@var{program_id}[:@var{stream_index}]
  155. If @var{stream_index} is given, then it matches the stream with number
  156. @var{stream_index} in the program with the id
  157. @var{program_id}. Otherwise, it matches all streams in the program.
  158. @item #@var{stream_id}
  159. Matches the stream by a format-specific ID.
  160. @end table
  161. The exact semantics of stream specifiers is defined by the
  162. @code{avformat_match_stream_specifier()} function declared in the
  163. @file{libavformat/avformat.h} header.
  164. @ifclear config-writeonly
  165. @include demuxers.texi
  166. @end ifclear
  167. @ifclear config-readonly
  168. @include muxers.texi
  169. @end ifclear
  170. @include metadata.texi