codecs.texi 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262
  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. @end table
  662. @item error @var{integer} (@emph{encoding,video})
  663. @item qns @var{integer} (@emph{encoding,video})
  664. Deprecated, use mpegvideo private options instead.
  665. @item threads @var{integer} (@emph{decoding/encoding,video})
  666. Set the number of threads to be used, in case the selected codec
  667. implementation supports multi-threading.
  668. Possible values:
  669. @table @samp
  670. @item auto, 0
  671. automatically select the number of threads to set
  672. @end table
  673. Default value is @samp{auto}.
  674. @item me_threshold @var{integer} (@emph{encoding,video})
  675. Set motion estimation threshold.
  676. @item mb_threshold @var{integer} (@emph{encoding,video})
  677. Set macroblock threshold.
  678. @item dc @var{integer} (@emph{encoding,video})
  679. Set intra_dc_precision.
  680. @item nssew @var{integer} (@emph{encoding,video})
  681. Set nsse weight.
  682. @item skip_top @var{integer} (@emph{decoding,video})
  683. Set number of macroblock rows at the top which are skipped.
  684. @item skip_bottom @var{integer} (@emph{decoding,video})
  685. Set number of macroblock rows at the bottom which are skipped.
  686. @item profile @var{integer} (@emph{encoding,audio,video})
  687. Set encoder codec profile. Default value is @samp{unknown}. Encoder specific
  688. profiles are documented in the relevant encoder documentation.
  689. @item level @var{integer} (@emph{encoding,audio,video})
  690. Possible values:
  691. @table @samp
  692. @item unknown
  693. @end table
  694. @item lowres @var{integer} (@emph{decoding,audio,video})
  695. Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
  696. @item skip_threshold @var{integer} (@emph{encoding,video})
  697. Set frame skip threshold.
  698. @item skip_factor @var{integer} (@emph{encoding,video})
  699. Set frame skip factor.
  700. @item skip_exp @var{integer} (@emph{encoding,video})
  701. Set frame skip exponent.
  702. Negative values behave identical to the corresponding positive ones, except
  703. that the score is normalized.
  704. Positive values exist primarily for compatibility reasons and are not so useful.
  705. @item skipcmp @var{integer} (@emph{encoding,video})
  706. Set frame skip compare function.
  707. Possible values:
  708. @table @samp
  709. @item sad
  710. sum of absolute differences, fast (default)
  711. @item sse
  712. sum of squared errors
  713. @item satd
  714. sum of absolute Hadamard transformed differences
  715. @item dct
  716. sum of absolute DCT transformed differences
  717. @item psnr
  718. sum of squared quantization errors (avoid, low quality)
  719. @item bit
  720. number of bits needed for the block
  721. @item rd
  722. rate distortion optimal, slow
  723. @item zero
  724. 0
  725. @item vsad
  726. sum of absolute vertical differences
  727. @item vsse
  728. sum of squared vertical differences
  729. @item nsse
  730. noise preserving sum of squared differences
  731. @item w53
  732. 5/3 wavelet, only used in snow
  733. @item w97
  734. 9/7 wavelet, only used in snow
  735. @item dctmax
  736. @item chroma
  737. @end table
  738. @item border_mask @var{float} (@emph{encoding,video})
  739. Increase the quantizer for macroblocks close to borders.
  740. @item mblmin @var{integer} (@emph{encoding,video})
  741. Set min macroblock lagrange factor (VBR).
  742. @item mblmax @var{integer} (@emph{encoding,video})
  743. Set max macroblock lagrange factor (VBR).
  744. @item mepc @var{integer} (@emph{encoding,video})
  745. Set motion estimation bitrate penalty compensation (1.0 = 256).
  746. @item skip_loop_filter @var{integer} (@emph{decoding,video})
  747. @item skip_idct @var{integer} (@emph{decoding,video})
  748. @item skip_frame @var{integer} (@emph{decoding,video})
  749. Make decoder discard processing depending on the frame type selected
  750. by the option value.
  751. @option{skip_loop_filter} skips frame loop filtering, @option{skip_idct}
  752. skips frame IDCT/dequantization, @option{skip_frame} skips decoding.
  753. Possible values:
  754. @table @samp
  755. @item none
  756. Discard no frame.
  757. @item default
  758. Discard useless frames like 0-sized frames.
  759. @item noref
  760. Discard all non-reference frames.
  761. @item bidir
  762. Discard all bidirectional frames.
  763. @item nokey
  764. Discard all frames excepts keyframes.
  765. @item nointra
  766. Discard all frames except I frames.
  767. @item all
  768. Discard all frames.
  769. @end table
  770. Default value is @samp{default}.
  771. @item bidir_refine @var{integer} (@emph{encoding,video})
  772. Refine the two motion vectors used in bidirectional macroblocks.
  773. @item brd_scale @var{integer} (@emph{encoding,video})
  774. Downscale frames for dynamic B-frame decision.
  775. @item keyint_min @var{integer} (@emph{encoding,video})
  776. Set minimum interval between IDR-frames.
  777. @item refs @var{integer} (@emph{encoding,video})
  778. Set reference frames to consider for motion compensation.
  779. @item chromaoffset @var{integer} (@emph{encoding,video})
  780. Set chroma qp offset from luma.
  781. @item trellis @var{integer} (@emph{encoding,audio,video})
  782. Set rate-distortion optimal quantization.
  783. @item mv0_threshold @var{integer} (@emph{encoding,video})
  784. @item b_sensitivity @var{integer} (@emph{encoding,video})
  785. Adjust sensitivity of b_frame_strategy 1.
  786. @item compression_level @var{integer} (@emph{encoding,audio,video})
  787. @item min_prediction_order @var{integer} (@emph{encoding,audio})
  788. @item max_prediction_order @var{integer} (@emph{encoding,audio})
  789. @item timecode_frame_start @var{integer} (@emph{encoding,video})
  790. Set GOP timecode frame start number, in non drop frame format.
  791. @item request_channels @var{integer} (@emph{decoding,audio})
  792. Set desired number of audio channels.
  793. @item bits_per_raw_sample @var{integer}
  794. @item channel_layout @var{integer} (@emph{decoding/encoding,audio})
  795. Possible values:
  796. @table @samp
  797. @end table
  798. @item request_channel_layout @var{integer} (@emph{decoding,audio})
  799. Possible values:
  800. @table @samp
  801. @end table
  802. @item rc_max_vbv_use @var{float} (@emph{encoding,video})
  803. @item rc_min_vbv_use @var{float} (@emph{encoding,video})
  804. @item ticks_per_frame @var{integer} (@emph{decoding/encoding,audio,video})
  805. @item color_primaries @var{integer} (@emph{decoding/encoding,video})
  806. Possible values:
  807. @table @samp
  808. @item bt709
  809. BT.709
  810. @item bt470m
  811. BT.470 M
  812. @item bt470bg
  813. BT.470 BG
  814. @item smpte170m
  815. SMPTE 170 M
  816. @item smpte240m
  817. SMPTE 240 M
  818. @item film
  819. Film
  820. @item bt2020
  821. BT.2020
  822. @item smpte428
  823. @item smpte428_1
  824. SMPTE ST 428-1
  825. @item smpte431
  826. SMPTE 431-2
  827. @item smpte432
  828. SMPTE 432-1
  829. @item jedec-p22
  830. JEDEC P22
  831. @end table
  832. @item color_trc @var{integer} (@emph{decoding/encoding,video})
  833. Possible values:
  834. @table @samp
  835. @item bt709
  836. BT.709
  837. @item gamma22
  838. BT.470 M
  839. @item gamma28
  840. BT.470 BG
  841. @item smpte170m
  842. SMPTE 170 M
  843. @item smpte240m
  844. SMPTE 240 M
  845. @item linear
  846. Linear
  847. @item log
  848. @item log100
  849. Log
  850. @item log_sqrt
  851. @item log316
  852. Log square root
  853. @item iec61966_2_4
  854. @item iec61966-2-4
  855. IEC 61966-2-4
  856. @item bt1361
  857. @item bt1361e
  858. BT.1361
  859. @item iec61966_2_1
  860. @item iec61966-2-1
  861. IEC 61966-2-1
  862. @item bt2020_10
  863. @item bt2020_10bit
  864. BT.2020 - 10 bit
  865. @item bt2020_12
  866. @item bt2020_12bit
  867. BT.2020 - 12 bit
  868. @item smpte2084
  869. SMPTE ST 2084
  870. @item smpte428
  871. @item smpte428_1
  872. SMPTE ST 428-1
  873. @item arib-std-b67
  874. ARIB STD-B67
  875. @end table
  876. @item colorspace @var{integer} (@emph{decoding/encoding,video})
  877. Possible values:
  878. @table @samp
  879. @item rgb
  880. RGB
  881. @item bt709
  882. BT.709
  883. @item fcc
  884. FCC
  885. @item bt470bg
  886. BT.470 BG
  887. @item smpte170m
  888. SMPTE 170 M
  889. @item smpte240m
  890. SMPTE 240 M
  891. @item ycocg
  892. YCOCG
  893. @item bt2020nc
  894. @item bt2020_ncl
  895. BT.2020 NCL
  896. @item bt2020c
  897. @item bt2020_cl
  898. BT.2020 CL
  899. @item smpte2085
  900. SMPTE 2085
  901. @end table
  902. @item color_range @var{integer} (@emph{decoding/encoding,video})
  903. If used as input parameter, it serves as a hint to the decoder, which
  904. color_range the input has.
  905. Possible values:
  906. @table @samp
  907. @item tv
  908. @item mpeg
  909. MPEG (219*2^(n-8))
  910. @item pc
  911. @item jpeg
  912. JPEG (2^n-1)
  913. @end table
  914. @item chroma_sample_location @var{integer} (@emph{decoding/encoding,video})
  915. Possible values:
  916. @table @samp
  917. @item left
  918. @item center
  919. @item topleft
  920. @item top
  921. @item bottomleft
  922. @item bottom
  923. @end table
  924. @item log_level_offset @var{integer}
  925. Set the log level offset.
  926. @item slices @var{integer} (@emph{encoding,video})
  927. Number of slices, used in parallelized encoding.
  928. @item thread_type @var{flags} (@emph{decoding/encoding,video})
  929. Select which multithreading methods to use.
  930. Use of @samp{frame} will increase decoding delay by one frame per
  931. thread, so clients which cannot provide future frames should not use
  932. it.
  933. Possible values:
  934. @table @samp
  935. @item slice
  936. Decode more than one part of a single frame at once.
  937. Multithreading using slices works only when the video was encoded with
  938. slices.
  939. @item frame
  940. Decode more than one frame at once.
  941. @end table
  942. Default value is @samp{slice+frame}.
  943. @item audio_service_type @var{integer} (@emph{encoding,audio})
  944. Set audio service type.
  945. Possible values:
  946. @table @samp
  947. @item ma
  948. Main Audio Service
  949. @item ef
  950. Effects
  951. @item vi
  952. Visually Impaired
  953. @item hi
  954. Hearing Impaired
  955. @item di
  956. Dialogue
  957. @item co
  958. Commentary
  959. @item em
  960. Emergency
  961. @item vo
  962. Voice Over
  963. @item ka
  964. Karaoke
  965. @end table
  966. @item request_sample_fmt @var{sample_fmt} (@emph{decoding,audio})
  967. Set sample format audio decoders should prefer. Default value is
  968. @code{none}.
  969. @item pkt_timebase @var{rational number}
  970. @item sub_charenc @var{encoding} (@emph{decoding,subtitles})
  971. Set the input subtitles character encoding.
  972. @item field_order @var{field_order} (@emph{video})
  973. Set/override the field order of the video.
  974. Possible values:
  975. @table @samp
  976. @item progressive
  977. Progressive video
  978. @item tt
  979. Interlaced video, top field coded and displayed first
  980. @item bb
  981. Interlaced video, bottom field coded and displayed first
  982. @item tb
  983. Interlaced video, top coded first, bottom displayed first
  984. @item bt
  985. Interlaced video, bottom coded first, top displayed first
  986. @end table
  987. @item skip_alpha @var{bool} (@emph{decoding,video})
  988. Set to 1 to disable processing alpha (transparency). This works like the
  989. @samp{gray} flag in the @option{flags} option which skips chroma information
  990. instead of alpha. Default is 0.
  991. @item codec_whitelist @var{list} (@emph{input})
  992. "," separated list of allowed decoders. By default all are allowed.
  993. @item dump_separator @var{string} (@emph{input})
  994. Separator used to separate the fields printed on the command line about the
  995. Stream parameters.
  996. For example, to separate the fields with newlines and indentation:
  997. @example
  998. ffprobe -dump_separator "
  999. " -i ~/videos/matrixbench_mpeg2.mpg
  1000. @end example
  1001. @item max_pixels @var{integer} (@emph{decoding/encoding,video})
  1002. Maximum number of pixels per image. This value can be used to avoid out of
  1003. memory failures due to large images.
  1004. @item apply_cropping @var{bool} (@emph{decoding,video})
  1005. Enable cropping if cropping parameters are multiples of the required
  1006. alignment for the left and top parameters. If the alignment is not met the
  1007. cropping will be partially applied to maintain alignment.
  1008. Default is 1 (enabled).
  1009. Note: The required alignment depends on if @code{AV_CODEC_FLAG_UNALIGNED} is set and the
  1010. CPU. @code{AV_CODEC_FLAG_UNALIGNED} cannot be changed from the command line. Also hardware
  1011. decoders will not apply left/top Cropping.
  1012. @end table
  1013. @c man end CODEC OPTIONS
  1014. @ifclear config-writeonly
  1015. @include decoders.texi
  1016. @end ifclear
  1017. @ifclear config-readonly
  1018. @include encoders.texi
  1019. @end ifclear