codecs.texi 30 KB

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