codecs.texi 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121
  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 unsensical 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 gmc
  39. Use gmc.
  40. @item mv0
  41. Always try a mb with mv=<0,0>.
  42. @item input_preserved
  43. @item pass1
  44. Use internal 2pass ratecontrol in first pass mode.
  45. @item pass2
  46. Use internal 2pass ratecontrol in second pass mode.
  47. @item gray
  48. Only decode/encode grayscale.
  49. @item emu_edge
  50. Do not draw edges.
  51. @item psnr
  52. Set error[?] variables during encoding.
  53. @item truncated
  54. @item naq
  55. Normalize adaptive quantization.
  56. @item ildct
  57. Use interlaced DCT.
  58. @item low_delay
  59. Force low delay.
  60. @item global_header
  61. Place global headers in extradata instead of every keyframe.
  62. @item bitexact
  63. Use only bitexact stuff (except (I)DCT).
  64. @item aic
  65. Apply H263 advanced intra coding / mpeg4 ac prediction.
  66. @item cbp
  67. Deprecated, use mpegvideo private options instead.
  68. @item qprd
  69. Deprecated, use mpegvideo private options instead.
  70. @item ilme
  71. Apply interlaced motion estimation.
  72. @item cgop
  73. Use closed gop.
  74. @end table
  75. @item me_method @var{integer} (@emph{encoding,video})
  76. Set motion estimation method.
  77. Possible values:
  78. @table @samp
  79. @item zero
  80. zero motion estimation (fastest)
  81. @item full
  82. full motion estimation (slowest)
  83. @item epzs
  84. EPZS motion estimation (default)
  85. @item esa
  86. esa motion estimation (alias for full)
  87. @item tesa
  88. tesa motion estimation
  89. @item dia
  90. dia motion estimation (alias for epzs)
  91. @item log
  92. log motion estimation
  93. @item phods
  94. phods motion estimation
  95. @item x1
  96. X1 motion estimation
  97. @item hex
  98. hex motion estimation
  99. @item umh
  100. umh motion estimation
  101. @item iter
  102. iter motion estimation
  103. @end table
  104. @item extradata_size @var{integer}
  105. Set extradata size.
  106. @item time_base @var{rational number}
  107. Set codec time base.
  108. It is the fundamental unit of time (in seconds) in terms of which
  109. frame timestamps are represented. For fixed-fps content, timebase
  110. should be @code{1 / frame_rate} and timestamp increments should be
  111. identically 1.
  112. @item g @var{integer} (@emph{encoding,video})
  113. Set the group of picture size. Default value is 12.
  114. @item ar @var{integer} (@emph{decoding/encoding,audio})
  115. Set audio sampling rate (in Hz).
  116. @item ac @var{integer} (@emph{decoding/encoding,audio})
  117. Set number of audio channels.
  118. @item cutoff @var{integer} (@emph{encoding,audio})
  119. Set cutoff bandwidth.
  120. @item frame_size @var{integer} (@emph{encoding,audio})
  121. Set audio frame size.
  122. Each submitted frame except the last must contain exactly frame_size
  123. samples per channel. May be 0 when the codec has
  124. CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is not
  125. restricted. It is set by some decoders to indicate constant frame
  126. size.
  127. @item frame_number @var{integer}
  128. Set the frame number.
  129. @item delay @var{integer}
  130. @item qcomp @var{float} (@emph{encoding,video})
  131. Set video quantizer scale compression (VBR). It is used as a constant
  132. in the ratecontrol equation. Recommended range for default rc_eq:
  133. 0.0-1.0.
  134. @item qblur @var{float} (@emph{encoding,video})
  135. Set video quantizer scale blur (VBR).
  136. @item qmin @var{integer} (@emph{encoding,video})
  137. Set min video quantizer scale (VBR). Must be included between -1 and
  138. 69, default value is 2.
  139. @item qmax @var{integer} (@emph{encoding,video})
  140. Set max video quantizer scale (VBR). Must be included between -1 and
  141. 1024, default value is 31.
  142. @item qdiff @var{integer} (@emph{encoding,video})
  143. Set max difference between the quantizer scale (VBR).
  144. @item bf @var{integer} (@emph{encoding,video})
  145. Set max number of B frames between non-B-frames.
  146. Must be an integer between -1 and 16. 0 means that B-frames are
  147. disabled. If a value of -1 is used, it will choose an automatic value
  148. depending on the encoder.
  149. Default value is 0.
  150. @item b_qfactor @var{float} (@emph{encoding,video})
  151. Set qp factor between P and B frames.
  152. @item rc_strategy @var{integer} (@emph{encoding,video})
  153. Set ratecontrol method.
  154. @item b_strategy @var{integer} (@emph{encoding,video})
  155. Set strategy to choose between I/P/B-frames.
  156. @item ps @var{integer} (@emph{encoding,video})
  157. Set RTP payload size in bytes.
  158. @item mv_bits @var{integer}
  159. @item header_bits @var{integer}
  160. @item i_tex_bits @var{integer}
  161. @item p_tex_bits @var{integer}
  162. @item i_count @var{integer}
  163. @item p_count @var{integer}
  164. @item skip_count @var{integer}
  165. @item misc_bits @var{integer}
  166. @item frame_bits @var{integer}
  167. @item codec_tag @var{integer}
  168. @item bug @var{flags} (@emph{decoding,video})
  169. Workaround not auto detected encoder bugs.
  170. Possible values:
  171. @table @samp
  172. @item autodetect
  173. @item old_msmpeg4
  174. some old lavc generated msmpeg4v3 files (no autodetection)
  175. @item xvid_ilace
  176. Xvid interlacing bug (autodetected if fourcc==XVIX)
  177. @item ump4
  178. (autodetected if fourcc==UMP4)
  179. @item no_padding
  180. padding bug (autodetected)
  181. @item amv
  182. @item ac_vlc
  183. illegal vlc bug (autodetected per fourcc)
  184. @item qpel_chroma
  185. @item std_qpel
  186. old standard qpel (autodetected per fourcc/version)
  187. @item qpel_chroma2
  188. @item direct_blocksize
  189. direct-qpel-blocksize bug (autodetected per fourcc/version)
  190. @item edge
  191. edge padding bug (autodetected per fourcc/version)
  192. @item hpel_chroma
  193. @item dc_clip
  194. @item ms
  195. Workaround various bugs in microsoft broken decoders.
  196. @item trunc
  197. trancated frames
  198. @end table
  199. @item lelim @var{integer} (@emph{encoding,video})
  200. Set single coefficient elimination threshold for luminance (negative
  201. values also consider DC coefficient).
  202. @item celim @var{integer} (@emph{encoding,video})
  203. Set single coefficient elimination threshold for chrominance (negative
  204. values also consider dc coefficient)
  205. @item strict @var{integer} (@emph{decoding/encoding,audio,video})
  206. Specify how strictly to follow the standards.
  207. Possible values:
  208. @table @samp
  209. @item very
  210. strictly conform to a older more strict version of the spec or reference software
  211. @item strict
  212. strictly conform to all the things in the spec no matter what consequences
  213. @item normal
  214. @item unofficial
  215. allow unofficial extensions
  216. @item experimental
  217. allow non standardized experimental things, experimental
  218. (unfinished/work in progress/not well tested) decoders and encoders.
  219. Note: experimental decoders can pose a security risk, do not use this for
  220. decoding untrusted input.
  221. @end table
  222. @item b_qoffset @var{float} (@emph{encoding,video})
  223. Set QP offset between P and B frames.
  224. @item err_detect @var{flags} (@emph{decoding,audio,video})
  225. Set error detection flags.
  226. Possible values:
  227. @table @samp
  228. @item crccheck
  229. verify embedded CRCs
  230. @item bitstream
  231. detect bitstream specification deviations
  232. @item buffer
  233. detect improper bitstream length
  234. @item explode
  235. abort decoding on minor error detection
  236. @item ignore_err
  237. ignore decoding errors, and continue decoding.
  238. This is useful if you want to analyze the content of a video and thus want
  239. everything to be decoded no matter what. This option will not result in a video
  240. that is pleasing to watch in case of errors.
  241. @item careful
  242. consider things that violate the spec and have not been seen in the wild as errors
  243. @item compliant
  244. consider all spec non compliancies as errors
  245. @item aggressive
  246. consider things that a sane encoder should not do as an error
  247. @end table
  248. @item has_b_frames @var{integer}
  249. @item block_align @var{integer}
  250. @item mpeg_quant @var{integer} (@emph{encoding,video})
  251. Use MPEG quantizers instead of H.263.
  252. @item qsquish @var{float} (@emph{encoding,video})
  253. How to keep quantizer between qmin and qmax (0 = clip, 1 = use
  254. differentiable function).
  255. @item rc_qmod_amp @var{float} (@emph{encoding,video})
  256. Set experimental quantizer modulation.
  257. @item rc_qmod_freq @var{integer} (@emph{encoding,video})
  258. Set experimental quantizer modulation.
  259. @item rc_override_count @var{integer}
  260. @item rc_eq @var{string} (@emph{encoding,video})
  261. Set rate control equation. When computing the expression, besides the
  262. standard functions defined in the section 'Expression Evaluation', the
  263. following functions are available: bits2qp(bits), qp2bits(qp). Also
  264. the following constants are available: iTex pTex tex mv fCode iCount
  265. mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex
  266. avgTex.
  267. @item maxrate @var{integer} (@emph{encoding,audio,video})
  268. Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
  269. @item minrate @var{integer} (@emph{encoding,audio,video})
  270. Set min bitrate tolerance (in bits/s). Most useful in setting up a CBR
  271. encode. It is of little use elsewise.
  272. @item bufsize @var{integer} (@emph{encoding,audio,video})
  273. Set ratecontrol buffer size (in bits).
  274. @item rc_buf_aggressivity @var{float} (@emph{encoding,video})
  275. Currently useless.
  276. @item i_qfactor @var{float} (@emph{encoding,video})
  277. Set QP factor between P and I frames.
  278. @item i_qoffset @var{float} (@emph{encoding,video})
  279. Set QP offset between P and I frames.
  280. @item rc_init_cplx @var{float} (@emph{encoding,video})
  281. Set initial complexity for 1-pass encoding.
  282. @item dct @var{integer} (@emph{encoding,video})
  283. Set DCT algorithm.
  284. Possible values:
  285. @table @samp
  286. @item auto
  287. autoselect a good one (default)
  288. @item fastint
  289. fast integer
  290. @item int
  291. accurate integer
  292. @item mmx
  293. @item altivec
  294. @item faan
  295. floating point AAN DCT
  296. @end table
  297. @item lumi_mask @var{float} (@emph{encoding,video})
  298. Compress bright areas stronger than medium ones.
  299. @item tcplx_mask @var{float} (@emph{encoding,video})
  300. Set temporal complexity masking.
  301. @item scplx_mask @var{float} (@emph{encoding,video})
  302. Set spatial complexity masking.
  303. @item p_mask @var{float} (@emph{encoding,video})
  304. Set inter masking.
  305. @item dark_mask @var{float} (@emph{encoding,video})
  306. Compress dark areas stronger than medium ones.
  307. @item idct @var{integer} (@emph{decoding/encoding,video})
  308. Select IDCT implementation.
  309. Possible values:
  310. @table @samp
  311. @item auto
  312. @item int
  313. @item simple
  314. @item simplemmx
  315. @item simpleauto
  316. Automatically pick a IDCT compatible with the simple one
  317. @item arm
  318. @item altivec
  319. @item sh4
  320. @item simplearm
  321. @item simplearmv5te
  322. @item simplearmv6
  323. @item simpleneon
  324. @item simplealpha
  325. @item ipp
  326. @item xvidmmx
  327. @item faani
  328. floating point AAN IDCT
  329. @end table
  330. @item slice_count @var{integer}
  331. @item ec @var{flags} (@emph{decoding,video})
  332. Set error concealment strategy.
  333. Possible values:
  334. @table @samp
  335. @item guess_mvs
  336. iterative motion vector (MV) search (slow)
  337. @item deblock
  338. use strong deblock filter for damaged MBs
  339. @item favor_inter
  340. favor predicting from the previous frame instead of the current
  341. @end table
  342. @item bits_per_coded_sample @var{integer}
  343. @item pred @var{integer} (@emph{encoding,video})
  344. Set prediction method.
  345. Possible values:
  346. @table @samp
  347. @item left
  348. @item plane
  349. @item median
  350. @end table
  351. @item aspect @var{rational number} (@emph{encoding,video})
  352. Set sample aspect ratio.
  353. @item debug @var{flags} (@emph{decoding/encoding,audio,video,subtitles})
  354. Print specific debug info.
  355. Possible values:
  356. @table @samp
  357. @item pict
  358. picture info
  359. @item rc
  360. rate control
  361. @item bitstream
  362. @item mb_type
  363. macroblock (MB) type
  364. @item qp
  365. per-block quantization parameter (QP)
  366. @item mv
  367. motion vector
  368. @item dct_coeff
  369. @item skip
  370. @item startcode
  371. @item pts
  372. @item er
  373. error recognition
  374. @item mmco
  375. memory management control operations (H.264)
  376. @item bugs
  377. @item vis_qp
  378. visualize quantization parameter (QP), lower QP are tinted greener
  379. @item vis_mb_type
  380. visualize block types
  381. @item buffers
  382. picture buffer allocations
  383. @item thread_ops
  384. threading operations
  385. @end table
  386. @item vismv @var{integer} (@emph{decoding,video})
  387. Visualize motion vectors (MVs).
  388. Possible values:
  389. @table @samp
  390. @item pf
  391. forward predicted MVs of P-frames
  392. @item bf
  393. forward predicted MVs of B-frames
  394. @item bb
  395. backward predicted MVs of B-frames
  396. @end table
  397. @item cmp @var{integer} (@emph{encoding,video})
  398. Set full pel me compare function.
  399. Possible values:
  400. @table @samp
  401. @item sad
  402. sum of absolute differences, fast (default)
  403. @item sse
  404. sum of squared errors
  405. @item satd
  406. sum of absolute Hadamard transformed differences
  407. @item dct
  408. sum of absolute DCT transformed differences
  409. @item psnr
  410. sum of squared quantization errors (avoid, low quality)
  411. @item bit
  412. number of bits needed for the block
  413. @item rd
  414. rate distortion optimal, slow
  415. @item zero
  416. 0
  417. @item vsad
  418. sum of absolute vertical differences
  419. @item vsse
  420. sum of squared vertical differences
  421. @item nsse
  422. noise preserving sum of squared differences
  423. @item w53
  424. 5/3 wavelet, only used in snow
  425. @item w97
  426. 9/7 wavelet, only used in snow
  427. @item dctmax
  428. @item chroma
  429. @end table
  430. @item subcmp @var{integer} (@emph{encoding,video})
  431. Set sub pel me compare function.
  432. Possible values:
  433. @table @samp
  434. @item sad
  435. sum of absolute differences, fast (default)
  436. @item sse
  437. sum of squared errors
  438. @item satd
  439. sum of absolute Hadamard transformed differences
  440. @item dct
  441. sum of absolute DCT transformed differences
  442. @item psnr
  443. sum of squared quantization errors (avoid, low quality)
  444. @item bit
  445. number of bits needed for the block
  446. @item rd
  447. rate distortion optimal, slow
  448. @item zero
  449. 0
  450. @item vsad
  451. sum of absolute vertical differences
  452. @item vsse
  453. sum of squared vertical differences
  454. @item nsse
  455. noise preserving sum of squared differences
  456. @item w53
  457. 5/3 wavelet, only used in snow
  458. @item w97
  459. 9/7 wavelet, only used in snow
  460. @item dctmax
  461. @item chroma
  462. @end table
  463. @item mbcmp @var{integer} (@emph{encoding,video})
  464. Set macroblock compare function.
  465. Possible values:
  466. @table @samp
  467. @item sad
  468. sum of absolute differences, fast (default)
  469. @item sse
  470. sum of squared errors
  471. @item satd
  472. sum of absolute Hadamard transformed differences
  473. @item dct
  474. sum of absolute DCT transformed differences
  475. @item psnr
  476. sum of squared quantization errors (avoid, low quality)
  477. @item bit
  478. number of bits needed for the block
  479. @item rd
  480. rate distortion optimal, slow
  481. @item zero
  482. 0
  483. @item vsad
  484. sum of absolute vertical differences
  485. @item vsse
  486. sum of squared vertical differences
  487. @item nsse
  488. noise preserving sum of squared differences
  489. @item w53
  490. 5/3 wavelet, only used in snow
  491. @item w97
  492. 9/7 wavelet, only used in snow
  493. @item dctmax
  494. @item chroma
  495. @end table
  496. @item ildctcmp @var{integer} (@emph{encoding,video})
  497. Set interlaced dct compare function.
  498. Possible values:
  499. @table @samp
  500. @item sad
  501. sum of absolute differences, fast (default)
  502. @item sse
  503. sum of squared errors
  504. @item satd
  505. sum of absolute Hadamard transformed differences
  506. @item dct
  507. sum of absolute DCT transformed differences
  508. @item psnr
  509. sum of squared quantization errors (avoid, low quality)
  510. @item bit
  511. number of bits needed for the block
  512. @item rd
  513. rate distortion optimal, slow
  514. @item zero
  515. 0
  516. @item vsad
  517. sum of absolute vertical differences
  518. @item vsse
  519. sum of squared vertical differences
  520. @item nsse
  521. noise preserving sum of squared differences
  522. @item w53
  523. 5/3 wavelet, only used in snow
  524. @item w97
  525. 9/7 wavelet, only used in snow
  526. @item dctmax
  527. @item chroma
  528. @end table
  529. @item dia_size @var{integer} (@emph{encoding,video})
  530. Set diamond type & size for motion estimation.
  531. @item last_pred @var{integer} (@emph{encoding,video})
  532. Set amount of motion predictors from the previous frame.
  533. @item preme @var{integer} (@emph{encoding,video})
  534. Set pre motion estimation.
  535. @item precmp @var{integer} (@emph{encoding,video})
  536. Set pre motion estimation compare function.
  537. Possible values:
  538. @table @samp
  539. @item sad
  540. sum of absolute differences, fast (default)
  541. @item sse
  542. sum of squared errors
  543. @item satd
  544. sum of absolute Hadamard transformed differences
  545. @item dct
  546. sum of absolute DCT transformed differences
  547. @item psnr
  548. sum of squared quantization errors (avoid, low quality)
  549. @item bit
  550. number of bits needed for the block
  551. @item rd
  552. rate distortion optimal, slow
  553. @item zero
  554. 0
  555. @item vsad
  556. sum of absolute vertical differences
  557. @item vsse
  558. sum of squared vertical differences
  559. @item nsse
  560. noise preserving sum of squared differences
  561. @item w53
  562. 5/3 wavelet, only used in snow
  563. @item w97
  564. 9/7 wavelet, only used in snow
  565. @item dctmax
  566. @item chroma
  567. @end table
  568. @item pre_dia_size @var{integer} (@emph{encoding,video})
  569. Set diamond type & size for motion estimation pre-pass.
  570. @item subq @var{integer} (@emph{encoding,video})
  571. Set sub pel motion estimation quality.
  572. @item dtg_active_format @var{integer}
  573. @item me_range @var{integer} (@emph{encoding,video})
  574. Set limit motion vectors range (1023 for DivX player).
  575. @item ibias @var{integer} (@emph{encoding,video})
  576. Set intra quant bias.
  577. @item pbias @var{integer} (@emph{encoding,video})
  578. Set inter quant bias.
  579. @item color_table_id @var{integer}
  580. @item global_quality @var{integer} (@emph{encoding,audio,video})
  581. @item coder @var{integer} (@emph{encoding,video})
  582. Possible values:
  583. @table @samp
  584. @item vlc
  585. variable length coder / huffman coder
  586. @item ac
  587. arithmetic coder
  588. @item raw
  589. raw (no encoding)
  590. @item rle
  591. run-length coder
  592. @item deflate
  593. deflate-based coder
  594. @end table
  595. @item context @var{integer} (@emph{encoding,video})
  596. Set context model.
  597. @item slice_flags @var{integer}
  598. @item xvmc_acceleration @var{integer}
  599. @item mbd @var{integer} (@emph{encoding,video})
  600. Set macroblock decision algorithm (high quality mode).
  601. Possible values:
  602. @table @samp
  603. @item simple
  604. use mbcmp (default)
  605. @item bits
  606. use fewest bits
  607. @item rd
  608. use best rate distortion
  609. @end table
  610. @item stream_codec_tag @var{integer}
  611. @item sc_threshold @var{integer} (@emph{encoding,video})
  612. Set scene change threshold.
  613. @item lmin @var{integer} (@emph{encoding,video})
  614. Set min lagrange factor (VBR).
  615. @item lmax @var{integer} (@emph{encoding,video})
  616. Set max lagrange factor (VBR).
  617. @item nr @var{integer} (@emph{encoding,video})
  618. Set noise reduction.
  619. @item rc_init_occupancy @var{integer} (@emph{encoding,video})
  620. Set number of bits which should be loaded into the rc buffer before
  621. decoding starts.
  622. @item flags2 @var{flags} (@emph{decoding/encoding,audio,video})
  623. Possible values:
  624. @table @samp
  625. @item fast
  626. Allow non spec compliant speedup tricks.
  627. @item sgop
  628. Deprecated, use mpegvideo private options instead.
  629. @item noout
  630. Skip bitstream encoding.
  631. @item ignorecrop
  632. Ignore cropping information from sps.
  633. @item local_header
  634. Place global headers at every keyframe instead of in extradata.
  635. @item chunks
  636. Frame data might be split into multiple chunks.
  637. @item showall
  638. Show all frames before the first keyframe.
  639. @item skiprd
  640. Deprecated, use mpegvideo private options instead.
  641. @end table
  642. @item error @var{integer} (@emph{encoding,video})
  643. @item qns @var{integer} (@emph{encoding,video})
  644. Deprecated, use mpegvideo private options instead.
  645. @item threads @var{integer} (@emph{decoding/encoding,video})
  646. Possible values:
  647. @table @samp
  648. @item auto
  649. detect a good number of threads
  650. @end table
  651. @item me_threshold @var{integer} (@emph{encoding,video})
  652. Set motion estimation threshold.
  653. @item mb_threshold @var{integer} (@emph{encoding,video})
  654. Set macroblock threshold.
  655. @item dc @var{integer} (@emph{encoding,video})
  656. Set intra_dc_precision.
  657. @item nssew @var{integer} (@emph{encoding,video})
  658. Set nsse weight.
  659. @item skip_top @var{integer} (@emph{decoding,video})
  660. Set number of macroblock rows at the top which are skipped.
  661. @item skip_bottom @var{integer} (@emph{decoding,video})
  662. Set number of macroblock rows at the bottom which are skipped.
  663. @item profile @var{integer} (@emph{encoding,audio,video})
  664. Possible values:
  665. @table @samp
  666. @item unknown
  667. @item aac_main
  668. @item aac_low
  669. @item aac_ssr
  670. @item aac_ltp
  671. @item aac_he
  672. @item aac_he_v2
  673. @item aac_ld
  674. @item aac_eld
  675. @item mpeg2_aac_low
  676. @item mpeg2_aac_he
  677. @item dts
  678. @item dts_es
  679. @item dts_96_24
  680. @item dts_hd_hra
  681. @item dts_hd_ma
  682. @end table
  683. @item level @var{integer} (@emph{encoding,audio,video})
  684. Possible values:
  685. @table @samp
  686. @item unknown
  687. @end table
  688. @item lowres @var{integer} (@emph{decoding,audio,video})
  689. Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
  690. @item skip_threshold @var{integer} (@emph{encoding,video})
  691. Set frame skip threshold.
  692. @item skip_factor @var{integer} (@emph{encoding,video})
  693. Set frame skip factor.
  694. @item skip_exp @var{integer} (@emph{encoding,video})
  695. Set frame skip exponent.
  696. Negative values behave identical to the corresponding positive ones, except
  697. that the score is normalized.
  698. Positive values exist primarily for compatibility reasons and are not so useful.
  699. @item skipcmp @var{integer} (@emph{encoding,video})
  700. Set frame skip compare function.
  701. Possible values:
  702. @table @samp
  703. @item sad
  704. sum of absolute differences, fast (default)
  705. @item sse
  706. sum of squared errors
  707. @item satd
  708. sum of absolute Hadamard transformed differences
  709. @item dct
  710. sum of absolute DCT transformed differences
  711. @item psnr
  712. sum of squared quantization errors (avoid, low quality)
  713. @item bit
  714. number of bits needed for the block
  715. @item rd
  716. rate distortion optimal, slow
  717. @item zero
  718. 0
  719. @item vsad
  720. sum of absolute vertical differences
  721. @item vsse
  722. sum of squared vertical differences
  723. @item nsse
  724. noise preserving sum of squared differences
  725. @item w53
  726. 5/3 wavelet, only used in snow
  727. @item w97
  728. 9/7 wavelet, only used in snow
  729. @item dctmax
  730. @item chroma
  731. @end table
  732. @item border_mask @var{float} (@emph{encoding,video})
  733. Increase the quantizer for macroblocks close to borders.
  734. @item mblmin @var{integer} (@emph{encoding,video})
  735. Set min macroblock lagrange factor (VBR).
  736. @item mblmax @var{integer} (@emph{encoding,video})
  737. Set max macroblock lagrange factor (VBR).
  738. @item mepc @var{integer} (@emph{encoding,video})
  739. Set motion estimation bitrate penalty compensation (1.0 = 256).
  740. @item skip_loop_filter @var{integer} (@emph{decoding,video})
  741. @item skip_idct @var{integer} (@emph{decoding,video})
  742. @item skip_frame @var{integer} (@emph{decoding,video})
  743. Make decoder discard processing depending on the frame type selected
  744. by the option value.
  745. @option{skip_loop_filter} skips frame loop filtering, @option{skip_idct}
  746. skips frame IDCT/dequantization, @option{skip_frame} skips decoding.
  747. Possible values:
  748. @table @samp
  749. @item none
  750. Discard no frame.
  751. @item default
  752. Discard useless frames like 0-sized frames.
  753. @item noref
  754. Discard all non-reference frames.
  755. @item bidir
  756. Discard all bidirectional frames.
  757. @item nokey
  758. Discard all frames excepts keyframes.
  759. @item all
  760. Discard all frames.
  761. @end table
  762. Default value is @samp{default}.
  763. @item bidir_refine @var{integer} (@emph{encoding,video})
  764. Refine the two motion vectors used in bidirectional macroblocks.
  765. @item brd_scale @var{integer} (@emph{encoding,video})
  766. Downscale frames for dynamic B-frame decision.
  767. @item keyint_min @var{integer} (@emph{encoding,video})
  768. Set minimum interval between IDR-frames.
  769. @item refs @var{integer} (@emph{encoding,video})
  770. Set reference frames to consider for motion compensation.
  771. @item chromaoffset @var{integer} (@emph{encoding,video})
  772. Set chroma qp offset from luma.
  773. @item trellis @var{integer} (@emph{encoding,audio,video})
  774. Set rate-distortion optimal quantization.
  775. @item sc_factor @var{integer} (@emph{encoding,video})
  776. Set value multiplied by qscale for each frame and added to
  777. scene_change_score.
  778. @item mv0_threshold @var{integer} (@emph{encoding,video})
  779. @item b_sensitivity @var{integer} (@emph{encoding,video})
  780. Adjust sensitivity of b_frame_strategy 1.
  781. @item compression_level @var{integer} (@emph{encoding,audio,video})
  782. @item min_prediction_order @var{integer} (@emph{encoding,audio})
  783. @item max_prediction_order @var{integer} (@emph{encoding,audio})
  784. @item timecode_frame_start @var{integer} (@emph{encoding,video})
  785. Set GOP timecode frame start number, in non drop frame format.
  786. @item request_channels @var{integer} (@emph{decoding,audio})
  787. Set desired number of audio channels.
  788. @item bits_per_raw_sample @var{integer}
  789. @item channel_layout @var{integer} (@emph{decoding/encoding,audio})
  790. Possible values:
  791. @table @samp
  792. @end table
  793. @item request_channel_layout @var{integer} (@emph{decoding,audio})
  794. Possible values:
  795. @table @samp
  796. @end table
  797. @item rc_max_vbv_use @var{float} (@emph{encoding,video})
  798. @item rc_min_vbv_use @var{float} (@emph{encoding,video})
  799. @item ticks_per_frame @var{integer} (@emph{decoding/encoding,audio,video})
  800. @item color_primaries @var{integer} (@emph{decoding/encoding,video})
  801. @item color_trc @var{integer} (@emph{decoding/encoding,video})
  802. @item colorspace @var{integer} (@emph{decoding/encoding,video})
  803. @item color_range @var{integer} (@emph{decoding/encoding,video})
  804. @item chroma_sample_location @var{integer} (@emph{decoding/encoding,video})
  805. @item log_level_offset @var{integer}
  806. Set the log level offset.
  807. @item slices @var{integer} (@emph{encoding,video})
  808. Number of slices, used in parallelized encoding.
  809. @item thread_type @var{flags} (@emph{decoding/encoding,video})
  810. Select which multithreading methods to use.
  811. Use of @samp{frame} will increase decoding delay by one frame per
  812. thread, so clients which cannot provide future frames should not use
  813. it.
  814. Possible values:
  815. @table @samp
  816. @item slice
  817. Decode more than one part of a single frame at once.
  818. Multithreading using slices works only when the video was encoded with
  819. slices.
  820. @item frame
  821. Decode more than one frame at once.
  822. @end table
  823. Default value is @samp{slice+frame}.
  824. @item audio_service_type @var{integer} (@emph{encoding,audio})
  825. Set audio service type.
  826. Possible values:
  827. @table @samp
  828. @item ma
  829. Main Audio Service
  830. @item ef
  831. Effects
  832. @item vi
  833. Visually Impaired
  834. @item hi
  835. Hearing Impaired
  836. @item di
  837. Dialogue
  838. @item co
  839. Commentary
  840. @item em
  841. Emergency
  842. @item vo
  843. Voice Over
  844. @item ka
  845. Karaoke
  846. @end table
  847. @item request_sample_fmt @var{sample_fmt} (@emph{decoding,audio})
  848. Set sample format audio decoders should prefer. Default value is
  849. @code{none}.
  850. @item pkt_timebase @var{rational number}
  851. @item sub_charenc @var{encoding} (@emph{decoding,subtitles})
  852. Set the input subtitles character encoding.
  853. @item field_order @var{field_order} (@emph{video})
  854. Set/override the field order of the video.
  855. Possible values:
  856. @table @samp
  857. @item progressive
  858. Progressive video
  859. @item tt
  860. Interlaced video, top field coded and displayed first
  861. @item bb
  862. Interlaced video, bottom field coded and displayed first
  863. @item tb
  864. Interlaced video, top coded first, bottom displayed first
  865. @item bt
  866. Interlaced video, bottom coded first, top displayed first
  867. @end table
  868. @item skip_alpha @var{integer} (@emph{decoding,video})
  869. Set to 1 to disable processing alpha (transparency). This works like the
  870. @samp{gray} flag in the @option{flags} option which skips chroma information
  871. instead of alpha. Default is 0.
  872. @end table
  873. @c man end CODEC OPTIONS
  874. @ifclear config-writeonly
  875. @include decoders.texi
  876. @end ifclear
  877. @ifclear config-readonly
  878. @include encoders.texi
  879. @end ifclear