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.

1275 lines
31KB

  1. @anchor{codec-options}
  2. @chapter Codec Options
  3. @c man begin CODEC OPTIONS
  4. libavcodec provides some generic global options, which can be set on
  5. all the encoders and decoders. In addition each codec may support
  6. so-called private options, which are specific for a given codec.
  7. Sometimes, a global option may only affect a specific kind of codec,
  8. and may be nonsensical or ignored by another, so you need to be aware
  9. of the meaning of the specified options. Also some options are
  10. meant only for decoding or encoding.
  11. Options may be set by specifying -@var{option} @var{value} in the
  12. FFmpeg tools, or by setting the value explicitly in the
  13. @code{AVCodecContext} options or using the @file{libavutil/opt.h} API
  14. for programmatic use.
  15. The list of supported options follow:
  16. @table @option
  17. @item b @var{integer} (@emph{encoding,audio,video})
  18. Set bitrate in bits/s. Default value is 200K.
  19. @item ab @var{integer} (@emph{encoding,audio})
  20. Set audio bitrate (in bits/s). Default value is 128K.
  21. @item bt @var{integer} (@emph{encoding,video})
  22. Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate
  23. tolerance specifies how far ratecontrol is willing to deviate from the
  24. target average bitrate value. This is not related to min/max
  25. bitrate. Lowering tolerance too much has an adverse effect on quality.
  26. @item flags @var{flags} (@emph{decoding/encoding,audio,video,subtitles})
  27. Set generic flags.
  28. Possible values:
  29. @table @samp
  30. @item mv4
  31. Use four motion vector by macroblock (mpeg4).
  32. @item qpel
  33. Use 1/4 pel motion compensation.
  34. @item loop
  35. Use loop filter.
  36. @item qscale
  37. Use fixed qscale.
  38. @item pass1
  39. Use internal 2pass ratecontrol in first pass mode.
  40. @item pass2
  41. Use internal 2pass ratecontrol in second pass mode.
  42. @item gray
  43. Only decode/encode grayscale.
  44. @item emu_edge
  45. Do not draw edges.
  46. @item psnr
  47. Set error[?] variables during encoding.
  48. @item truncated
  49. Input bitstream might be randomly truncated.
  50. @item drop_changed
  51. Don't output frames whose parameters differ from first decoded frame in stream.
  52. Error AVERROR_INPUT_CHANGED is returned when a frame is dropped.
  53. @item ildct
  54. Use interlaced DCT.
  55. @item low_delay
  56. Force low delay.
  57. @item global_header
  58. Place global headers in extradata instead of every keyframe.
  59. @item bitexact
  60. Only write platform-, build- and time-independent data. (except (I)DCT).
  61. This ensures that file and data checksums are reproducible and match between
  62. platforms. Its primary use is for regression testing.
  63. @item aic
  64. Apply H263 advanced intra coding / mpeg4 ac prediction.
  65. @item cbp
  66. Deprecated, use mpegvideo private options instead.
  67. @item qprd
  68. Deprecated, use mpegvideo private options instead.
  69. @item ilme
  70. Apply interlaced motion estimation.
  71. @item cgop
  72. Use closed gop.
  73. @item output_corrupt
  74. Output even potentially corrupted frames.
  75. @end table
  76. @item me_method @var{integer} (@emph{encoding,video})
  77. Set motion estimation method.
  78. Possible values:
  79. @table @samp
  80. @item zero
  81. zero motion estimation (fastest)
  82. @item full
  83. full motion estimation (slowest)
  84. @item epzs
  85. EPZS motion estimation (default)
  86. @item esa
  87. esa motion estimation (alias for full)
  88. @item tesa
  89. tesa motion estimation
  90. @item dia
  91. dia motion estimation (alias for epzs)
  92. @item log
  93. log motion estimation
  94. @item phods
  95. phods motion estimation
  96. @item x1
  97. X1 motion estimation
  98. @item hex
  99. hex motion estimation
  100. @item umh
  101. umh motion estimation
  102. @item iter
  103. iter motion estimation
  104. @end table
  105. @item extradata_size @var{integer}
  106. Set extradata size.
  107. @item time_base @var{rational number}
  108. Set codec time base.
  109. It is the fundamental unit of time (in seconds) in terms of which
  110. frame timestamps are represented. For fixed-fps content, timebase
  111. should be @code{1 / frame_rate} and timestamp increments should be
  112. identically 1.
  113. @item g @var{integer} (@emph{encoding,video})
  114. Set the group of picture (GOP) size. Default value is 12.
  115. @item ar @var{integer} (@emph{decoding/encoding,audio})
  116. Set audio sampling rate (in Hz).
  117. @item ac @var{integer} (@emph{decoding/encoding,audio})
  118. Set number of audio channels.
  119. @item cutoff @var{integer} (@emph{encoding,audio})
  120. Set cutoff bandwidth. (Supported only by selected encoders, see
  121. their respective documentation sections.)
  122. @item frame_size @var{integer} (@emph{encoding,audio})
  123. Set audio frame size.
  124. Each submitted frame except the last must contain exactly frame_size
  125. samples per channel. May be 0 when the codec has
  126. CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is not
  127. restricted. It is set by some decoders to indicate constant frame
  128. size.
  129. @item frame_number @var{integer}
  130. Set the frame number.
  131. @item delay @var{integer}
  132. @item qcomp @var{float} (@emph{encoding,video})
  133. Set video quantizer scale compression (VBR). It is used as a constant
  134. in the ratecontrol equation. Recommended range for default rc_eq:
  135. 0.0-1.0.
  136. @item qblur @var{float} (@emph{encoding,video})
  137. Set video quantizer scale blur (VBR).
  138. @item qmin @var{integer} (@emph{encoding,video})
  139. Set min video quantizer scale (VBR). Must be included between -1 and
  140. 69, default value is 2.
  141. @item qmax @var{integer} (@emph{encoding,video})
  142. Set max video quantizer scale (VBR). Must be included between -1 and
  143. 1024, default value is 31.
  144. @item qdiff @var{integer} (@emph{encoding,video})
  145. Set max difference between the quantizer scale (VBR).
  146. @item bf @var{integer} (@emph{encoding,video})
  147. Set max number of B frames between non-B-frames.
  148. Must be an integer between -1 and 16. 0 means that B-frames are
  149. disabled. If a value of -1 is used, it will choose an automatic value
  150. depending on the encoder.
  151. Default value is 0.
  152. @item b_qfactor @var{float} (@emph{encoding,video})
  153. Set qp factor between P and B frames.
  154. @item rc_strategy @var{integer} (@emph{encoding,video})
  155. Set ratecontrol method.
  156. @item b_strategy @var{integer} (@emph{encoding,video})
  157. Set strategy to choose between I/P/B-frames.
  158. @item ps @var{integer} (@emph{encoding,video})
  159. Set RTP payload size in bytes.
  160. @item mv_bits @var{integer}
  161. @item header_bits @var{integer}
  162. @item i_tex_bits @var{integer}
  163. @item p_tex_bits @var{integer}
  164. @item i_count @var{integer}
  165. @item p_count @var{integer}
  166. @item skip_count @var{integer}
  167. @item misc_bits @var{integer}
  168. @item frame_bits @var{integer}
  169. @item codec_tag @var{integer}
  170. @item bug @var{flags} (@emph{decoding,video})
  171. Workaround not auto detected encoder bugs.
  172. Possible values:
  173. @table @samp
  174. @item autodetect
  175. @item old_msmpeg4
  176. some old lavc generated msmpeg4v3 files (no autodetection)
  177. @item xvid_ilace
  178. Xvid interlacing bug (autodetected if fourcc==XVIX)
  179. @item ump4
  180. (autodetected if fourcc==UMP4)
  181. @item no_padding
  182. padding bug (autodetected)
  183. @item amv
  184. @item ac_vlc
  185. illegal vlc bug (autodetected per fourcc)
  186. @item qpel_chroma
  187. @item std_qpel
  188. old standard qpel (autodetected per fourcc/version)
  189. @item qpel_chroma2
  190. @item direct_blocksize
  191. direct-qpel-blocksize bug (autodetected per fourcc/version)
  192. @item edge
  193. edge padding bug (autodetected per fourcc/version)
  194. @item hpel_chroma
  195. @item dc_clip
  196. @item ms
  197. Workaround various bugs in microsoft broken decoders.
  198. @item trunc
  199. trancated frames
  200. @end table
  201. @item lelim @var{integer} (@emph{encoding,video})
  202. Set single coefficient elimination threshold for luminance (negative
  203. values also consider DC coefficient).
  204. @item celim @var{integer} (@emph{encoding,video})
  205. Set single coefficient elimination threshold for chrominance (negative
  206. values also consider dc coefficient)
  207. @item strict @var{integer} (@emph{decoding/encoding,audio,video})
  208. Specify how strictly to follow the standards.
  209. Possible values:
  210. @table @samp
  211. @item very
  212. strictly conform to an older more strict version of the spec or reference software
  213. @item strict
  214. strictly conform to all the things in the spec no matter what consequences
  215. @item normal
  216. @item unofficial
  217. allow unofficial extensions
  218. @item experimental
  219. allow non standardized experimental things, experimental
  220. (unfinished/work in progress/not well tested) decoders and encoders.
  221. Note: experimental decoders can pose a security risk, do not use this for
  222. decoding untrusted input.
  223. @end table
  224. @item b_qoffset @var{float} (@emph{encoding,video})
  225. Set QP offset between P and B frames.
  226. @item err_detect @var{flags} (@emph{decoding,audio,video})
  227. Set error detection flags.
  228. Possible values:
  229. @table @samp
  230. @item crccheck
  231. verify embedded CRCs
  232. @item bitstream
  233. detect bitstream specification deviations
  234. @item buffer
  235. detect improper bitstream length
  236. @item explode
  237. abort decoding on minor error detection
  238. @item ignore_err
  239. ignore decoding errors, and continue decoding.
  240. This is useful if you want to analyze the content of a video and thus want
  241. everything to be decoded no matter what. This option will not result in a video
  242. that is pleasing to watch in case of errors.
  243. @item careful
  244. consider things that violate the spec and have not been seen in the wild as errors
  245. @item compliant
  246. consider all spec non compliancies as errors
  247. @item aggressive
  248. consider things that a sane encoder should not do as an error
  249. @end table
  250. @item has_b_frames @var{integer}
  251. @item block_align @var{integer}
  252. @item mpeg_quant @var{integer} (@emph{encoding,video})
  253. Use MPEG quantizers instead of H.263.
  254. @item qsquish @var{float} (@emph{encoding,video})
  255. How to keep quantizer between qmin and qmax (0 = clip, 1 = use
  256. differentiable function).
  257. @item rc_qmod_amp @var{float} (@emph{encoding,video})
  258. Set experimental quantizer modulation.
  259. @item rc_qmod_freq @var{integer} (@emph{encoding,video})
  260. Set experimental quantizer modulation.
  261. @item rc_override_count @var{integer}
  262. @item rc_eq @var{string} (@emph{encoding,video})
  263. Set rate control equation. When computing the expression, besides the
  264. standard functions defined in the section 'Expression Evaluation', the
  265. following functions are available: bits2qp(bits), qp2bits(qp). Also
  266. the following constants are available: iTex pTex tex mv fCode iCount
  267. mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex
  268. avgTex.
  269. @item maxrate @var{integer} (@emph{encoding,audio,video})
  270. Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
  271. @item minrate @var{integer} (@emph{encoding,audio,video})
  272. Set min bitrate tolerance (in bits/s). Most useful in setting up a CBR
  273. encode. It is of little use elsewise.
  274. @item bufsize @var{integer} (@emph{encoding,audio,video})
  275. Set ratecontrol buffer size (in bits).
  276. @item rc_buf_aggressivity @var{float} (@emph{encoding,video})
  277. Currently useless.
  278. @item i_qfactor @var{float} (@emph{encoding,video})
  279. Set QP factor between P and I frames.
  280. @item i_qoffset @var{float} (@emph{encoding,video})
  281. Set QP offset between P and I frames.
  282. @item rc_init_cplx @var{float} (@emph{encoding,video})
  283. Set initial complexity for 1-pass encoding.
  284. @item dct @var{integer} (@emph{encoding,video})
  285. Set DCT algorithm.
  286. Possible values:
  287. @table @samp
  288. @item auto
  289. autoselect a good one (default)
  290. @item fastint
  291. fast integer
  292. @item int
  293. accurate integer
  294. @item mmx
  295. @item altivec
  296. @item faan
  297. floating point AAN DCT
  298. @end table
  299. @item lumi_mask @var{float} (@emph{encoding,video})
  300. Compress bright areas stronger than medium ones.
  301. @item tcplx_mask @var{float} (@emph{encoding,video})
  302. Set temporal complexity masking.
  303. @item scplx_mask @var{float} (@emph{encoding,video})
  304. Set spatial complexity masking.
  305. @item p_mask @var{float} (@emph{encoding,video})
  306. Set inter masking.
  307. @item dark_mask @var{float} (@emph{encoding,video})
  308. Compress dark areas stronger than medium ones.
  309. @item idct @var{integer} (@emph{decoding/encoding,video})
  310. Select IDCT implementation.
  311. Possible values:
  312. @table @samp
  313. @item auto
  314. @item int
  315. @item simple
  316. @item simplemmx
  317. @item simpleauto
  318. Automatically pick a IDCT compatible with the simple one
  319. @item arm
  320. @item altivec
  321. @item sh4
  322. @item simplearm
  323. @item simplearmv5te
  324. @item simplearmv6
  325. @item simpleneon
  326. @item simplealpha
  327. @item ipp
  328. @item xvidmmx
  329. @item faani
  330. floating point AAN IDCT
  331. @end table
  332. @item slice_count @var{integer}
  333. @item ec @var{flags} (@emph{decoding,video})
  334. Set error concealment strategy.
  335. Possible values:
  336. @table @samp
  337. @item guess_mvs
  338. iterative motion vector (MV) search (slow)
  339. @item deblock
  340. use strong deblock filter for damaged MBs
  341. @item favor_inter
  342. favor predicting from the previous frame instead of the current
  343. @end table
  344. @item bits_per_coded_sample @var{integer}
  345. @item pred @var{integer} (@emph{encoding,video})
  346. Set prediction method.
  347. Possible values:
  348. @table @samp
  349. @item left
  350. @item plane
  351. @item median
  352. @end table
  353. @item aspect @var{rational number} (@emph{encoding,video})
  354. Set sample aspect ratio.
  355. @item sar @var{rational number} (@emph{encoding,video})
  356. Set sample aspect ratio. Alias to @var{aspect}.
  357. @item debug @var{flags} (@emph{decoding/encoding,audio,video,subtitles})
  358. Print specific debug info.
  359. Possible values:
  360. @table @samp
  361. @item pict
  362. picture info
  363. @item rc
  364. rate control
  365. @item bitstream
  366. @item mb_type
  367. macroblock (MB) type
  368. @item qp
  369. per-block quantization parameter (QP)
  370. @item dct_coeff
  371. @item green_metadata
  372. display complexity metadata for the upcoming frame, GoP or for a given duration.
  373. @item skip
  374. @item startcode
  375. @item er
  376. error recognition
  377. @item mmco
  378. memory management control operations (H.264)
  379. @item bugs
  380. @item buffers
  381. picture buffer allocations
  382. @item thread_ops
  383. threading operations
  384. @item nomc
  385. skip motion compensation
  386. @end table
  387. @item cmp @var{integer} (@emph{encoding,video})
  388. Set full pel me compare function.
  389. Possible values:
  390. @table @samp
  391. @item sad
  392. sum of absolute differences, fast (default)
  393. @item sse
  394. sum of squared errors
  395. @item satd
  396. sum of absolute Hadamard transformed differences
  397. @item dct
  398. sum of absolute DCT transformed differences
  399. @item psnr
  400. sum of squared quantization errors (avoid, low quality)
  401. @item bit
  402. number of bits needed for the block
  403. @item rd
  404. rate distortion optimal, slow
  405. @item zero
  406. 0
  407. @item vsad
  408. sum of absolute vertical differences
  409. @item vsse
  410. sum of squared vertical differences
  411. @item nsse
  412. noise preserving sum of squared differences
  413. @item w53
  414. 5/3 wavelet, only used in snow
  415. @item w97
  416. 9/7 wavelet, only used in snow
  417. @item dctmax
  418. @item chroma
  419. @end table
  420. @item subcmp @var{integer} (@emph{encoding,video})
  421. Set sub pel me compare function.
  422. Possible values:
  423. @table @samp
  424. @item sad
  425. sum of absolute differences, fast (default)
  426. @item sse
  427. sum of squared errors
  428. @item satd
  429. sum of absolute Hadamard transformed differences
  430. @item dct
  431. sum of absolute DCT transformed differences
  432. @item psnr
  433. sum of squared quantization errors (avoid, low quality)
  434. @item bit
  435. number of bits needed for the block
  436. @item rd
  437. rate distortion optimal, slow
  438. @item zero
  439. 0
  440. @item vsad
  441. sum of absolute vertical differences
  442. @item vsse
  443. sum of squared vertical differences
  444. @item nsse
  445. noise preserving sum of squared differences
  446. @item w53
  447. 5/3 wavelet, only used in snow
  448. @item w97
  449. 9/7 wavelet, only used in snow
  450. @item dctmax
  451. @item chroma
  452. @end table
  453. @item mbcmp @var{integer} (@emph{encoding,video})
  454. Set macroblock compare function.
  455. Possible values:
  456. @table @samp
  457. @item sad
  458. sum of absolute differences, fast (default)
  459. @item sse
  460. sum of squared errors
  461. @item satd
  462. sum of absolute Hadamard transformed differences
  463. @item dct
  464. sum of absolute DCT transformed differences
  465. @item psnr
  466. sum of squared quantization errors (avoid, low quality)
  467. @item bit
  468. number of bits needed for the block
  469. @item rd
  470. rate distortion optimal, slow
  471. @item zero
  472. 0
  473. @item vsad
  474. sum of absolute vertical differences
  475. @item vsse
  476. sum of squared vertical differences
  477. @item nsse
  478. noise preserving sum of squared differences
  479. @item w53
  480. 5/3 wavelet, only used in snow
  481. @item w97
  482. 9/7 wavelet, only used in snow
  483. @item dctmax
  484. @item chroma
  485. @end table
  486. @item ildctcmp @var{integer} (@emph{encoding,video})
  487. Set interlaced dct compare function.
  488. Possible values:
  489. @table @samp
  490. @item sad
  491. sum of absolute differences, fast (default)
  492. @item sse
  493. sum of squared errors
  494. @item satd
  495. sum of absolute Hadamard transformed differences
  496. @item dct
  497. sum of absolute DCT transformed differences
  498. @item psnr
  499. sum of squared quantization errors (avoid, low quality)
  500. @item bit
  501. number of bits needed for the block
  502. @item rd
  503. rate distortion optimal, slow
  504. @item zero
  505. 0
  506. @item vsad
  507. sum of absolute vertical differences
  508. @item vsse
  509. sum of squared vertical differences
  510. @item nsse
  511. noise preserving sum of squared differences
  512. @item w53
  513. 5/3 wavelet, only used in snow
  514. @item w97
  515. 9/7 wavelet, only used in snow
  516. @item dctmax
  517. @item chroma
  518. @end table
  519. @item dia_size @var{integer} (@emph{encoding,video})
  520. Set diamond type & size for motion estimation.
  521. @table @samp
  522. @item (1024, INT_MAX)
  523. full motion estimation(slowest)
  524. @item (768, 1024]
  525. umh motion estimation
  526. @item (512, 768]
  527. hex motion estimation
  528. @item (256, 512]
  529. l2s diamond motion estimation
  530. @item [2,256]
  531. var diamond motion estimation
  532. @item (-1, 2)
  533. small diamond motion estimation
  534. @item -1
  535. funny diamond motion estimation
  536. @item (INT_MIN, -1)
  537. sab diamond motion estimation
  538. @end table
  539. @item last_pred @var{integer} (@emph{encoding,video})
  540. Set amount of motion predictors from the previous frame.
  541. @item preme @var{integer} (@emph{encoding,video})
  542. Set pre motion estimation.
  543. @item precmp @var{integer} (@emph{encoding,video})
  544. Set pre motion estimation compare function.
  545. Possible values:
  546. @table @samp
  547. @item sad
  548. sum of absolute differences, fast (default)
  549. @item sse
  550. sum of squared errors
  551. @item satd
  552. sum of absolute Hadamard transformed differences
  553. @item dct
  554. sum of absolute DCT transformed differences
  555. @item psnr
  556. sum of squared quantization errors (avoid, low quality)
  557. @item bit
  558. number of bits needed for the block
  559. @item rd
  560. rate distortion optimal, slow
  561. @item zero
  562. 0
  563. @item vsad
  564. sum of absolute vertical differences
  565. @item vsse
  566. sum of squared vertical differences
  567. @item nsse
  568. noise preserving sum of squared differences
  569. @item w53
  570. 5/3 wavelet, only used in snow
  571. @item w97
  572. 9/7 wavelet, only used in snow
  573. @item dctmax
  574. @item chroma
  575. @end table
  576. @item pre_dia_size @var{integer} (@emph{encoding,video})
  577. Set diamond type & size for motion estimation pre-pass.
  578. @item subq @var{integer} (@emph{encoding,video})
  579. Set sub pel motion estimation quality.
  580. @item dtg_active_format @var{integer}
  581. @item me_range @var{integer} (@emph{encoding,video})
  582. Set limit motion vectors range (1023 for DivX player).
  583. @item ibias @var{integer} (@emph{encoding,video})
  584. Set intra quant bias.
  585. @item pbias @var{integer} (@emph{encoding,video})
  586. Set inter quant bias.
  587. @item color_table_id @var{integer}
  588. @item global_quality @var{integer} (@emph{encoding,audio,video})
  589. @item coder @var{integer} (@emph{encoding,video})
  590. Possible values:
  591. @table @samp
  592. @item vlc
  593. variable length coder / huffman coder
  594. @item ac
  595. arithmetic coder
  596. @item raw
  597. raw (no encoding)
  598. @item rle
  599. run-length coder
  600. @item deflate
  601. deflate-based coder
  602. @end table
  603. @item context @var{integer} (@emph{encoding,video})
  604. Set context model.
  605. @item slice_flags @var{integer}
  606. @item mbd @var{integer} (@emph{encoding,video})
  607. Set macroblock decision algorithm (high quality mode).
  608. Possible values:
  609. @table @samp
  610. @item simple
  611. use mbcmp (default)
  612. @item bits
  613. use fewest bits
  614. @item rd
  615. use best rate distortion
  616. @end table
  617. @item stream_codec_tag @var{integer}
  618. @item sc_threshold @var{integer} (@emph{encoding,video})
  619. Set scene change threshold.
  620. @item lmin @var{integer} (@emph{encoding,video})
  621. Set min lagrange factor (VBR).
  622. @item lmax @var{integer} (@emph{encoding,video})
  623. Set max lagrange factor (VBR).
  624. @item nr @var{integer} (@emph{encoding,video})
  625. Set noise reduction.
  626. @item rc_init_occupancy @var{integer} (@emph{encoding,video})
  627. Set number of bits which should be loaded into the rc buffer before
  628. decoding starts.
  629. @item flags2 @var{flags} (@emph{decoding/encoding,audio,video,subtitles})
  630. Possible values:
  631. @table @samp
  632. @item fast
  633. Allow non spec compliant speedup tricks.
  634. @item noout
  635. Skip bitstream encoding.
  636. @item ignorecrop
  637. Ignore cropping information from sps.
  638. @item local_header
  639. Place global headers at every keyframe instead of in extradata.
  640. @item chunks
  641. Frame data might be split into multiple chunks.
  642. @item showall
  643. Show all frames before the first keyframe.
  644. @item export_mvs
  645. Export motion vectors into frame side-data (see @code{AV_FRAME_DATA_MOTION_VECTORS})
  646. for codecs that support it. See also @file{doc/examples/export_mvs.c}.
  647. @item skip_manual
  648. Do not skip samples and export skip information as frame side data.
  649. @item ass_ro_flush_noop
  650. Do not reset ASS ReadOrder field on flush.
  651. @end table
  652. @item export_side_data @var{flags} (@emph{decoding/encoding,audio,video,subtitles})
  653. Possible values:
  654. @table @samp
  655. @item mvs
  656. Export motion vectors into frame side-data (see @code{AV_FRAME_DATA_MOTION_VECTORS})
  657. for codecs that support it. See also @file{doc/examples/export_mvs.c}.
  658. @item prft
  659. Export encoder Producer Reference Time into packet side-data (see @code{AV_PKT_DATA_PRFT})
  660. for codecs that support it.
  661. @item venc_params
  662. Export video encoding parameters through frame side data (see @code{AV_FRAME_DATA_VIDEO_ENC_PARAMS})
  663. for codecs that support it. At present, those are H.264 and VP9.
  664. @item film_grain
  665. Export film grain parameters through frame side data (see @code{AV_FRAME_DATA_FILM_GRAIN_PARAMS}).
  666. Supported at present by AV1 decoders.
  667. @end table
  668. @item error @var{integer} (@emph{encoding,video})
  669. @item qns @var{integer} (@emph{encoding,video})
  670. Deprecated, use mpegvideo private options instead.
  671. @item threads @var{integer} (@emph{decoding/encoding,video})
  672. Set the number of threads to be used, in case the selected codec
  673. implementation supports multi-threading.
  674. Possible values:
  675. @table @samp
  676. @item auto, 0
  677. automatically select the number of threads to set
  678. @end table
  679. Default value is @samp{auto}.
  680. @item me_threshold @var{integer} (@emph{encoding,video})
  681. Set motion estimation threshold.
  682. @item mb_threshold @var{integer} (@emph{encoding,video})
  683. Set macroblock threshold.
  684. @item dc @var{integer} (@emph{encoding,video})
  685. Set intra_dc_precision.
  686. @item nssew @var{integer} (@emph{encoding,video})
  687. Set nsse weight.
  688. @item skip_top @var{integer} (@emph{decoding,video})
  689. Set number of macroblock rows at the top which are skipped.
  690. @item skip_bottom @var{integer} (@emph{decoding,video})
  691. Set number of macroblock rows at the bottom which are skipped.
  692. @item profile @var{integer} (@emph{encoding,audio,video})
  693. Set encoder codec profile. Default value is @samp{unknown}. Encoder specific
  694. profiles are documented in the relevant encoder documentation.
  695. @item level @var{integer} (@emph{encoding,audio,video})
  696. Possible values:
  697. @table @samp
  698. @item unknown
  699. @end table
  700. @item lowres @var{integer} (@emph{decoding,audio,video})
  701. Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
  702. @item skip_threshold @var{integer} (@emph{encoding,video})
  703. Set frame skip threshold.
  704. @item skip_factor @var{integer} (@emph{encoding,video})
  705. Set frame skip factor.
  706. @item skip_exp @var{integer} (@emph{encoding,video})
  707. Set frame skip exponent.
  708. Negative values behave identical to the corresponding positive ones, except
  709. that the score is normalized.
  710. Positive values exist primarily for compatibility reasons and are not so useful.
  711. @item skipcmp @var{integer} (@emph{encoding,video})
  712. Set frame skip compare function.
  713. Possible values:
  714. @table @samp
  715. @item sad
  716. sum of absolute differences, fast (default)
  717. @item sse
  718. sum of squared errors
  719. @item satd
  720. sum of absolute Hadamard transformed differences
  721. @item dct
  722. sum of absolute DCT transformed differences
  723. @item psnr
  724. sum of squared quantization errors (avoid, low quality)
  725. @item bit
  726. number of bits needed for the block
  727. @item rd
  728. rate distortion optimal, slow
  729. @item zero
  730. 0
  731. @item vsad
  732. sum of absolute vertical differences
  733. @item vsse
  734. sum of squared vertical differences
  735. @item nsse
  736. noise preserving sum of squared differences
  737. @item w53
  738. 5/3 wavelet, only used in snow
  739. @item w97
  740. 9/7 wavelet, only used in snow
  741. @item dctmax
  742. @item chroma
  743. @end table
  744. @item border_mask @var{float} (@emph{encoding,video})
  745. Increase the quantizer for macroblocks close to borders.
  746. @item mblmin @var{integer} (@emph{encoding,video})
  747. Set min macroblock lagrange factor (VBR).
  748. @item mblmax @var{integer} (@emph{encoding,video})
  749. Set max macroblock lagrange factor (VBR).
  750. @item mepc @var{integer} (@emph{encoding,video})
  751. Set motion estimation bitrate penalty compensation (1.0 = 256).
  752. @item skip_loop_filter @var{integer} (@emph{decoding,video})
  753. @item skip_idct @var{integer} (@emph{decoding,video})
  754. @item skip_frame @var{integer} (@emph{decoding,video})
  755. Make decoder discard processing depending on the frame type selected
  756. by the option value.
  757. @option{skip_loop_filter} skips frame loop filtering, @option{skip_idct}
  758. skips frame IDCT/dequantization, @option{skip_frame} skips decoding.
  759. Possible values:
  760. @table @samp
  761. @item none
  762. Discard no frame.
  763. @item default
  764. Discard useless frames like 0-sized frames.
  765. @item noref
  766. Discard all non-reference frames.
  767. @item bidir
  768. Discard all bidirectional frames.
  769. @item nokey
  770. Discard all frames excepts keyframes.
  771. @item nointra
  772. Discard all frames except I frames.
  773. @item all
  774. Discard all frames.
  775. @end table
  776. Default value is @samp{default}.
  777. @item bidir_refine @var{integer} (@emph{encoding,video})
  778. Refine the two motion vectors used in bidirectional macroblocks.
  779. @item brd_scale @var{integer} (@emph{encoding,video})
  780. Downscale frames for dynamic B-frame decision.
  781. @item keyint_min @var{integer} (@emph{encoding,video})
  782. Set minimum interval between IDR-frames.
  783. @item refs @var{integer} (@emph{encoding,video})
  784. Set reference frames to consider for motion compensation.
  785. @item chromaoffset @var{integer} (@emph{encoding,video})
  786. Set chroma qp offset from luma.
  787. @item trellis @var{integer} (@emph{encoding,audio,video})
  788. Set rate-distortion optimal quantization.
  789. @item mv0_threshold @var{integer} (@emph{encoding,video})
  790. @item b_sensitivity @var{integer} (@emph{encoding,video})
  791. Adjust sensitivity of b_frame_strategy 1.
  792. @item compression_level @var{integer} (@emph{encoding,audio,video})
  793. @item min_prediction_order @var{integer} (@emph{encoding,audio})
  794. @item max_prediction_order @var{integer} (@emph{encoding,audio})
  795. @item timecode_frame_start @var{integer} (@emph{encoding,video})
  796. Set GOP timecode frame start number, in non drop frame format.
  797. @item request_channels @var{integer} (@emph{decoding,audio})
  798. Set desired number of audio channels.
  799. @item bits_per_raw_sample @var{integer}
  800. @item channel_layout @var{integer} (@emph{decoding/encoding,audio})
  801. Possible values:
  802. @table @samp
  803. @end table
  804. @item request_channel_layout @var{integer} (@emph{decoding,audio})
  805. Possible values:
  806. @table @samp
  807. @end table
  808. @item rc_max_vbv_use @var{float} (@emph{encoding,video})
  809. @item rc_min_vbv_use @var{float} (@emph{encoding,video})
  810. @item ticks_per_frame @var{integer} (@emph{decoding/encoding,audio,video})
  811. @item color_primaries @var{integer} (@emph{decoding/encoding,video})
  812. Possible values:
  813. @table @samp
  814. @item bt709
  815. BT.709
  816. @item bt470m
  817. BT.470 M
  818. @item bt470bg
  819. BT.470 BG
  820. @item smpte170m
  821. SMPTE 170 M
  822. @item smpte240m
  823. SMPTE 240 M
  824. @item film
  825. Film
  826. @item bt2020
  827. BT.2020
  828. @item smpte428
  829. @item smpte428_1
  830. SMPTE ST 428-1
  831. @item smpte431
  832. SMPTE 431-2
  833. @item smpte432
  834. SMPTE 432-1
  835. @item jedec-p22
  836. JEDEC P22
  837. @end table
  838. @item color_trc @var{integer} (@emph{decoding/encoding,video})
  839. Possible values:
  840. @table @samp
  841. @item bt709
  842. BT.709
  843. @item gamma22
  844. BT.470 M
  845. @item gamma28
  846. BT.470 BG
  847. @item smpte170m
  848. SMPTE 170 M
  849. @item smpte240m
  850. SMPTE 240 M
  851. @item linear
  852. Linear
  853. @item log
  854. @item log100
  855. Log
  856. @item log_sqrt
  857. @item log316
  858. Log square root
  859. @item iec61966_2_4
  860. @item iec61966-2-4
  861. IEC 61966-2-4
  862. @item bt1361
  863. @item bt1361e
  864. BT.1361
  865. @item iec61966_2_1
  866. @item iec61966-2-1
  867. IEC 61966-2-1
  868. @item bt2020_10
  869. @item bt2020_10bit
  870. BT.2020 - 10 bit
  871. @item bt2020_12
  872. @item bt2020_12bit
  873. BT.2020 - 12 bit
  874. @item smpte2084
  875. SMPTE ST 2084
  876. @item smpte428
  877. @item smpte428_1
  878. SMPTE ST 428-1
  879. @item arib-std-b67
  880. ARIB STD-B67
  881. @end table
  882. @item colorspace @var{integer} (@emph{decoding/encoding,video})
  883. Possible values:
  884. @table @samp
  885. @item rgb
  886. RGB
  887. @item bt709
  888. BT.709
  889. @item fcc
  890. FCC
  891. @item bt470bg
  892. BT.470 BG
  893. @item smpte170m
  894. SMPTE 170 M
  895. @item smpte240m
  896. SMPTE 240 M
  897. @item ycocg
  898. YCOCG
  899. @item bt2020nc
  900. @item bt2020_ncl
  901. BT.2020 NCL
  902. @item bt2020c
  903. @item bt2020_cl
  904. BT.2020 CL
  905. @item smpte2085
  906. SMPTE 2085
  907. @item chroma-derived-nc
  908. Chroma-derived NCL
  909. @item chroma-derived-c
  910. Chroma-derived CL
  911. @item ictcp
  912. ICtCp
  913. @end table
  914. @item color_range @var{integer} (@emph{decoding/encoding,video})
  915. If used as input parameter, it serves as a hint to the decoder, which
  916. color_range the input has.
  917. Possible values:
  918. @table @samp
  919. @item tv
  920. @item mpeg
  921. MPEG (219*2^(n-8))
  922. @item pc
  923. @item jpeg
  924. JPEG (2^n-1)
  925. @end table
  926. @item chroma_sample_location @var{integer} (@emph{decoding/encoding,video})
  927. Possible values:
  928. @table @samp
  929. @item left
  930. @item center
  931. @item topleft
  932. @item top
  933. @item bottomleft
  934. @item bottom
  935. @end table
  936. @item log_level_offset @var{integer}
  937. Set the log level offset.
  938. @item slices @var{integer} (@emph{encoding,video})
  939. Number of slices, used in parallelized encoding.
  940. @item thread_type @var{flags} (@emph{decoding/encoding,video})
  941. Select which multithreading methods to use.
  942. Use of @samp{frame} will increase decoding delay by one frame per
  943. thread, so clients which cannot provide future frames should not use
  944. it.
  945. Possible values:
  946. @table @samp
  947. @item slice
  948. Decode more than one part of a single frame at once.
  949. Multithreading using slices works only when the video was encoded with
  950. slices.
  951. @item frame
  952. Decode more than one frame at once.
  953. @end table
  954. Default value is @samp{slice+frame}.
  955. @item audio_service_type @var{integer} (@emph{encoding,audio})
  956. Set audio service type.
  957. Possible values:
  958. @table @samp
  959. @item ma
  960. Main Audio Service
  961. @item ef
  962. Effects
  963. @item vi
  964. Visually Impaired
  965. @item hi
  966. Hearing Impaired
  967. @item di
  968. Dialogue
  969. @item co
  970. Commentary
  971. @item em
  972. Emergency
  973. @item vo
  974. Voice Over
  975. @item ka
  976. Karaoke
  977. @end table
  978. @item request_sample_fmt @var{sample_fmt} (@emph{decoding,audio})
  979. Set sample format audio decoders should prefer. Default value is
  980. @code{none}.
  981. @item pkt_timebase @var{rational number}
  982. @item sub_charenc @var{encoding} (@emph{decoding,subtitles})
  983. Set the input subtitles character encoding.
  984. @item field_order @var{field_order} (@emph{video})
  985. Set/override the field order of the video.
  986. Possible values:
  987. @table @samp
  988. @item progressive
  989. Progressive video
  990. @item tt
  991. Interlaced video, top field coded and displayed first
  992. @item bb
  993. Interlaced video, bottom field coded and displayed first
  994. @item tb
  995. Interlaced video, top coded first, bottom displayed first
  996. @item bt
  997. Interlaced video, bottom coded first, top displayed first
  998. @end table
  999. @item skip_alpha @var{bool} (@emph{decoding,video})
  1000. Set to 1 to disable processing alpha (transparency). This works like the
  1001. @samp{gray} flag in the @option{flags} option which skips chroma information
  1002. instead of alpha. Default is 0.
  1003. @item codec_whitelist @var{list} (@emph{input})
  1004. "," separated list of allowed decoders. By default all are allowed.
  1005. @item dump_separator @var{string} (@emph{input})
  1006. Separator used to separate the fields printed on the command line about the
  1007. Stream parameters.
  1008. For example, to separate the fields with newlines and indentation:
  1009. @example
  1010. ffprobe -dump_separator "
  1011. " -i ~/videos/matrixbench_mpeg2.mpg
  1012. @end example
  1013. @item max_pixels @var{integer} (@emph{decoding/encoding,video})
  1014. Maximum number of pixels per image. This value can be used to avoid out of
  1015. memory failures due to large images.
  1016. @item apply_cropping @var{bool} (@emph{decoding,video})
  1017. Enable cropping if cropping parameters are multiples of the required
  1018. alignment for the left and top parameters. If the alignment is not met the
  1019. cropping will be partially applied to maintain alignment.
  1020. Default is 1 (enabled).
  1021. Note: The required alignment depends on if @code{AV_CODEC_FLAG_UNALIGNED} is set and the
  1022. CPU. @code{AV_CODEC_FLAG_UNALIGNED} cannot be changed from the command line. Also hardware
  1023. decoders will not apply left/top Cropping.
  1024. @end table
  1025. @c man end CODEC OPTIONS
  1026. @ifclear config-writeonly
  1027. @include decoders.texi
  1028. @end ifclear
  1029. @ifclear config-readonly
  1030. @include encoders.texi
  1031. @end ifclear