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.

193 lines
5.8KB

  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 allow to detect 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 allow to detect 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. Shift timestamps to make them non-negative. A value of 1 enables shifting,
  105. a value of 0 disables it, the default value of -1 enables shifting
  106. when required by the target format.
  107. When shifting is enabled, all output timestamps are shifted by the
  108. same amount. Audio, video, and subtitles desynching and relative
  109. timestamp differences are preserved compared to how they would have
  110. been without shifting.
  111. Also note that this affects only leading negative timestamps, and not
  112. non-monotonic negative timestamps.
  113. @item skip_initial_bytes @var{integer} (@emph{input})
  114. Set number of bytes to skip before reading header and frames if set to 1.
  115. Default is 0.
  116. @item correct_ts_overflow @var{integer} (@emph{input})
  117. Correct single timestamp overflows if set to 1. Default is 1.
  118. @item flush_packets @var{integer} (@emph{output})
  119. Flush the underlying I/O stream after each packet. Default 1 enables it, and
  120. has the effect of reducing the latency; 0 disables it and may slightly
  121. increase performance in some cases.
  122. @end table
  123. @c man end FORMAT OPTIONS
  124. @anchor{Format stream specifiers}
  125. @section Format stream specifiers
  126. Format stream specifiers allow selection of one or more streams that
  127. match specific properties.
  128. Possible forms of stream specifiers are:
  129. @table @option
  130. @item @var{stream_index}
  131. Matches the stream with this index.
  132. @item @var{stream_type}[:@var{stream_index}]
  133. @var{stream_type} is one of following: 'v' for video, 'a' for audio,
  134. 's' for subtitle, 'd' for data, and 't' for attachments. If
  135. @var{stream_index} is given, then it matches the stream number
  136. @var{stream_index} of this type. Otherwise, it matches all streams of
  137. this type.
  138. @item p:@var{program_id}[:@var{stream_index}]
  139. If @var{stream_index} is given, then it matches the stream with number
  140. @var{stream_index} in the program with the id
  141. @var{program_id}. Otherwise, it matches all streams in the program.
  142. @item #@var{stream_id}
  143. Matches the stream by a format-specific ID.
  144. @end table
  145. The exact semantics of stream specifiers is defined by the
  146. @code{avformat_match_stream_specifier()} function declared in the
  147. @file{libavformat/avformat.h} header.
  148. @ifclear config-writeonly
  149. @include demuxers.texi
  150. @end ifclear
  151. @ifclear config-readonly
  152. @include muxers.texi
  153. @end ifclear
  154. @include metadata.texi