You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

926 lines
27KB

  1. @chapter Encoders
  2. @c man begin ENCODERS
  3. Encoders are configured elements in Libav which allow the encoding of
  4. multimedia streams.
  5. When you configure your Libav build, all the supported native encoders
  6. are enabled by default. Encoders requiring an external library must be enabled
  7. manually via the corresponding @code{--enable-lib} option. You can list all
  8. available encoders using the configure option @code{--list-encoders}.
  9. You can disable all the encoders with the configure option
  10. @code{--disable-encoders} and selectively enable / disable single encoders
  11. with the options @code{--enable-encoder=@var{ENCODER}} /
  12. @code{--disable-encoder=@var{ENCODER}}.
  13. The option @code{-encoders} of the av* tools will display the list of
  14. enabled encoders.
  15. @c man end ENCODERS
  16. @chapter Audio Encoders
  17. @c man begin AUDIO ENCODERS
  18. A description of some of the currently available audio encoders
  19. follows.
  20. @section ac3 and ac3_fixed
  21. AC-3 audio encoders.
  22. These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as
  23. the undocumented RealAudio 3 (a.k.a. dnet).
  24. The @var{ac3} encoder uses floating-point math, while the @var{ac3_fixed}
  25. encoder only uses fixed-point integer math. This does not mean that one is
  26. always faster, just that one or the other may be better suited to a
  27. particular system. The floating-point encoder will generally produce better
  28. quality audio for a given bitrate. The @var{ac3_fixed} encoder is not the
  29. default codec for any of the output formats, so it must be specified explicitly
  30. using the option @code{-acodec ac3_fixed} in order to use it.
  31. @subsection AC-3 Metadata
  32. The AC-3 metadata options are used to set parameters that describe the audio,
  33. but in most cases do not affect the audio encoding itself. Some of the options
  34. do directly affect or influence the decoding and playback of the resulting
  35. bitstream, while others are just for informational purposes. A few of the
  36. options will add bits to the output stream that could otherwise be used for
  37. audio data, and will thus affect the quality of the output. Those will be
  38. indicated accordingly with a note in the option list below.
  39. These parameters are described in detail in several publicly-available
  40. documents.
  41. @itemize
  42. @item @uref{http://www.atsc.org/cms/standards/a_52-2010.pdf,A/52:2010 - Digital Audio Compression (AC-3) (E-AC-3) Standard}
  43. @item @uref{http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf,A/54 - Guide to the Use of the ATSC Digital Television Standard}
  44. @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf,Dolby Metadata Guide}
  45. @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf,Dolby Digital Professional Encoding Guidelines}
  46. @end itemize
  47. @subsubsection Metadata Control Options
  48. @table @option
  49. @item -per_frame_metadata @var{boolean}
  50. Allow Per-Frame Metadata. Specifies if the encoder should check for changing
  51. metadata for each frame.
  52. @table @option
  53. @item 0
  54. The metadata values set at initialization will be used for every frame in the
  55. stream. (default)
  56. @item 1
  57. Metadata values can be changed before encoding each frame.
  58. @end table
  59. @end table
  60. @subsubsection Downmix Levels
  61. @table @option
  62. @item -center_mixlev @var{level}
  63. Center Mix Level. The amount of gain the decoder should apply to the center
  64. channel when downmixing to stereo. This field will only be written to the
  65. bitstream if a center channel is present. The value is specified as a scale
  66. factor. There are 3 valid values:
  67. @table @option
  68. @item 0.707
  69. Apply -3dB gain
  70. @item 0.595
  71. Apply -4.5dB gain (default)
  72. @item 0.500
  73. Apply -6dB gain
  74. @end table
  75. @item -surround_mixlev @var{level}
  76. Surround Mix Level. The amount of gain the decoder should apply to the surround
  77. channel(s) when downmixing to stereo. This field will only be written to the
  78. bitstream if one or more surround channels are present. The value is specified
  79. as a scale factor. There are 3 valid values:
  80. @table @option
  81. @item 0.707
  82. Apply -3dB gain
  83. @item 0.500
  84. Apply -6dB gain (default)
  85. @item 0.000
  86. Silence Surround Channel(s)
  87. @end table
  88. @end table
  89. @subsubsection Audio Production Information
  90. Audio Production Information is optional information describing the mixing
  91. environment. Either none or both of the fields are written to the bitstream.
  92. @table @option
  93. @item -mixing_level @var{number}
  94. Mixing Level. Specifies peak sound pressure level (SPL) in the production
  95. environment when the mix was mastered. Valid values are 80 to 111, or -1 for
  96. unknown or not indicated. The default value is -1, but that value cannot be
  97. used if the Audio Production Information is written to the bitstream. Therefore,
  98. if the @code{room_type} option is not the default value, the @code{mixing_level}
  99. option must not be -1.
  100. @item -room_type @var{type}
  101. Room Type. Describes the equalization used during the final mixing session at
  102. the studio or on the dubbing stage. A large room is a dubbing stage with the
  103. industry standard X-curve equalization; a small room has flat equalization.
  104. This field will not be written to the bitstream if both the @code{mixing_level}
  105. option and the @code{room_type} option have the default values.
  106. @table @option
  107. @item 0
  108. @itemx notindicated
  109. Not Indicated (default)
  110. @item 1
  111. @itemx large
  112. Large Room
  113. @item 2
  114. @itemx small
  115. Small Room
  116. @end table
  117. @end table
  118. @subsubsection Other Metadata Options
  119. @table @option
  120. @item -copyright @var{boolean}
  121. Copyright Indicator. Specifies whether a copyright exists for this audio.
  122. @table @option
  123. @item 0
  124. @itemx off
  125. No Copyright Exists (default)
  126. @item 1
  127. @itemx on
  128. Copyright Exists
  129. @end table
  130. @item -dialnorm @var{value}
  131. Dialogue Normalization. Indicates how far the average dialogue level of the
  132. program is below digital 100% full scale (0 dBFS). This parameter determines a
  133. level shift during audio reproduction that sets the average volume of the
  134. dialogue to a preset level. The goal is to match volume level between program
  135. sources. A value of -31dB will result in no volume level change, relative to
  136. the source volume, during audio reproduction. Valid values are whole numbers in
  137. the range -31 to -1, with -31 being the default.
  138. @item -dsur_mode @var{mode}
  139. Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround
  140. (Pro Logic). This field will only be written to the bitstream if the audio
  141. stream is stereo. Using this option does @b{NOT} mean the encoder will actually
  142. apply Dolby Surround processing.
  143. @table @option
  144. @item 0
  145. @itemx notindicated
  146. Not Indicated (default)
  147. @item 1
  148. @itemx off
  149. Not Dolby Surround Encoded
  150. @item 2
  151. @itemx on
  152. Dolby Surround Encoded
  153. @end table
  154. @item -original @var{boolean}
  155. Original Bit Stream Indicator. Specifies whether this audio is from the
  156. original source and not a copy.
  157. @table @option
  158. @item 0
  159. @itemx off
  160. Not Original Source
  161. @item 1
  162. @itemx on
  163. Original Source (default)
  164. @end table
  165. @end table
  166. @subsection Extended Bitstream Information
  167. The extended bitstream options are part of the Alternate Bit Stream Syntax as
  168. specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.
  169. If any one parameter in a group is specified, all values in that group will be
  170. written to the bitstream. Default values are used for those that are written
  171. but have not been specified. If the mixing levels are written, the decoder
  172. will use these values instead of the ones specified in the @code{center_mixlev}
  173. and @code{surround_mixlev} options if it supports the Alternate Bit Stream
  174. Syntax.
  175. @subsubsection Extended Bitstream Information - Part 1
  176. @table @option
  177. @item -dmix_mode @var{mode}
  178. Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt
  179. (Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.
  180. @table @option
  181. @item 0
  182. @itemx notindicated
  183. Not Indicated (default)
  184. @item 1
  185. @itemx ltrt
  186. Lt/Rt Downmix Preferred
  187. @item 2
  188. @itemx loro
  189. Lo/Ro Downmix Preferred
  190. @end table
  191. @item -ltrt_cmixlev @var{level}
  192. Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the
  193. center channel when downmixing to stereo in Lt/Rt mode.
  194. @table @option
  195. @item 1.414
  196. Apply +3dB gain
  197. @item 1.189
  198. Apply +1.5dB gain
  199. @item 1.000
  200. Apply 0dB gain
  201. @item 0.841
  202. Apply -1.5dB gain
  203. @item 0.707
  204. Apply -3.0dB gain
  205. @item 0.595
  206. Apply -4.5dB gain (default)
  207. @item 0.500
  208. Apply -6.0dB gain
  209. @item 0.000
  210. Silence Center Channel
  211. @end table
  212. @item -ltrt_surmixlev @var{level}
  213. Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the
  214. surround channel(s) when downmixing to stereo in Lt/Rt mode.
  215. @table @option
  216. @item 0.841
  217. Apply -1.5dB gain
  218. @item 0.707
  219. Apply -3.0dB gain
  220. @item 0.595
  221. Apply -4.5dB gain
  222. @item 0.500
  223. Apply -6.0dB gain (default)
  224. @item 0.000
  225. Silence Surround Channel(s)
  226. @end table
  227. @item -loro_cmixlev @var{level}
  228. Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the
  229. center channel when downmixing to stereo in Lo/Ro mode.
  230. @table @option
  231. @item 1.414
  232. Apply +3dB gain
  233. @item 1.189
  234. Apply +1.5dB gain
  235. @item 1.000
  236. Apply 0dB gain
  237. @item 0.841
  238. Apply -1.5dB gain
  239. @item 0.707
  240. Apply -3.0dB gain
  241. @item 0.595
  242. Apply -4.5dB gain (default)
  243. @item 0.500
  244. Apply -6.0dB gain
  245. @item 0.000
  246. Silence Center Channel
  247. @end table
  248. @item -loro_surmixlev @var{level}
  249. Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the
  250. surround channel(s) when downmixing to stereo in Lo/Ro mode.
  251. @table @option
  252. @item 0.841
  253. Apply -1.5dB gain
  254. @item 0.707
  255. Apply -3.0dB gain
  256. @item 0.595
  257. Apply -4.5dB gain
  258. @item 0.500
  259. Apply -6.0dB gain (default)
  260. @item 0.000
  261. Silence Surround Channel(s)
  262. @end table
  263. @end table
  264. @subsubsection Extended Bitstream Information - Part 2
  265. @table @option
  266. @item -dsurex_mode @var{mode}
  267. Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX
  268. (7.1 matrixed to 5.1). Using this option does @b{NOT} mean the encoder will actually
  269. apply Dolby Surround EX processing.
  270. @table @option
  271. @item 0
  272. @itemx notindicated
  273. Not Indicated (default)
  274. @item 1
  275. @itemx on
  276. Dolby Surround EX Off
  277. @item 2
  278. @itemx off
  279. Dolby Surround EX On
  280. @end table
  281. @item -dheadphone_mode @var{mode}
  282. Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone
  283. encoding (multi-channel matrixed to 2.0 for use with headphones). Using this
  284. option does @b{NOT} mean the encoder will actually apply Dolby Headphone
  285. processing.
  286. @table @option
  287. @item 0
  288. @itemx notindicated
  289. Not Indicated (default)
  290. @item 1
  291. @itemx on
  292. Dolby Headphone Off
  293. @item 2
  294. @itemx off
  295. Dolby Headphone On
  296. @end table
  297. @item -ad_conv_type @var{type}
  298. A/D Converter Type. Indicates whether the audio has passed through HDCD A/D
  299. conversion.
  300. @table @option
  301. @item 0
  302. @itemx standard
  303. Standard A/D Converter (default)
  304. @item 1
  305. @itemx hdcd
  306. HDCD A/D Converter
  307. @end table
  308. @end table
  309. @subsection Other AC-3 Encoding Options
  310. @table @option
  311. @item -stereo_rematrixing @var{boolean}
  312. Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
  313. is an optional AC-3 feature that increases quality by selectively encoding
  314. the left/right channels as mid/side. This option is enabled by default, and it
  315. is highly recommended that it be left as enabled except for testing purposes.
  316. @end table
  317. @subheading Floating-Point-Only AC-3 Encoding Options
  318. These options are only valid for the floating-point encoder and do not exist
  319. for the fixed-point encoder due to the corresponding features not being
  320. implemented in fixed-point.
  321. @table @option
  322. @item -channel_coupling @var{boolean}
  323. Enables/Disables use of channel coupling, which is an optional AC-3 feature
  324. that increases quality by combining high frequency information from multiple
  325. channels into a single channel. The per-channel high frequency information is
  326. sent with less accuracy in both the frequency and time domains. This allows
  327. more bits to be used for lower frequencies while preserving enough information
  328. to reconstruct the high frequencies. This option is enabled by default for the
  329. floating-point encoder and should generally be left as enabled except for
  330. testing purposes or to increase encoding speed.
  331. @table @option
  332. @item -1
  333. @itemx auto
  334. Selected by Encoder (default)
  335. @item 0
  336. @itemx off
  337. Disable Channel Coupling
  338. @item 1
  339. @itemx on
  340. Enable Channel Coupling
  341. @end table
  342. @item -cpl_start_band @var{number}
  343. Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a
  344. value higher than the bandwidth is used, it will be reduced to 1 less than the
  345. coupling end band. If @var{auto} is used, the start band will be determined by
  346. the encoder based on the bit rate, sample rate, and channel layout. This option
  347. has no effect if channel coupling is disabled.
  348. @table @option
  349. @item -1
  350. @itemx auto
  351. Selected by Encoder (default)
  352. @end table
  353. @end table
  354. @section libwavpack
  355. A wrapper providing WavPack encoding through libwavpack.
  356. Only lossless mode using 32-bit integer samples is supported currently.
  357. The @option{compression_level} option can be used to control speed vs.
  358. compression tradeoff, with the values mapped to libwavpack as follows:
  359. @table @option
  360. @item 0
  361. Fast mode - corresponding to the wavpack @option{-f} option.
  362. @item 1
  363. Normal (default) settings.
  364. @item 2
  365. High quality - corresponding to the wavpack @option{-h} option.
  366. @item 3
  367. Very high quality - corresponding to the wavpack @option{-hh} option.
  368. @item 4-8
  369. Same as 3, but with extra processing enabled - corresponding to the wavpack
  370. @option{-x} option. I.e. 4 is the same as @option{-x2} and 8 is the same as
  371. @option{-x6}.
  372. @end table
  373. @c man end AUDIO ENCODERS
  374. @chapter Video Encoders
  375. @c man begin VIDEO ENCODERS
  376. @section libwebp
  377. libwebp WebP Image encoder wrapper
  378. libwebp is Google's official encoder for WebP images. It can encode in either
  379. lossy or lossless mode. Lossy images are essentially a wrapper around a VP8
  380. frame. Lossless images are a separate codec developed by Google.
  381. @subsection Pixel Format
  382. Currently, libwebp only supports YUV420 for lossy and RGB for lossless due
  383. to limitations of the format and libwebp. Alpha is supported for either mode.
  384. Because of API limitations, if RGB is passed in when encoding lossy or YUV is
  385. passed in for encoding lossless, the pixel format will automatically be
  386. converted using functions from libwebp. This is not ideal and is done only for
  387. convenience.
  388. @subsection Options
  389. @table @option
  390. @item -lossless @var{boolean}
  391. Enables/Disables use of lossless mode. Default is 0.
  392. @item -compression_level @var{integer}
  393. For lossy, this is a quality/speed tradeoff. Higher values give better quality
  394. for a given size at the cost of increased encoding time. For lossless, this is
  395. a size/speed tradeoff. Higher values give smaller size at the cost of increased
  396. encoding time. More specifically, it controls the number of extra algorithms
  397. and compression tools used, and varies the combination of these tools. This
  398. maps to the @var{method} option in libwebp. The valid range is 0 to 6.
  399. Default is 4.
  400. @item -qscale @var{float}
  401. For lossy encoding, this controls image quality, 0 to 100. For lossless
  402. encoding, this controls the effort and time spent at compressing more. The
  403. default value is 75. Note that for usage via libavcodec, this option is called
  404. @var{global_quality} and must be multiplied by @var{FF_QP2LAMBDA}.
  405. @item -preset @var{type}
  406. Configuration preset. This does some automatic settings based on the general
  407. type of the image.
  408. @table @option
  409. @item none
  410. Do not use a preset.
  411. @item default
  412. Use the encoder default.
  413. @item picture
  414. Digital picture, like portrait, inner shot
  415. @item photo
  416. Outdoor photograph, with natural lighting
  417. @item drawing
  418. Hand or line drawing, with high-contrast details
  419. @item icon
  420. Small-sized colorful images
  421. @item text
  422. Text-like
  423. @end table
  424. @item lumi_aq
  425. Enable lumi masking adaptive quantization when set to 1. Default is 0
  426. (disabled).
  427. @item variance_aq
  428. Enable variance adaptive quantization when set to 1. Default is 0
  429. (disabled).
  430. When combined with @option{lumi_aq}, the resulting quality will not
  431. be better than any of the two specified individually. In other
  432. words, the resulting quality will be the worse one of the two
  433. effects.
  434. @item ssim
  435. Set structural similarity (SSIM) displaying method. Possible values:
  436. @table @samp
  437. @item off
  438. Disable displaying of SSIM information.
  439. @item avg
  440. Output average SSIM at the end of encoding to stdout. The format of
  441. showing the average SSIM is:
  442. @example
  443. Average SSIM: %f
  444. @end example
  445. For users who are not familiar with C, %f means a float number, or
  446. a decimal (e.g. 0.939232).
  447. @item frame
  448. Output both per-frame SSIM data during encoding and average SSIM at
  449. the end of encoding to stdout. The format of per-frame information
  450. is:
  451. @example
  452. SSIM: avg: %1.3f min: %1.3f max: %1.3f
  453. @end example
  454. For users who are not familiar with C, %1.3f means a float number
  455. rounded to 3 digits after the dot (e.g. 0.932).
  456. @end table
  457. @item ssim_acc
  458. Set SSIM accuracy. Valid options are integers within the range of
  459. 0-4, while 0 gives the most accurate result and 4 computes the
  460. fastest.
  461. @end table
  462. @section libx264
  463. x264 H.264/MPEG-4 AVC encoder wrapper
  464. x264 supports an impressive number of features, including 8x8 and 4x4 adaptive
  465. spatial transform, adaptive B-frame placement, CAVLC/CABAC entropy coding,
  466. interlacing (MBAFF), lossless mode, psy optimizations for detail retention
  467. (adaptive quantization, psy-RD, psy-trellis).
  468. The Libav wrapper provides a mapping for most of them using global options
  469. that match those of the encoders and provides private options for the unique
  470. encoder options. Additionally an expert override is provided to directly pass
  471. a list of key=value tuples as accepted by x264_param_parse.
  472. @subsection Option Mapping
  473. The following options are supported by the x264 wrapper, the x264-equivalent
  474. options follow the Libav ones.
  475. @multitable { } { } { }
  476. @item b @tab bitrate
  477. @tab Libav @code{b} option is expressed in bits/s, x264 @code{bitrate} in kilobits/s.
  478. @item bf @tab bframes
  479. @tab Maximum number of B-frames.
  480. @item g @tab keyint
  481. @tab Maximum GOP size.
  482. @item qmin @tab qpmin
  483. @tab Minimum quantizer scale.
  484. @item qmax @tab qpmax
  485. @tab Maximum quantizer scale.
  486. @item qdiff @tab qpstep
  487. @tab Maximum difference between quantizer scales.
  488. @item qblur @tab qblur
  489. @tab Quantizer curve blur
  490. @item qcomp @tab qcomp
  491. @tab Quantizer curve compression factor
  492. @item refs @tab ref
  493. @tab Number of reference frames each P-frame can use. The range is from @var{0-16}.
  494. @item sc_threshold @tab scenecut
  495. @tab Sets the threshold for the scene change detection.
  496. @item trellis @tab trellis
  497. @tab Performs Trellis quantization to increase efficiency. Enabled by default.
  498. @item nr @tab nr
  499. @tab Noise reduction.
  500. @item me_range @tab merange
  501. @tab Maximum range of the motion search in pixels.
  502. @item subq @tab subme
  503. @tab Sub-pixel motion estimation method.
  504. @item b_strategy @tab b-adapt
  505. @tab Adaptive B-frame placement decision algorithm. Use only on first-pass.
  506. @item keyint_min @tab min-keyint
  507. @tab Minimum GOP size.
  508. @item coder @tab cabac
  509. @tab Set coder to @code{ac} to use CABAC.
  510. @item cmp @tab chroma-me
  511. @tab Set to @code{chroma} to use chroma motion estimation.
  512. @item threads @tab threads
  513. @tab Number of encoding threads.
  514. @item thread_type @tab sliced_threads
  515. @tab Set to @code{slice} to use sliced threading instead of frame threading.
  516. @item flags -cgop @tab open-gop
  517. @tab Set @code{-cgop} to use recovery points to close GOPs.
  518. @item rc_init_occupancy @tab vbv-init
  519. @tab Initial buffer occupancy.
  520. @end multitable
  521. @subsection Private Options
  522. @table @option
  523. @item -preset @var{string}
  524. Set the encoding preset (cf. x264 --fullhelp).
  525. @item -tune @var{string}
  526. Tune the encoding params (cf. x264 --fullhelp).
  527. @item -profile @var{string}
  528. Set profile restrictions (cf. x264 --fullhelp).
  529. @item -fastfirstpass @var{integer}
  530. Use fast settings when encoding first pass.
  531. @item -crf @var{float}
  532. Select the quality for constant quality mode.
  533. @item -crf_max @var{float}
  534. In CRF mode, prevents VBV from lowering quality beyond this point.
  535. @item -qp @var{integer}
  536. Constant quantization parameter rate control method.
  537. @item -aq-mode @var{integer}
  538. AQ method
  539. Possible values:
  540. @table @samp
  541. @item none
  542. @item variance
  543. Variance AQ (complexity mask).
  544. @item autovariance
  545. Auto-variance AQ (experimental).
  546. @end table
  547. @item -aq-strength @var{float}
  548. AQ strength, reduces blocking and blurring in flat and textured areas.
  549. @item -psy @var{integer}
  550. Use psychovisual optimizations.
  551. @item -psy-rd @var{string}
  552. Strength of psychovisual optimization, in <psy-rd>:<psy-trellis> format.
  553. @item -rc-lookahead @var{integer}
  554. Number of frames to look ahead for frametype and ratecontrol.
  555. @item -weightb @var{integer}
  556. Weighted prediction for B-frames.
  557. @item -weightp @var{integer}
  558. Weighted prediction analysis method.
  559. Possible values:
  560. @table @samp
  561. @item none
  562. @item simple
  563. @item smart
  564. @end table
  565. @item -ssim @var{integer}
  566. Calculate and print SSIM stats.
  567. @item -intra-refresh @var{integer}
  568. Use Periodic Intra Refresh instead of IDR frames.
  569. @item -bluray-compat @var{integer}
  570. Configure the encoder to be compatible with the bluray standard.
  571. It is a shorthand for setting "bluray-compat=1 force-cfr=1".
  572. @item -b-bias @var{integer}
  573. Influences how often B-frames are used.
  574. @item -b-pyramid @var{integer}
  575. Keep some B-frames as references.
  576. Possible values:
  577. @table @samp
  578. @item none
  579. @item strict
  580. Strictly hierarchical pyramid.
  581. @item normal
  582. Non-strict (not Blu-ray compatible).
  583. @end table
  584. @item -mixed-refs @var{integer}
  585. One reference per partition, as opposed to one reference per macroblock.
  586. @item -8x8dct @var{integer}
  587. High profile 8x8 transform.
  588. @item -fast-pskip @var{integer}
  589. @item -aud @var{integer}
  590. Use access unit delimiters.
  591. @item -mbtree @var{integer}
  592. Use macroblock tree ratecontrol.
  593. @item -deblock @var{string}
  594. Loop filter parameters, in <alpha:beta> form.
  595. @item -cplxblur @var{float}
  596. Reduce fluctuations in QP (before curve compression).
  597. @item -partitions @var{string}
  598. A comma-separated list of partitions to consider, possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all.
  599. @item -direct-pred @var{integer}
  600. Direct MV prediction mode
  601. Possible values:
  602. @table @samp
  603. @item none
  604. @item spatial
  605. @item temporal
  606. @item auto
  607. @end table
  608. @item -slice-max-size @var{integer}
  609. Limit the size of each slice in bytes.
  610. @item -stats @var{string}
  611. Filename for 2 pass stats.
  612. @item -nal-hrd @var{integer}
  613. Signal HRD information (requires vbv-bufsize; cbr not allowed in .mp4).
  614. Possible values:
  615. @table @samp
  616. @item none
  617. @item vbr
  618. @item cbr
  619. @end table
  620. @item -x264-params @var{string}
  621. Override the x264 configuration using a :-separated list of key=value parameters.
  622. @example
  623. -x264-params level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subq=6:8x8dct=0:trellis=0
  624. @end example
  625. @end table
  626. Encoding avpresets for common usages are provided so they can be used with the
  627. general presets system (e.g. passing the @code{-pre} option).
  628. @section ProRes
  629. Apple ProRes encoder.
  630. @subsection Private Options
  631. @table @option
  632. @item profile @var{integer}
  633. Select the ProRes profile to encode
  634. @table @samp
  635. @item proxy
  636. @item lt
  637. @item standard
  638. @item hq
  639. @item 4444
  640. @end table
  641. @item quant_mat @var{integer}
  642. Select quantization matrix.
  643. @table @samp
  644. @item auto
  645. @item default
  646. @item proxy
  647. @item lt
  648. @item standard
  649. @item hq
  650. @end table
  651. If set to @var{auto}, the matrix matching the profile will be picked.
  652. If not set, the matrix providing the highest quality, @var{default}, will be
  653. picked.
  654. @item bits_per_mb @var{integer}
  655. How many bits to allot for coding one macroblock. Different profiles use
  656. between 200 and 2400 bits per macroblock, the maximum is 8000.
  657. @item mbs_per_slice @var{integer}
  658. Number of macroblocks in each slice (1-8); the default value (8)
  659. should be good in almost all situations.
  660. @item vendor @var{string}
  661. Override the 4-byte vendor ID.
  662. A custom vendor ID like @var{apl0} would claim the stream was produced by
  663. the Apple encoder.
  664. @item alpha_bits @var{integer}
  665. Specify number of bits for alpha component.
  666. Possible values are @var{0}, @var{8} and @var{16}.
  667. Use @var{0} to disable alpha plane coding.
  668. @end table
  669. @subsection Speed considerations
  670. In the default mode of operation the encoder has to honor frame constraints
  671. (i.e. not produce frames with a size larger than requested) while still making
  672. the output picture as good as possible.
  673. A frame containing a lot of small details is harder to compress and the encoder
  674. would spend more time searching for appropriate quantizers for each slice.
  675. Setting a higher @option{bits_per_mb} limit will improve the speed.
  676. For the fastest encoding speed set the @option{qscale} parameter (4 is the
  677. recommended value) and do not set a size constraint.
  678. @section libkvazaar
  679. Kvazaar H.265/HEVC encoder.
  680. Requires the presence of the libkvazaar headers and library during
  681. configuration. You need to explicitly configure the build with
  682. @option{--enable-libkvazaar}.
  683. @subsection Options
  684. @table @option
  685. @item b
  686. Set target video bitrate in bit/s and enable rate control.
  687. @item kvazaar-params
  688. Set kvazaar parameters as a list of @var{name}=@var{value} pairs separated
  689. by commas (,). See kvazaar documentation for a list of options.
  690. @end table
  691. @section QSV encoders
  692. The family of Intel QuickSync Video encoders (MPEG-2, H.264 and HEVC)
  693. The ratecontrol method is selected as follows:
  694. @itemize @bullet
  695. @item
  696. When @option{global_quality} is specified, a quality-based mode is used.
  697. Specifically this means either
  698. @itemize @minus
  699. @item
  700. @var{CQP} - constant quantizer scale, when the @option{qscale} codec flag is
  701. also set (the @option{-qscale} avconv option).
  702. @item
  703. @var{LA_ICQ} - intelligent constant quality with lookahead, when the
  704. @option{la_depth} option is also set.
  705. @item
  706. @var{ICQ} -- intelligent constant quality otherwise.
  707. @end itemize
  708. @item
  709. Otherwise, a bitrate-based mode is used. For all of those, you should specify at
  710. least the desired average bitrate with the @option{b} option.
  711. @itemize @minus
  712. @item
  713. @var{LA} - VBR with lookahead, when the @option{la_depth} option is specified.
  714. @item
  715. @var{VCM} - video conferencing mode, when the @option{vcm} option is set.
  716. @item
  717. @var{CBR} - constant bitrate, when @option{maxrate} is specified and equal to
  718. the average bitrate.
  719. @item
  720. @var{VBR} - variable bitrate, when @option{maxrate} is specified, but is higher
  721. than the average bitrate.
  722. @item
  723. @var{AVBR} - average VBR mode, when @option{maxrate} is not specified. This mode
  724. is further configured by the @option{avbr_accuracy} and
  725. @option{avbr_convergence} options.
  726. @end itemize
  727. @end itemize
  728. Note that depending on your system, a different mode than the one you specified
  729. may be selected by the encoder. Set the verbosity level to @var{verbose} or
  730. higher to see the actual settings used by the QSV runtime.
  731. Additional libavcodec global options are mapped to MSDK options as follows:
  732. @itemize
  733. @item
  734. @option{g/gop_size} -> @option{GopPicSize}
  735. @item
  736. @option{bf/max_b_frames}+1 -> @option{GopRefDist}
  737. @item
  738. @option{rc_init_occupancy/rc_initial_buffer_occupancy} ->
  739. @option{InitialDelayInKB}
  740. @item
  741. @option{slices} -> @option{NumSlice}
  742. @item
  743. @option{refs} -> @option{NumRefFrame}
  744. @item
  745. @option{b_strategy/b_frame_strategy} -> @option{BRefType}
  746. @item
  747. @option{cgop/CLOSED_GOP} codec flag -> @option{GopOptFlag}
  748. @item
  749. For the @var{CQP} mode, the @option{i_qfactor/i_qoffset} and
  750. @option{b_qfactor/b_qoffset} set the difference between @var{QPP} and @var{QPI},
  751. and @var{QPP} and @var{QPB} respectively.
  752. @item
  753. Setting the @option{coder} option to the value @var{vlc} will make the H.264
  754. encoder use CAVLC instead of CABAC.
  755. @end itemize
  756. @c man end VIDEO ENCODERS