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.

1653 lines
45KB

  1. @chapter Encoders
  2. @c man begin ENCODERS
  3. Encoders are configured elements in FFmpeg which allow the encoding of
  4. multimedia streams.
  5. When you configure your FFmpeg 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{-codecs} of the ff* 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. @anchor{aacenc}
  21. @section aac
  22. Advanced Audio Coding (AAC) encoder.
  23. This encoder is an experimental FFmpeg-native AAC encoder. Currently only the
  24. low complexity (AAC-LC) profile is supported. To use this encoder, you must set
  25. @option{strict} option to @samp{experimental} or lower.
  26. As this encoder is experimental, unexpected behavior may exist from time to
  27. time. For a more stable AAC encoder, see @ref{libvo-aacenc}. However, be warned
  28. that it has a worse quality reported by some users.
  29. @c Comment this out until somebody writes the respective documentation.
  30. @c See also @ref{libfaac}, @ref{libaacplus}, and @ref{libfdk-aac-enc}.
  31. @subsection Options
  32. @table @option
  33. @item b
  34. Set bit rate in bits/s. Setting this automatically activates constant bit rate
  35. (CBR) mode.
  36. @item q
  37. Set quality for variable bit rate (VBR) mode. This option is valid only using
  38. the @command{ffmpeg} command-line tool. For library interface users, use
  39. @option{global_quality}.
  40. @item stereo_mode
  41. Set stereo encoding mode. Possible values:
  42. @table @samp
  43. @item auto
  44. Automatically selected by the encoder.
  45. @item ms_off
  46. Disable middle/side encoding. This is the default.
  47. @item ms_force
  48. Force middle/side encoding.
  49. @end table
  50. @item aac_coder
  51. Set AAC encoder coding method. Possible values:
  52. @table @samp
  53. @item faac
  54. FAAC-inspired method.
  55. This method is a simplified reimplementation of the method used in FAAC, which
  56. sets thresholds proportional to the band energies, and then decreases all the
  57. thresholds with quantizer steps to find the appropriate quantization with
  58. distortion below threshold band by band.
  59. The quality of this method is comparable to the two loop searching method
  60. descibed below, but somewhat a little better and slower.
  61. @item anmr
  62. Average noise to mask ratio (ANMR) trellis-based solution.
  63. This has a theoretic best quality out of all the coding methods, but at the
  64. cost of the slowest speed.
  65. @item twoloop
  66. Two loop searching (TLS) method.
  67. This method first sets quantizers depending on band thresholds and then tries
  68. to find an optimal combination by adding or subtracting a specific value from
  69. all quantizers and adjusting some individual quantizer a little.
  70. This method produces similar quality with the FAAC method and is the default.
  71. @item fast
  72. Constant quantizer method.
  73. This method sets a constant quantizer for all bands. This is the fastest of all
  74. the methods, yet produces the worst quality.
  75. @end table
  76. @end table
  77. @section ac3 and ac3_fixed
  78. AC-3 audio encoders.
  79. These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as
  80. the undocumented RealAudio 3 (a.k.a. dnet).
  81. The @var{ac3} encoder uses floating-point math, while the @var{ac3_fixed}
  82. encoder only uses fixed-point integer math. This does not mean that one is
  83. always faster, just that one or the other may be better suited to a
  84. particular system. The floating-point encoder will generally produce better
  85. quality audio for a given bitrate. The @var{ac3_fixed} encoder is not the
  86. default codec for any of the output formats, so it must be specified explicitly
  87. using the option @code{-acodec ac3_fixed} in order to use it.
  88. @subsection AC-3 Metadata
  89. The AC-3 metadata options are used to set parameters that describe the audio,
  90. but in most cases do not affect the audio encoding itself. Some of the options
  91. do directly affect or influence the decoding and playback of the resulting
  92. bitstream, while others are just for informational purposes. A few of the
  93. options will add bits to the output stream that could otherwise be used for
  94. audio data, and will thus affect the quality of the output. Those will be
  95. indicated accordingly with a note in the option list below.
  96. These parameters are described in detail in several publicly-available
  97. documents.
  98. @itemize
  99. @item @uref{http://www.atsc.org/cms/standards/a_52-2010.pdf,A/52:2010 - Digital Audio Compression (AC-3) (E-AC-3) Standard}
  100. @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}
  101. @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf,Dolby Metadata Guide}
  102. @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf,Dolby Digital Professional Encoding Guidelines}
  103. @end itemize
  104. @subsubsection Metadata Control Options
  105. @table @option
  106. @item -per_frame_metadata @var{boolean}
  107. Allow Per-Frame Metadata. Specifies if the encoder should check for changing
  108. metadata for each frame.
  109. @table @option
  110. @item 0
  111. The metadata values set at initialization will be used for every frame in the
  112. stream. (default)
  113. @item 1
  114. Metadata values can be changed before encoding each frame.
  115. @end table
  116. @end table
  117. @subsubsection Downmix Levels
  118. @table @option
  119. @item -center_mixlev @var{level}
  120. Center Mix Level. The amount of gain the decoder should apply to the center
  121. channel when downmixing to stereo. This field will only be written to the
  122. bitstream if a center channel is present. The value is specified as a scale
  123. factor. There are 3 valid values:
  124. @table @option
  125. @item 0.707
  126. Apply -3dB gain
  127. @item 0.595
  128. Apply -4.5dB gain (default)
  129. @item 0.500
  130. Apply -6dB gain
  131. @end table
  132. @item -surround_mixlev @var{level}
  133. Surround Mix Level. The amount of gain the decoder should apply to the surround
  134. channel(s) when downmixing to stereo. This field will only be written to the
  135. bitstream if one or more surround channels are present. The value is specified
  136. as a scale factor. There are 3 valid values:
  137. @table @option
  138. @item 0.707
  139. Apply -3dB gain
  140. @item 0.500
  141. Apply -6dB gain (default)
  142. @item 0.000
  143. Silence Surround Channel(s)
  144. @end table
  145. @end table
  146. @subsubsection Audio Production Information
  147. Audio Production Information is optional information describing the mixing
  148. environment. Either none or both of the fields are written to the bitstream.
  149. @table @option
  150. @item -mixing_level @var{number}
  151. Mixing Level. Specifies peak sound pressure level (SPL) in the production
  152. environment when the mix was mastered. Valid values are 80 to 111, or -1 for
  153. unknown or not indicated. The default value is -1, but that value cannot be
  154. used if the Audio Production Information is written to the bitstream. Therefore,
  155. if the @code{room_type} option is not the default value, the @code{mixing_level}
  156. option must not be -1.
  157. @item -room_type @var{type}
  158. Room Type. Describes the equalization used during the final mixing session at
  159. the studio or on the dubbing stage. A large room is a dubbing stage with the
  160. industry standard X-curve equalization; a small room has flat equalization.
  161. This field will not be written to the bitstream if both the @code{mixing_level}
  162. option and the @code{room_type} option have the default values.
  163. @table @option
  164. @item 0
  165. @itemx notindicated
  166. Not Indicated (default)
  167. @item 1
  168. @itemx large
  169. Large Room
  170. @item 2
  171. @itemx small
  172. Small Room
  173. @end table
  174. @end table
  175. @subsubsection Other Metadata Options
  176. @table @option
  177. @item -copyright @var{boolean}
  178. Copyright Indicator. Specifies whether a copyright exists for this audio.
  179. @table @option
  180. @item 0
  181. @itemx off
  182. No Copyright Exists (default)
  183. @item 1
  184. @itemx on
  185. Copyright Exists
  186. @end table
  187. @item -dialnorm @var{value}
  188. Dialogue Normalization. Indicates how far the average dialogue level of the
  189. program is below digital 100% full scale (0 dBFS). This parameter determines a
  190. level shift during audio reproduction that sets the average volume of the
  191. dialogue to a preset level. The goal is to match volume level between program
  192. sources. A value of -31dB will result in no volume level change, relative to
  193. the source volume, during audio reproduction. Valid values are whole numbers in
  194. the range -31 to -1, with -31 being the default.
  195. @item -dsur_mode @var{mode}
  196. Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround
  197. (Pro Logic). This field will only be written to the bitstream if the audio
  198. stream is stereo. Using this option does @b{NOT} mean the encoder will actually
  199. apply Dolby Surround processing.
  200. @table @option
  201. @item 0
  202. @itemx notindicated
  203. Not Indicated (default)
  204. @item 1
  205. @itemx off
  206. Not Dolby Surround Encoded
  207. @item 2
  208. @itemx on
  209. Dolby Surround Encoded
  210. @end table
  211. @item -original @var{boolean}
  212. Original Bit Stream Indicator. Specifies whether this audio is from the
  213. original source and not a copy.
  214. @table @option
  215. @item 0
  216. @itemx off
  217. Not Original Source
  218. @item 1
  219. @itemx on
  220. Original Source (default)
  221. @end table
  222. @end table
  223. @subsection Extended Bitstream Information
  224. The extended bitstream options are part of the Alternate Bit Stream Syntax as
  225. specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.
  226. If any one parameter in a group is specified, all values in that group will be
  227. written to the bitstream. Default values are used for those that are written
  228. but have not been specified. If the mixing levels are written, the decoder
  229. will use these values instead of the ones specified in the @code{center_mixlev}
  230. and @code{surround_mixlev} options if it supports the Alternate Bit Stream
  231. Syntax.
  232. @subsubsection Extended Bitstream Information - Part 1
  233. @table @option
  234. @item -dmix_mode @var{mode}
  235. Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt
  236. (Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.
  237. @table @option
  238. @item 0
  239. @itemx notindicated
  240. Not Indicated (default)
  241. @item 1
  242. @itemx ltrt
  243. Lt/Rt Downmix Preferred
  244. @item 2
  245. @itemx loro
  246. Lo/Ro Downmix Preferred
  247. @end table
  248. @item -ltrt_cmixlev @var{level}
  249. Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the
  250. center channel when downmixing to stereo in Lt/Rt mode.
  251. @table @option
  252. @item 1.414
  253. Apply +3dB gain
  254. @item 1.189
  255. Apply +1.5dB gain
  256. @item 1.000
  257. Apply 0dB gain
  258. @item 0.841
  259. Apply -1.5dB gain
  260. @item 0.707
  261. Apply -3.0dB gain
  262. @item 0.595
  263. Apply -4.5dB gain (default)
  264. @item 0.500
  265. Apply -6.0dB gain
  266. @item 0.000
  267. Silence Center Channel
  268. @end table
  269. @item -ltrt_surmixlev @var{level}
  270. Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the
  271. surround channel(s) when downmixing to stereo in Lt/Rt mode.
  272. @table @option
  273. @item 0.841
  274. Apply -1.5dB gain
  275. @item 0.707
  276. Apply -3.0dB gain
  277. @item 0.595
  278. Apply -4.5dB gain
  279. @item 0.500
  280. Apply -6.0dB gain (default)
  281. @item 0.000
  282. Silence Surround Channel(s)
  283. @end table
  284. @item -loro_cmixlev @var{level}
  285. Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the
  286. center channel when downmixing to stereo in Lo/Ro mode.
  287. @table @option
  288. @item 1.414
  289. Apply +3dB gain
  290. @item 1.189
  291. Apply +1.5dB gain
  292. @item 1.000
  293. Apply 0dB gain
  294. @item 0.841
  295. Apply -1.5dB gain
  296. @item 0.707
  297. Apply -3.0dB gain
  298. @item 0.595
  299. Apply -4.5dB gain (default)
  300. @item 0.500
  301. Apply -6.0dB gain
  302. @item 0.000
  303. Silence Center Channel
  304. @end table
  305. @item -loro_surmixlev @var{level}
  306. Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the
  307. surround channel(s) when downmixing to stereo in Lo/Ro mode.
  308. @table @option
  309. @item 0.841
  310. Apply -1.5dB gain
  311. @item 0.707
  312. Apply -3.0dB gain
  313. @item 0.595
  314. Apply -4.5dB gain
  315. @item 0.500
  316. Apply -6.0dB gain (default)
  317. @item 0.000
  318. Silence Surround Channel(s)
  319. @end table
  320. @end table
  321. @subsubsection Extended Bitstream Information - Part 2
  322. @table @option
  323. @item -dsurex_mode @var{mode}
  324. Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX
  325. (7.1 matrixed to 5.1). Using this option does @b{NOT} mean the encoder will actually
  326. apply Dolby Surround EX processing.
  327. @table @option
  328. @item 0
  329. @itemx notindicated
  330. Not Indicated (default)
  331. @item 1
  332. @itemx on
  333. Dolby Surround EX Off
  334. @item 2
  335. @itemx off
  336. Dolby Surround EX On
  337. @end table
  338. @item -dheadphone_mode @var{mode}
  339. Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone
  340. encoding (multi-channel matrixed to 2.0 for use with headphones). Using this
  341. option does @b{NOT} mean the encoder will actually apply Dolby Headphone
  342. processing.
  343. @table @option
  344. @item 0
  345. @itemx notindicated
  346. Not Indicated (default)
  347. @item 1
  348. @itemx on
  349. Dolby Headphone Off
  350. @item 2
  351. @itemx off
  352. Dolby Headphone On
  353. @end table
  354. @item -ad_conv_type @var{type}
  355. A/D Converter Type. Indicates whether the audio has passed through HDCD A/D
  356. conversion.
  357. @table @option
  358. @item 0
  359. @itemx standard
  360. Standard A/D Converter (default)
  361. @item 1
  362. @itemx hdcd
  363. HDCD A/D Converter
  364. @end table
  365. @end table
  366. @subsection Other AC-3 Encoding Options
  367. @table @option
  368. @item -stereo_rematrixing @var{boolean}
  369. Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
  370. is an optional AC-3 feature that increases quality by selectively encoding
  371. the left/right channels as mid/side. This option is enabled by default, and it
  372. is highly recommended that it be left as enabled except for testing purposes.
  373. @end table
  374. @subsection Floating-Point-Only AC-3 Encoding Options
  375. These options are only valid for the floating-point encoder and do not exist
  376. for the fixed-point encoder due to the corresponding features not being
  377. implemented in fixed-point.
  378. @table @option
  379. @item -channel_coupling @var{boolean}
  380. Enables/Disables use of channel coupling, which is an optional AC-3 feature
  381. that increases quality by combining high frequency information from multiple
  382. channels into a single channel. The per-channel high frequency information is
  383. sent with less accuracy in both the frequency and time domains. This allows
  384. more bits to be used for lower frequencies while preserving enough information
  385. to reconstruct the high frequencies. This option is enabled by default for the
  386. floating-point encoder and should generally be left as enabled except for
  387. testing purposes or to increase encoding speed.
  388. @table @option
  389. @item -1
  390. @itemx auto
  391. Selected by Encoder (default)
  392. @item 0
  393. @itemx off
  394. Disable Channel Coupling
  395. @item 1
  396. @itemx on
  397. Enable Channel Coupling
  398. @end table
  399. @item -cpl_start_band @var{number}
  400. Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a
  401. value higher than the bandwidth is used, it will be reduced to 1 less than the
  402. coupling end band. If @var{auto} is used, the start band will be determined by
  403. the encoder based on the bit rate, sample rate, and channel layout. This option
  404. has no effect if channel coupling is disabled.
  405. @table @option
  406. @item -1
  407. @itemx auto
  408. Selected by Encoder (default)
  409. @end table
  410. @end table
  411. @anchor{libmp3lame}
  412. @section libmp3lame
  413. LAME (Lame Ain't an MP3 Encoder) MP3 encoder wrapper.
  414. Requires the presence of the libmp3lame headers and library during
  415. configuration. You need to explicitly configure the build with
  416. @code{--enable-libmp3lame}.
  417. See @ref{libshine} for a fixed-point MP3 encoder, although with a
  418. lower quality.
  419. @subsection Options
  420. The following options are supported by the libmp3lame wrapper. The
  421. @command{lame}-equivalent of the options are listed in parentheses.
  422. @table @option
  423. @item b (@emph{-b})
  424. Set bitrate expressed in bits/s for CBR. LAME @code{bitrate} is
  425. expressed in kilobits/s.
  426. @item q (@emph{-V})
  427. Set constant quality setting for VBR. This option is valid only
  428. using the @command{ffmpeg} command-line tool. For library interface
  429. users, use @option{global_quality}.
  430. @item compression_level (@emph{-q})
  431. Set algorithm quality. Valid arguments are integers in the 0-9 range,
  432. with 0 meaning highest quality but slowest, and 9 meaning fastest
  433. while producing the worst quality.
  434. @item reservoir
  435. Enable use of bit reservoir when set to 1. Default value is 1. LAME
  436. has this enabled by default, but can be overriden by use
  437. @option{--nores} option.
  438. @item joint_stereo (@emph{-m j})
  439. Enable the encoder to use (on a frame by frame basis) either L/R
  440. stereo or mid/side stereo. Default value is 1.
  441. @end table
  442. @section libopencore-amrnb
  443. OpenCORE Adaptive Multi-Rate Narrowband encoder.
  444. Requires the presence of the libopencore-amrnb headers and library during
  445. configuration. You need to explicitly configure the build with
  446. @code{--enable-libopencore-amrnb --enable-version3}.
  447. This is a mono-only encoder. Officially it only supports 8000Hz sample rate,
  448. but you can override it by setting @option{strict} to @samp{unofficial} or
  449. lower.
  450. @subsection Options
  451. @table @option
  452. @item b
  453. Set bitrate in bits per second. Only the following bitrates are supported,
  454. otherwise libavcodec will round to the nearest valid bitrate.
  455. @table @option
  456. @item 4750
  457. @item 5150
  458. @item 5900
  459. @item 6700
  460. @item 7400
  461. @item 7950
  462. @item 10200
  463. @item 12200
  464. @end table
  465. @item dtx
  466. Allow discontinuous transmission (generate comfort noise) when set to 1. The
  467. default value is 0 (disabled).
  468. @end table
  469. @anchor{libshine}
  470. @section libshine
  471. Shine Fixed-Point MP3 encoder wrapper.
  472. Shine is a fixed-point MP3 encoder. It has a far better performance on
  473. platforms without an FPU, e.g. armel CPUs, and some phones and tablets.
  474. However, as it is more targeted on performance than quality, it is not on par
  475. with LAME and other production-grade encoders quality-wise. Also, according to
  476. the project's homepage, this encoder may not be free of bugs as the code was
  477. written a long time ago and the project was dead for at least 5 years.
  478. This encoder only supports stereo and mono input. This is also CBR-only.
  479. The original project (last updated in early 2007) is at
  480. @url{http://sourceforge.net/projects/libshine-fxp/}. We only support the
  481. updated fork by the Savonet/Liquidsoap project at @url{https://github.com/savonet/shine}.
  482. Requires the presence of the libshine headers and library during
  483. configuration. You need to explicitly configure the build with
  484. @code{--enable-libshine}.
  485. See also @ref{libmp3lame}.
  486. @subsection Options
  487. The following options are supported by the libshine wrapper. The
  488. @command{shineenc}-equivalent of the options are listed in parentheses.
  489. @table @option
  490. @item b (@emph{-b})
  491. Set bitrate expressed in bits/s for CBR. @command{shineenc} @option{-b} option
  492. is expressed in kilobits/s.
  493. @end table
  494. @section libtwolame
  495. TwoLAME MP2 encoder wrapper.
  496. Requires the presence of the libtwolame headers and library during
  497. configuration. You need to explicitly configure the build with
  498. @code{--enable-libtwolame}.
  499. @subsection Options
  500. The following options are supported by the libtwolame wrapper. The
  501. @command{twolame}-equivalent options follow the FFmpeg ones and are in
  502. parentheses.
  503. @table @option
  504. @item b (@emph{-b})
  505. Set bitrate expressed in bits/s for CBR. @command{twolame} @option{b}
  506. option is expressed in kilobits/s. Default value is 128k.
  507. @item q (@emph{-V})
  508. Set quality for experimental VBR support. Maximum value range is
  509. from -50 to 50, useful range is from -10 to 10. The higher the
  510. value, the better the quality. This option is valid only using the
  511. @command{ffmpeg} command-line tool. For library interface users,
  512. use @option{global_quality}.
  513. @item mode (@emph{--mode})
  514. Set the mode of the resulting audio. Possible values:
  515. @table @samp
  516. @item auto
  517. Choose mode automatically based on the input. This is the default.
  518. @item stereo
  519. Stereo
  520. @item joint_stereo
  521. Joint stereo
  522. @item dual_channel
  523. Dual channel
  524. @item mono
  525. Mono
  526. @end table
  527. @item psymodel (@emph{--psyc-mode})
  528. Set psychoacoustic model to use in encoding. The argument must be
  529. an integer between -1 and 4, inclusive. The higher the value, the
  530. better the quality. The default value is 3.
  531. @item energy_levels (@emph{--energy})
  532. Enable energy levels extensions when set to 1. The default value is
  533. 0 (disabled).
  534. @item error_protection (@emph{--protect})
  535. Enable CRC error protection when set to 1. The default value is 0
  536. (disabled).
  537. @item copyright (@emph{--copyright})
  538. Set MPEG audio copyright flag when set to 1. The default value is 0
  539. (disabled).
  540. @item original (@emph{--original})
  541. Set MPEG audio original flag when set to 1. The default value is 0
  542. (disabled).
  543. @end table
  544. @anchor{libvo-aacenc}
  545. @section libvo-aacenc
  546. VisualOn AAC encoder.
  547. Requires the presence of the libvo-aacenc headers and library during
  548. configuration. You need to explicitly configure the build with
  549. @code{--enable-libvo-aacenc --enable-version3}.
  550. This encoder is considered to be worse than the
  551. @ref{aacenc,,native experimental FFmpeg AAC encoder}, according to
  552. multiple sources.
  553. @subsection Options
  554. The VisualOn AAC encoder only support encoding AAC-LC and up to 2
  555. channels. It is also CBR-only.
  556. @table @option
  557. @item b
  558. Set bit rate in bits/s.
  559. @end table
  560. @section libvo-amrwbenc
  561. VisualOn Adaptive Multi-Rate Wideband encoder.
  562. Requires the presence of the libvo-amrwbenc headers and library during
  563. configuration. You need to explicitly configure the build with
  564. @code{--enable-libvo-amrwbenc --enable-version3}.
  565. This is a mono-only encoder. Officially it only supports 16000Hz sample
  566. rate, but you can override it by setting @option{strict} to
  567. @samp{unofficial} or lower.
  568. @subsection Options
  569. @table @option
  570. @item b
  571. Set bitrate in bits/s. Only the following bitrates are supported, otherwise
  572. libavcodec will round to the nearest valid bitrate.
  573. @table @samp
  574. @item 6600
  575. @item 8850
  576. @item 12650
  577. @item 14250
  578. @item 15850
  579. @item 18250
  580. @item 19850
  581. @item 23050
  582. @item 23850
  583. @end table
  584. @item dtx
  585. Allow discontinuous transmission (generate comfort noise) when set to 1. The
  586. default value is 0 (disabled).
  587. @end table
  588. @section libopus
  589. libopus Opus Interactive Audio Codec encoder wrapper.
  590. Requires the presence of the libopus headers and library during
  591. configuration. You need to explicitly configure the build with
  592. @code{--enable-libopus}.
  593. @subsection Option Mapping
  594. Most libopus options are modeled after the @command{opusenc} utility from
  595. opus-tools. The following is an option mapping chart describing options
  596. supported by the libopus wrapper, and their @command{opusenc}-equivalent
  597. in parentheses.
  598. @table @option
  599. @item b (@emph{bitrate})
  600. Set the bit rate in bits/s. FFmpeg's @option{b} option is
  601. expressed in bits/s, while @command{opusenc}'s @option{bitrate} in
  602. kilobits/s.
  603. @item vbr (@emph{vbr}, @emph{hard-cbr}, and @emph{cvbr})
  604. Set VBR mode. The FFmpeg @option{vbr} option has the following
  605. valid arguments, with the their @command{opusenc} equivalent options
  606. in parentheses:
  607. @table @samp
  608. @item off (@emph{hard-cbr})
  609. Use constant bit rate encoding.
  610. @item on (@emph{vbr})
  611. Use variable bit rate encoding (the default).
  612. @item constrained (@emph{cvbr})
  613. Use constrained variable bit rate encoding.
  614. @end table
  615. @item compression_level (@emph{comp})
  616. Set encoding algorithm complexity. Valid options are integers in
  617. the 0-10 range. 0 gives the fastest encodes but lower quality, while 10
  618. gives the highest quality but slowest encoding. The default is 10.
  619. @item frame_duration (@emph{framesize})
  620. Set maximum frame size, or duration of a frame in milliseconds. The
  621. argument must be exactly the following: 2.5, 5, 10, 20, 40, 60. Smaller
  622. frame sizes achieve lower latency but less quality at a given bitrate.
  623. Sizes greater than 20ms are only interesting at fairly low bitrates.
  624. The default of FFmpeg is 10ms, but is 20ms in @command{opusenc}.
  625. @item packet_loss (@emph{expect-loss})
  626. Set expected packet loss percentage. The default is 0.
  627. @item application (N.A.)
  628. Set intended application type. Valid options are listed below:
  629. @table @samp
  630. @item voip
  631. Favor improved speech intelligibility.
  632. @item audio
  633. Favor faithfulness to the input (the default).
  634. @item lowdelay
  635. Restrict to only the lowest delay modes.
  636. @end table
  637. @item cutoff (N.A.)
  638. Set cutoff bandwidth in Hz. The argument must be exactly one of the
  639. following: 4000, 6000, 8000, 12000, or 20000, corresponding to
  640. narrowband, mediumband, wideband, super wideband, and fullband
  641. respectively. The default is 0 (cutoff disabled).
  642. @end table
  643. @section libvorbis
  644. libvorbis encoder wrapper.
  645. Requires the presence of the libvorbisenc headers and library during
  646. configuration. You need to explicitly configure the build with
  647. @code{--enable-libvorbis}.
  648. @subsection Options
  649. The following options are supported by the libvorbis wrapper. The
  650. @command{oggenc}-equivalent of the options are listed in parentheses.
  651. To get a more accurate and extensive documentation of the libvorbis
  652. options, consult the libvorbisenc's and @command{oggenc}'s documentations.
  653. See @url{http://xiph.org/vorbis/},
  654. @url{http://wiki.xiph.org/Vorbis-tools}, and oggenc(1).
  655. @table @option
  656. @item b (@emph{-b})
  657. Set bitrate expressed in bits/s for ABR. @command{oggenc} @option{-b} is
  658. expressed in kilobits/s.
  659. @item q (@emph{-q})
  660. Set constant quality setting for VBR. The value should be a float
  661. number in the range of -1.0 to 10.0. The higher the value, the better
  662. the quality. The default value is @samp{3.0}.
  663. This option is valid only using the @command{ffmpeg} command-line tool.
  664. For library interface users, use @option{global_quality}.
  665. @item cutoff (@emph{--advanced-encode-option lowpass_frequency=N})
  666. Set cutoff bandwidth in Hz, a value of 0 disables cutoff. @command{oggenc}'s
  667. related option is expressed in kHz. The default value is @samp{0} (cutoff
  668. disabled).
  669. @item minrate (@emph{-m})
  670. Set minimum bitrate expressed in bits/s. @command{oggenc} @option{-m} is
  671. expressed in kilobits/s.
  672. @item maxrate (@emph{-M})
  673. Set maximum bitrate expressed in bits/s. @command{oggenc} @option{-M} is
  674. expressed in kilobits/s. This only has effect on ABR mode.
  675. @item iblock (@emph{--advanced-encode-option impulse_noisetune=N})
  676. Set noise floor bias for impulse blocks. The value is a float number from
  677. -15.0 to 0.0. A negative bias instructs the encoder to pay special attention
  678. to the crispness of transients in the encoded audio. The tradeoff for better
  679. transient response is a higher bitrate.
  680. @end table
  681. @section libwavpack
  682. A wrapper providing WavPack encoding through libwavpack.
  683. Only lossless mode using 32-bit integer samples is supported currently.
  684. The @option{compression_level} option can be used to control speed vs.
  685. compression tradeoff, with the values mapped to libwavpack as follows:
  686. @table @option
  687. @item 0
  688. Fast mode - corresponding to the wavpack @option{-f} option.
  689. @item 1
  690. Normal (default) settings.
  691. @item 2
  692. High quality - corresponding to the wavpack @option{-h} option.
  693. @item 3
  694. Very high quality - corresponding to the wavpack @option{-hh} option.
  695. @item 4-8
  696. Same as 3, but with extra processing enabled - corresponding to the wavpack
  697. @option{-x} option. I.e. 4 is the same as @option{-x2} and 8 is the same as
  698. @option{-x6}.
  699. @end table
  700. @c man end AUDIO ENCODERS
  701. @chapter Video Encoders
  702. @c man begin VIDEO ENCODERS
  703. A description of some of the currently available video encoders
  704. follows.
  705. @section libtheora
  706. Theora format supported through libtheora.
  707. Requires the presence of the libtheora headers and library during
  708. configuration. You need to explicitly configure the build with
  709. @code{--enable-libtheora}.
  710. @subsection Options
  711. The following global options are mapped to internal libtheora options
  712. which affect the quality and the bitrate of the encoded stream.
  713. @table @option
  714. @item b
  715. Set the video bitrate, only works if the @code{qscale} flag in
  716. @option{flags} is not enabled.
  717. @item flags
  718. Used to enable constant quality mode encoding through the
  719. @option{qscale} flag, and to enable the @code{pass1} and @code{pass2}
  720. modes.
  721. @item g
  722. Set the GOP size.
  723. @item global_quality
  724. Set the global quality in lambda units, only works if the
  725. @code{qscale} flag in @option{flags} is enabled. The value is clipped
  726. in the [0 - 10*@code{FF_QP2LAMBDA}] range, and then multiplied for 6.3
  727. to get a value in the native libtheora range [0-63]. A higher value
  728. corresponds to a higher quality.
  729. For example, to set maximum constant quality encoding with
  730. @command{ffmpeg}:
  731. @example
  732. ffmpeg -i INPUT -flags:v qscale -global_quality:v "10*QP2LAMBDA" -codec:v libtheora OUTPUT.ogg
  733. @end example
  734. @end table
  735. @section libvpx
  736. VP8 format supported through libvpx.
  737. Requires the presence of the libvpx headers and library during configuration.
  738. You need to explicitly configure the build with @code{--enable-libvpx}.
  739. @subsection Options
  740. Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
  741. @table @option
  742. @item threads
  743. g_threads
  744. @item profile
  745. g_profile
  746. @item vb
  747. rc_target_bitrate
  748. @item g
  749. kf_max_dist
  750. @item keyint_min
  751. kf_min_dist
  752. @item qmin
  753. rc_min_quantizer
  754. @item qmax
  755. rc_max_quantizer
  756. @item bufsize, vb
  757. rc_buf_sz
  758. @code{(bufsize * 1000 / vb)}
  759. rc_buf_optimal_sz
  760. @code{(bufsize * 1000 / vb * 5 / 6)}
  761. @item rc_init_occupancy, vb
  762. rc_buf_initial_sz
  763. @code{(rc_init_occupancy * 1000 / vb)}
  764. @item rc_buffer_aggressivity
  765. rc_undershoot_pct
  766. @item skip_threshold
  767. rc_dropframe_thresh
  768. @item qcomp
  769. rc_2pass_vbr_bias_pct
  770. @item maxrate, vb
  771. rc_2pass_vbr_maxsection_pct
  772. @code{(maxrate * 100 / vb)}
  773. @item minrate, vb
  774. rc_2pass_vbr_minsection_pct
  775. @code{(minrate * 100 / vb)}
  776. @item minrate, maxrate, vb
  777. @code{VPX_CBR}
  778. @code{(minrate == maxrate == vb)}
  779. @item crf
  780. @code{VPX_CQ}, @code{VP8E_SET_CQ_LEVEL}
  781. @item quality
  782. @table @option
  783. @item @var{best}
  784. @code{VPX_DL_BEST_QUALITY}
  785. @item @var{good}
  786. @code{VPX_DL_GOOD_QUALITY}
  787. @item @var{realtime}
  788. @code{VPX_DL_REALTIME}
  789. @end table
  790. @item speed
  791. @code{VP8E_SET_CPUUSED}
  792. @item nr
  793. @code{VP8E_SET_NOISE_SENSITIVITY}
  794. @item mb_threshold
  795. @code{VP8E_SET_STATIC_THRESHOLD}
  796. @item slices
  797. @code{VP8E_SET_TOKEN_PARTITIONS}
  798. @item max-intra-rate
  799. @code{VP8E_SET_MAX_INTRA_BITRATE_PCT}
  800. @item force_key_frames
  801. @code{VPX_EFLAG_FORCE_KF}
  802. @item Alternate reference frame related
  803. @table @option
  804. @item vp8flags altref
  805. @code{VP8E_SET_ENABLEAUTOALTREF}
  806. @item @var{arnr_max_frames}
  807. @code{VP8E_SET_ARNR_MAXFRAMES}
  808. @item @var{arnr_type}
  809. @code{VP8E_SET_ARNR_TYPE}
  810. @item @var{arnr_strength}
  811. @code{VP8E_SET_ARNR_STRENGTH}
  812. @item @var{rc_lookahead}
  813. g_lag_in_frames
  814. @end table
  815. @item vp8flags error_resilient
  816. g_error_resilient
  817. @end table
  818. For more information about libvpx see:
  819. @url{http://www.webmproject.org/}
  820. @section libx264
  821. x264 H.264/MPEG-4 AVC encoder wrapper.
  822. This encoder requires the presence of the libx264 headers and library
  823. during configuration. You need to explicitly configure the build with
  824. @code{--enable-libx264}.
  825. libx264 supports an impressive number of features, including 8x8 and
  826. 4x4 adaptive spatial transform, adaptive B-frame placement, CAVLC/CABAC
  827. entropy coding, interlacing (MBAFF), lossless mode, psy optimizations
  828. for detail retention (adaptive quantization, psy-RD, psy-trellis).
  829. Many libx264 encoder options are mapped to FFmpeg global codec
  830. options, while unique encoder options are provided through private
  831. options. Additionally the @option{x264opts} and @option{x264-params}
  832. private options allows to pass a list of key=value tuples as accepted
  833. by the libx264 @code{x264_param_parse} function.
  834. The x264 project website is at
  835. @url{http://www.videolan.org/developers/x264.html}.
  836. @subsection Options
  837. The following options are supported by the libx264 wrapper. The
  838. @command{x264}-equivalent options or values are listed in parentheses
  839. for easy migration.
  840. To reduce the duplication of documentation, only the private options
  841. and some others requiring special attention are documented here. For
  842. the documentation of the undocumented generic options, see
  843. @ref{codec-options,,the Codec Options chapter}.
  844. To get a more accurate and extensive documentation of the libx264
  845. options, invoke the command @command{x264 --full-help} or consult
  846. the libx264 documentation.
  847. @table @option
  848. @item b (@emph{bitrate})
  849. Set bitrate in bits/s. Note that FFmpeg's @option{b} option is
  850. expressed in bits/s, while @command{x264}'s @option{bitrate} is in
  851. kilobits/s.
  852. @item bf (@emph{bframes})
  853. @item g (@emph{keyint})
  854. @item qmax (@emph{qpmax})
  855. @item qmin (@emph{qpmin})
  856. @item qdiff (@emph{qpstep})
  857. @item qblur (@emph{qblur})
  858. @item qcomp (@emph{qcomp})
  859. @item refs (@emph{ref})
  860. @item sc_threshold (@emph{scenecut})
  861. @item trellis (@emph{trellis})
  862. @item nr (@emph{nr})
  863. @item me_range (@emph{merange})
  864. @item me_method (@emph{me})
  865. Set motion estimation method. Possible values in the decreasing order
  866. of speed:
  867. @table @samp
  868. @item dia (@emph{dia})
  869. @item epzs (@emph{dia})
  870. Diamond search with radius 1 (fastest). @samp{epzs} is an alias for
  871. @samp{dia}.
  872. @item hex (@emph{hex})
  873. Hexagonal search with radius 2.
  874. @item umh (@emph{umh})
  875. Uneven multi-hexagon search.
  876. @item esa (@emph{esa})
  877. Exhaustive search.
  878. @item tesa (@emph{tesa})
  879. Hadamard exhaustive search (slowest).
  880. @end table
  881. @item subq (@emph{subme})
  882. @item b_strategy (@emph{b-adapt})
  883. @item keyint_min (@emph{min-keyint})
  884. @item coder
  885. Set entropy encoder. Possible values:
  886. @table @samp
  887. @item ac
  888. Enable CABAC.
  889. @item vlc
  890. Enable CAVLC and disable CABAC. It generates the same effect as
  891. @command{x264}'s @option{--no-cabac} option.
  892. @end table
  893. @item cmp
  894. Set full pixel motion estimation comparation algorithm. Possible values:
  895. @table @samp
  896. @item chroma
  897. Enable chroma in motion estimation.
  898. @item sad
  899. Ignore chroma in motion estimation. It generates the same effect as
  900. @command{x264}'s @option{--no-chroma-me} option.
  901. @end table
  902. @item threads (@emph{threads})
  903. @item thread_type
  904. Set multithreading technique. Possible values:
  905. @table @samp
  906. @item slice
  907. Slice-based multithreading. It generates the same effect as
  908. @command{x264}'s @option{--sliced-threads} option.
  909. @item frame
  910. Frame-based multithreading.
  911. @end table
  912. @item flags
  913. Set encoding flags. It can be used to disable closed GOP and enable
  914. open GOP by setting it to @code{-cgop}. The result is similar to
  915. the behavior of @command{x264}'s @option{--open-gop} option.
  916. @item rc_init_occupancy (@emph{vbv-init})
  917. @item preset (@emph{preset})
  918. Set the encoding preset.
  919. @item tune (@emph{tune})
  920. Set tuning of the encoding params.
  921. @item profile (@emph{profile})
  922. Set profile restrictions.
  923. @item fastfirstpass
  924. Enable fast settings when encoding first pass, when set to 1. When set
  925. to 0, it has the same effect of @command{x264}'s
  926. @option{--slow-firstpass} option.
  927. @item crf (@emph{crf})
  928. Set the quality for constant quality mode.
  929. @item crf_max (@emph{crf-max})
  930. In CRF mode, prevents VBV from lowering quality beyond this point.
  931. @item qp (@emph{qp})
  932. Set constant quantization rate control method parameter.
  933. @item aq-mode (@emph{aq-mode})
  934. Set AQ method. Possible values:
  935. @table @samp
  936. @item none (@emph{0})
  937. Disabled.
  938. @item variance (@emph{1})
  939. Variance AQ (complexity mask).
  940. @item autovariance (@emph{2})
  941. Auto-variance AQ (experimental).
  942. @end table
  943. @item aq-strength (@emph{aq-strength})
  944. Set AQ strength, reduce blocking and blurring in flat and textured areas.
  945. @item psy
  946. Use psychovisual optimizations when set to 1. When set to 0, it has the
  947. same effect as @command{x264}'s @option{--no-psy} option.
  948. @item psy-rd (@emph{psy-rd})
  949. Set strength of psychovisual optimization, in
  950. @var{psy-rd}:@var{psy-trellis} format.
  951. @item rc-lookahead (@emph{rc-lookahead})
  952. Set number of frames to look ahead for frametype and ratecontrol.
  953. @item weightb
  954. Enable weighted prediction for B-frames when set to 1. When set to 0,
  955. it has the same effect as @command{x264}'s @option{--no-weightb} option.
  956. @item weightp (@emph{weightp})
  957. Set weighted prediction method for P-frames. Possible values:
  958. @table @samp
  959. @item none (@emph{0})
  960. Disabled
  961. @item simple (@emph{1})
  962. Enable only weighted refs
  963. @item smart (@emph{2})
  964. Enable both weighted refs and duplicates
  965. @end table
  966. @item ssim (@emph{ssim})
  967. Enable calculation and printing SSIM stats after the encoding.
  968. @item intra-refresh (@emph{intra-refresh})
  969. Enable the use of Periodic Intra Refresh instead of IDR frames when set
  970. to 1.
  971. @item bluray-compat (@emph{bluray-compat})
  972. Configure the encoder to be compatible with the bluray standard.
  973. It is a shorthand for setting "bluray-compat=1 force-cfr=1".
  974. @item b-bias (@emph{b-bias})
  975. Set the influence on how often B-frames are used.
  976. @item b-pyramid (@emph{b-pyramid})
  977. Set method for keeping of some B-frames as references. Possible values:
  978. @table @samp
  979. @item none (@emph{none})
  980. Disabled.
  981. @item strict (@emph{strict})
  982. Strictly hierarchical pyramid.
  983. @item normal (@emph{normal})
  984. Non-strict (not Blu-ray compatible).
  985. @end table
  986. @item mixed-refs
  987. Enable the use of one reference per partition, as opposed to one
  988. reference per macroblock when set to 1. When set to 0, it has the
  989. same effect as @command{x264}'s @option{--no-mixed-refs} option.
  990. @item 8x8dct
  991. Enable adaptive spatial transform (high profile 8x8 transform)
  992. when set to 1. When set to 0, it has the same effect as
  993. @command{x264}'s @option{--no-8x8dct} option.
  994. @item fast-pskip
  995. Enable early SKIP detection on P-frames when set to 1. When set
  996. to 0, it has the same effect as @command{x264}'s
  997. @option{--no-fast-pskip} option.
  998. @item aud (@emph{aud})
  999. Enable use of access unit delimiters when set to 1.
  1000. @item mbtree
  1001. Enable use macroblock tree ratecontrol when set to 1. When set
  1002. to 0, it has the same effect as @command{x264}'s
  1003. @option{--no-mbtree} option.
  1004. @item deblock (@emph{deblock})
  1005. Set loop filter parameters, in @var{alpha}:@var{beta} form.
  1006. @item cplxblur (@emph{cplxblur})
  1007. Set fluctuations reduction in QP (before curve compression).
  1008. @item partitions (@emph{partitions})
  1009. Set partitions to consider as a comma-separated list of. Possible
  1010. values in the list:
  1011. @table @samp
  1012. @item p8x8
  1013. 8x8 P-frame partition.
  1014. @item p4x4
  1015. 4x4 P-frame partition.
  1016. @item b8x8
  1017. 4x4 B-frame partition.
  1018. @item i8x8
  1019. 8x8 I-frame partition.
  1020. @item i4x4
  1021. 4x4 I-frame partition.
  1022. (Enabling @samp{p4x4} requires @samp{p8x8} to be enabled. Enabling
  1023. @samp{i8x8} requires adaptive spatial transform (@option{8x8dct}
  1024. option) to be enabled.)
  1025. @item none (@emph{none})
  1026. Do not consider any partitions.
  1027. @item all (@emph{all})
  1028. Consider every partition.
  1029. @end table
  1030. @item direct-pred (@emph{direct})
  1031. Set direct MV prediction mode. Possible values:
  1032. @table @samp
  1033. @item none (@emph{none})
  1034. Disable MV prediction.
  1035. @item spatial (@emph{spatial})
  1036. Enable spatial predicting.
  1037. @item temporal (@emph{temporal})
  1038. Enable temporal predicting.
  1039. @item auto (@emph{auto})
  1040. Automatically decided.
  1041. @end table
  1042. @item slice-max-size (@emph{slice-max-size})
  1043. Set the limit of the size of each slice in bytes. If not specified
  1044. but RTP payload size (@option{ps}) is specified, that is used.
  1045. @item stats (@emph{stats})
  1046. Set the file name for multi-pass stats.
  1047. @item nal-hrd (@emph{nal-hrd})
  1048. Set signal HRD information (requires @option{vbv-bufsize} to be set).
  1049. Possible values:
  1050. @table @samp
  1051. @item none (@emph{none})
  1052. Disable HRD information signaling.
  1053. @item vbr (@emph{vbr})
  1054. Variable bit rate.
  1055. @item cbr (@emph{cbr})
  1056. Constant bit rate (not allowed in MP4 container).
  1057. @end table
  1058. @item x264opts (N.A.)
  1059. Set any x264 option, see @command{x264 --fullhelp} for a list.
  1060. Argument is a list of @var{key}=@var{value} couples separated by
  1061. ":". In @var{filter} and @var{psy-rd} options that use ":" as a separator
  1062. themselves, use "," instead. They accept it as well since long ago but this
  1063. is kept undocumented for some reason.
  1064. For example to specify libx264 encoding options with @command{ffmpeg}:
  1065. @example
  1066. ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
  1067. @end example
  1068. @item x264-params (N.A.)
  1069. Override the x264 configuration using a :-separated list of key=value
  1070. parameters.
  1071. This option is functionally the same as the @option{x264opts}, but is
  1072. duplicated for compability with the Libav fork.
  1073. For example to specify libx264 encoding options with @command{ffmpeg}:
  1074. @example
  1075. ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
  1076. cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
  1077. no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
  1078. @end example
  1079. @end table
  1080. Encoding ffpresets for common usages are provided so they can be used with the
  1081. general presets system (e.g. passing the @option{pre} option).
  1082. @section libxvid
  1083. Xvid MPEG-4 Part 2 encoder wrapper.
  1084. This encoder requires the presence of the libxvidcore headers and library
  1085. during configuration. You need to explicitly configure the build with
  1086. @code{--enable-libxvid --enable-gpl}.
  1087. The native @code{mpeg4} encoder supports the MPEG-4 Part 2 format, so
  1088. users can encode to this format without this library.
  1089. @subsection Options
  1090. The following options are supported by the libxvid wrapper. Some of
  1091. the following options are listed but are not documented, and
  1092. correspond to shared codec options. See @ref{codec-options,,the Codec
  1093. Options chapter} for their documentation. The other shared options
  1094. which are not listed have no effect for the libxvid encoder.
  1095. @table @option
  1096. @item b
  1097. @item g
  1098. @item qmin
  1099. @item qmax
  1100. @item mpeg_quant
  1101. @item threads
  1102. @item bf
  1103. @item b_qfactor
  1104. @item b_qoffset
  1105. @item flags
  1106. Set specific encoding flags. Possible values:
  1107. @table @samp
  1108. @item mv4
  1109. Use four motion vector by macroblock.
  1110. @item aic
  1111. Enable high quality AC prediction.
  1112. @item gray
  1113. Only encode grayscale.
  1114. @item gmc
  1115. Enable the use of global motion compensation (GMC).
  1116. @item qpel
  1117. Enable quarter-pixel motion compensation.
  1118. @item cgop
  1119. Enable closed GOP.
  1120. @item global_header
  1121. Place global headers in extradata instead of every keyframe.
  1122. @end table
  1123. @item trellis
  1124. @item me_method
  1125. Set motion estimation method. Possible values in decreasing order of
  1126. speed and increasing order of quality:
  1127. @table @samp
  1128. @item zero
  1129. Use no motion estimation (default).
  1130. @item phods
  1131. @item x1
  1132. @item log
  1133. Enable advanced diamond zonal search for 16x16 blocks and half-pixel
  1134. refinement for 16x16 blocks. @samp{x1} and @samp{log} are aliases for
  1135. @samp{phods}.
  1136. @item epzs
  1137. Enable all of the things described above, plus advanced diamond zonal
  1138. search for 8x8 blocks, half-pixel refinement for 8x8 blocks, and motion
  1139. estimation on chroma planes.
  1140. @item full
  1141. Enable all of the things described above, plus extended 16x16 and 8x8
  1142. blocks search.
  1143. @end table
  1144. @item mbd
  1145. Set macroblock decision algorithm. Possible values in the increasing
  1146. order of quality:
  1147. @table @samp
  1148. @item simple
  1149. Use macroblock comparing function algorithm (default).
  1150. @item bits
  1151. Enable rate distortion-based half pixel and quarter pixel refinement for
  1152. 16x16 blocks.
  1153. @item rd
  1154. Enable all of the things described above, plus rate distortion-based
  1155. half pixel and quarter pixel refinement for 8x8 blocks, and rate
  1156. distortion-based search using square pattern.
  1157. @end table
  1158. @item lumi_aq
  1159. Enable lumi masking adaptive quantization when set to 1. Default is 0
  1160. (disabled).
  1161. @item variance_aq
  1162. Enable variance adaptive quantization when set to 1. Default is 0
  1163. (disabled).
  1164. When combined with @option{lumi_aq}, the resulting quality will not
  1165. be better than any of the two specified individually. In other
  1166. words, the resulting quality will be the worse one of the two
  1167. effects.
  1168. @item ssim
  1169. Set structural similarity (SSIM) displaying method. Possible values:
  1170. @table @samp
  1171. @item off
  1172. Disable displaying of SSIM information.
  1173. @item avg
  1174. Output average SSIM at the end of encoding to stdout. The format of
  1175. showing the average SSIM is:
  1176. @example
  1177. Average SSIM: %f
  1178. @end example
  1179. For users who are not familiar with C, %f means a float number, or
  1180. a decimal (e.g. 0.939232).
  1181. @item frame
  1182. Output both per-frame SSIM data during encoding and average SSIM at
  1183. the end of encoding to stdout. The format of per-frame information
  1184. is:
  1185. @example
  1186. SSIM: avg: %1.3f min: %1.3f max: %1.3f
  1187. @end example
  1188. For users who are not familiar with C, %1.3f means a float number
  1189. rounded to 3 digits after the dot (e.g. 0.932).
  1190. @end table
  1191. @item ssim_acc
  1192. Set SSIM accuracy. Valid options are integers within the range of
  1193. 0-4, while 0 gives the most accurate result and 4 computes the
  1194. fastest.
  1195. @end table
  1196. @section png
  1197. PNG image encoder.
  1198. @subsection Private options
  1199. @table @option
  1200. @item dpi @var{integer}
  1201. Set physical density of pixels, in dots per inch, unset by default
  1202. @item dpm @var{integer}
  1203. Set physical density of pixels, in dots per meter, unset by default
  1204. @end table
  1205. @section ProRes
  1206. Apple ProRes encoder.
  1207. FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
  1208. The used encoder can be choosen with the @code{-vcodec} option.
  1209. @subsection Private Options for prores-ks
  1210. @table @option
  1211. @item profile @var{integer}
  1212. Select the ProRes profile to encode
  1213. @table @samp
  1214. @item proxy
  1215. @item lt
  1216. @item standard
  1217. @item hq
  1218. @item 4444
  1219. @end table
  1220. @item quant_mat @var{integer}
  1221. Select quantization matrix.
  1222. @table @samp
  1223. @item auto
  1224. @item default
  1225. @item proxy
  1226. @item lt
  1227. @item standard
  1228. @item hq
  1229. @end table
  1230. If set to @var{auto}, the matrix matching the profile will be picked.
  1231. If not set, the matrix providing the highest quality, @var{default}, will be
  1232. picked.
  1233. @item bits_per_mb @var{integer}
  1234. How many bits to allot for coding one macroblock. Different profiles use
  1235. between 200 and 2400 bits per macroblock, the maximum is 8000.
  1236. @item mbs_per_slice @var{integer}
  1237. Number of macroblocks in each slice (1-8); the default value (8)
  1238. should be good in almost all situations.
  1239. @item vendor @var{string}
  1240. Override the 4-byte vendor ID.
  1241. A custom vendor ID like @var{apl0} would claim the stream was produced by
  1242. the Apple encoder.
  1243. @item alpha_bits @var{integer}
  1244. Specify number of bits for alpha component.
  1245. Possible values are @var{0}, @var{8} and @var{16}.
  1246. Use @var{0} to disable alpha plane coding.
  1247. @end table
  1248. @subsection Speed considerations
  1249. In the default mode of operation the encoder has to honor frame constraints
  1250. (i.e. not produc frames with size bigger than requested) while still making
  1251. output picture as good as possible.
  1252. A frame containing a lot of small details is harder to compress and the encoder
  1253. would spend more time searching for appropriate quantizers for each slice.
  1254. Setting a higher @option{bits_per_mb} limit will improve the speed.
  1255. For the fastest encoding speed set the @option{qscale} parameter (4 is the
  1256. recommended value) and do not set a size constraint.
  1257. @c man end VIDEO ENCODERS