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.

1613 lines
44KB

  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. @section libmp3lame
  412. LAME (Lame Ain't an MP3 Encoder) MP3 encoder wrapper.
  413. Requires the presence of the libmp3lame headers and library during
  414. configuration. You need to explicitly configure the build with
  415. @code{--enable-libmp3lame}.
  416. @subsection Options
  417. The following options are supported by the libmp3lame wrapper. The
  418. @command{lame}-equivalent of the options are listed in parentheses.
  419. @table @option
  420. @item b (@emph{-b})
  421. Set bitrate expressed in bits/s for CBR. LAME @code{bitrate} is
  422. expressed in kilobits/s.
  423. @item q (@emph{-V})
  424. Set constant quality setting for VBR. This option is valid only
  425. using the @command{ffmpeg} command-line tool. For library interface
  426. users, use @option{global_quality}.
  427. @item compression_level (@emph{-q})
  428. Set algorithm quality. Valid arguments are integers in the 0-9 range,
  429. with 0 meaning highest quality but slowest, and 9 meaning fastest
  430. while producing the worst quality.
  431. @item reservoir
  432. Enable use of bit reservoir when set to 1. Default value is 1. LAME
  433. has this enabled by default, but can be overriden by use
  434. @option{--nores} option.
  435. @item joint_stereo (@emph{-m j})
  436. Enable the encoder to use (on a frame by frame basis) either L/R
  437. stereo or mid/side stereo. Default value is 1.
  438. @end table
  439. @section libopencore-amrnb
  440. OpenCORE Adaptive Multi-Rate Narrowband encoder.
  441. Requires the presence of the libopencore-amrnb headers and library during
  442. configuration. You need to explicitly configure the build with
  443. @code{--enable-libopencore-amrnb --enable-version3}.
  444. This is a mono-only encoder. Officially it only supports 8000Hz sample rate,
  445. but you can override it by setting @option{strict} to @samp{unofficial} or
  446. lower.
  447. @subsection Options
  448. @table @option
  449. @item b
  450. Set bitrate in bits per second. Only the following bitrates are supported,
  451. otherwise libavcodec will round to the nearest valid bitrate.
  452. @table @option
  453. @item 4750
  454. @item 5150
  455. @item 5900
  456. @item 6700
  457. @item 7400
  458. @item 7950
  459. @item 10200
  460. @item 12200
  461. @end table
  462. @item dtx
  463. Allow discontinuous transmission (generate comfort noise) when set to 1. The
  464. default value is 0 (disabled).
  465. @end table
  466. @section libtwolame
  467. TwoLAME MP2 encoder wrapper.
  468. Requires the presence of the libtwolame headers and library during
  469. configuration. You need to explicitly configure the build with
  470. @code{--enable-libtwolame}.
  471. @subsection Options
  472. The following options are supported by the libtwolame wrapper. The
  473. @command{twolame}-equivalent options follow the FFmpeg ones and are in
  474. parentheses.
  475. @table @option
  476. @item b (@emph{-b})
  477. Set bitrate expressed in bits/s for CBR. @command{twolame} @option{b}
  478. option is expressed in kilobits/s. Default value is 128k.
  479. @item q (@emph{-V})
  480. Set quality for experimental VBR support. Maximum value range is
  481. from -50 to 50, useful range is from -10 to 10. The higher the
  482. value, the better the quality. This option is valid only using the
  483. @command{ffmpeg} command-line tool. For library interface users,
  484. use @option{global_quality}.
  485. @item mode (@emph{--mode})
  486. Set the mode of the resulting audio. Possible values:
  487. @table @samp
  488. @item auto
  489. Choose mode automatically based on the input. This is the default.
  490. @item stereo
  491. Stereo
  492. @item joint_stereo
  493. Joint stereo
  494. @item dual_channel
  495. Dual channel
  496. @item mono
  497. Mono
  498. @end table
  499. @item psymodel (@emph{--psyc-mode})
  500. Set psychoacoustic model to use in encoding. The argument must be
  501. an integer between -1 and 4, inclusive. The higher the value, the
  502. better the quality. The default value is 3.
  503. @item energy_levels (@emph{--energy})
  504. Enable energy levels extensions when set to 1. The default value is
  505. 0 (disabled).
  506. @item error_protection (@emph{--protect})
  507. Enable CRC error protection when set to 1. The default value is 0
  508. (disabled).
  509. @item copyright (@emph{--copyright})
  510. Set MPEG audio copyright flag when set to 1. The default value is 0
  511. (disabled).
  512. @item original (@emph{--original})
  513. Set MPEG audio original flag when set to 1. The default value is 0
  514. (disabled).
  515. @end table
  516. @anchor{libvo-aacenc}
  517. @section libvo-aacenc
  518. VisualOn AAC encoder.
  519. Requires the presence of the libvo-aacenc headers and library during
  520. configuration. You need to explicitly configure the build with
  521. @code{--enable-libvo-aacenc --enable-version3}.
  522. This encoder is considered to be worse than the
  523. @ref{aacenc,,native experimental FFmpeg AAC encoder}, according to
  524. multiple sources.
  525. @subsection Options
  526. The VisualOn AAC encoder only support encoding AAC-LC and up to 2
  527. channels. It is also CBR-only.
  528. @table @option
  529. @item b
  530. Set bit rate in bits/s.
  531. @end table
  532. @section libvo-amrwbenc
  533. VisualOn Adaptive Multi-Rate Wideband encoder.
  534. Requires the presence of the libvo-amrwbenc headers and library during
  535. configuration. You need to explicitly configure the build with
  536. @code{--enable-libvo-amrwbenc --enable-version3}.
  537. This is a mono-only encoder. Officially it only supports 16000Hz sample
  538. rate, but you can override it by setting @option{strict} to
  539. @samp{unofficial} or lower.
  540. @subsection Options
  541. @table @option
  542. @item b
  543. Set bitrate in bits/s. Only the following bitrates are supported, otherwise
  544. libavcodec will round to the nearest valid bitrate.
  545. @table @samp
  546. @item 6600
  547. @item 8850
  548. @item 12650
  549. @item 14250
  550. @item 15850
  551. @item 18250
  552. @item 19850
  553. @item 23050
  554. @item 23850
  555. @end table
  556. @item dtx
  557. Allow discontinuous transmission (generate comfort noise) when set to 1. The
  558. default value is 0 (disabled).
  559. @end table
  560. @section libopus
  561. libopus Opus Interactive Audio Codec encoder wrapper.
  562. Requires the presence of the libopus headers and library during
  563. configuration. You need to explicitly configure the build with
  564. @code{--enable-libopus}.
  565. @subsection Option Mapping
  566. Most libopus options are modeled after the @command{opusenc} utility from
  567. opus-tools. The following is an option mapping chart describing options
  568. supported by the libopus wrapper, and their @command{opusenc}-equivalent
  569. in parentheses.
  570. @table @option
  571. @item b (@emph{bitrate})
  572. Set the bit rate in bits/s. FFmpeg's @option{b} option is
  573. expressed in bits/s, while @command{opusenc}'s @option{bitrate} in
  574. kilobits/s.
  575. @item vbr (@emph{vbr}, @emph{hard-cbr}, and @emph{cvbr})
  576. Set VBR mode. The FFmpeg @option{vbr} option has the following
  577. valid arguments, with the their @command{opusenc} equivalent options
  578. in parentheses:
  579. @table @samp
  580. @item off (@emph{hard-cbr})
  581. Use constant bit rate encoding.
  582. @item on (@emph{vbr})
  583. Use variable bit rate encoding (the default).
  584. @item constrained (@emph{cvbr})
  585. Use constrained variable bit rate encoding.
  586. @end table
  587. @item compression_level (@emph{comp})
  588. Set encoding algorithm complexity. Valid options are integers in
  589. the 0-10 range. 0 gives the fastest encodes but lower quality, while 10
  590. gives the highest quality but slowest encoding. The default is 10.
  591. @item frame_duration (@emph{framesize})
  592. Set maximum frame size, or duration of a frame in milliseconds. The
  593. argument must be exactly the following: 2.5, 5, 10, 20, 40, 60. Smaller
  594. frame sizes achieve lower latency but less quality at a given bitrate.
  595. Sizes greater than 20ms are only interesting at fairly low bitrates.
  596. The default of FFmpeg is 10ms, but is 20ms in @command{opusenc}.
  597. @item packet_loss (@emph{expect-loss})
  598. Set expected packet loss percentage. The default is 0.
  599. @item application (N.A.)
  600. Set intended application type. Valid options are listed below:
  601. @table @samp
  602. @item voip
  603. Favor improved speech intelligibility.
  604. @item audio
  605. Favor faithfulness to the input (the default).
  606. @item lowdelay
  607. Restrict to only the lowest delay modes.
  608. @end table
  609. @item cutoff (N.A.)
  610. Set cutoff bandwidth in Hz. The argument must be exactly one of the
  611. following: 4000, 6000, 8000, 12000, or 20000, corresponding to
  612. narrowband, mediumband, wideband, super wideband, and fullband
  613. respectively. The default is 0 (cutoff disabled).
  614. @end table
  615. @section libvorbis
  616. libvorbis encoder wrapper.
  617. Requires the presence of the libvorbisenc headers and library during
  618. configuration. You need to explicitly configure the build with
  619. @code{--enable-libvorbis}.
  620. @subsection Options
  621. The following options are supported by the libvorbis wrapper. The
  622. @command{oggenc}-equivalent of the options are listed in parentheses.
  623. To get a more accurate and extensive documentation of the libvorbis
  624. options, consult the libvorbisenc's and @command{oggenc}'s documentations.
  625. See @url{http://xiph.org/vorbis/},
  626. @url{http://wiki.xiph.org/Vorbis-tools}, and oggenc(1).
  627. @table @option
  628. @item b (@emph{-b})
  629. Set bitrate expressed in bits/s for ABR. @command{oggenc} @option{-b} is
  630. expressed in kilobits/s.
  631. @item q (@emph{-q})
  632. Set constant quality setting for VBR. The value should be a float
  633. number in the range of -1.0 to 10.0. The higher the value, the better
  634. the quality. The default value is @samp{3.0}.
  635. This option is valid only using the @command{ffmpeg} command-line tool.
  636. For library interface users, use @option{global_quality}.
  637. @item cutoff (@emph{--advanced-encode-option lowpass_frequency=N})
  638. Set cutoff bandwidth in Hz, a value of 0 disables cutoff. @command{oggenc}'s
  639. related option is expressed in kHz. The default value is @samp{0} (cutoff
  640. disabled).
  641. @item minrate (@emph{-m})
  642. Set minimum bitrate expressed in bits/s. @command{oggenc} @option{-m} is
  643. expressed in kilobits/s.
  644. @item maxrate (@emph{-M})
  645. Set maximum bitrate expressed in bits/s. @command{oggenc} @option{-M} is
  646. expressed in kilobits/s. This only has effect on ABR mode.
  647. @item iblock (@emph{--advanced-encode-option impulse_noisetune=N})
  648. Set noise floor bias for impulse blocks. The value is a float number from
  649. -15.0 to 0.0. A negative bias instructs the encoder to pay special attention
  650. to the crispness of transients in the encoded audio. The tradeoff for better
  651. transient response is a higher bitrate.
  652. @end table
  653. @section libwavpack
  654. A wrapper providing WavPack encoding through libwavpack.
  655. Only lossless mode using 32-bit integer samples is supported currently.
  656. The @option{compression_level} option can be used to control speed vs.
  657. compression tradeoff, with the values mapped to libwavpack as follows:
  658. @table @option
  659. @item 0
  660. Fast mode - corresponding to the wavpack @option{-f} option.
  661. @item 1
  662. Normal (default) settings.
  663. @item 2
  664. High quality - corresponding to the wavpack @option{-h} option.
  665. @item 3
  666. Very high quality - corresponding to the wavpack @option{-hh} option.
  667. @item 4-8
  668. Same as 3, but with extra processing enabled - corresponding to the wavpack
  669. @option{-x} option. I.e. 4 is the same as @option{-x2} and 8 is the same as
  670. @option{-x6}.
  671. @end table
  672. @c man end AUDIO ENCODERS
  673. @chapter Video Encoders
  674. @c man begin VIDEO ENCODERS
  675. A description of some of the currently available video encoders
  676. follows.
  677. @section libtheora
  678. Theora format supported through libtheora.
  679. Requires the presence of the libtheora headers and library during
  680. configuration. You need to explicitly configure the build with
  681. @code{--enable-libtheora}.
  682. @subsection Options
  683. The following global options are mapped to internal libtheora options
  684. which affect the quality and the bitrate of the encoded stream.
  685. @table @option
  686. @item b
  687. Set the video bitrate, only works if the @code{qscale} flag in
  688. @option{flags} is not enabled.
  689. @item flags
  690. Used to enable constant quality mode encoding through the
  691. @option{qscale} flag, and to enable the @code{pass1} and @code{pass2}
  692. modes.
  693. @item g
  694. Set the GOP size.
  695. @item global_quality
  696. Set the global quality in lambda units, only works if the
  697. @code{qscale} flag in @option{flags} is enabled. The value is clipped
  698. in the [0 - 10*@code{FF_QP2LAMBDA}] range, and then multiplied for 6.3
  699. to get a value in the native libtheora range [0-63]. A higher value
  700. corresponds to a higher quality.
  701. For example, to set maximum constant quality encoding with
  702. @command{ffmpeg}:
  703. @example
  704. ffmpeg -i INPUT -flags:v qscale -global_quality:v "10*QP2LAMBDA" -codec:v libtheora OUTPUT.ogg
  705. @end example
  706. @end table
  707. @section libvpx
  708. VP8 format supported through libvpx.
  709. Requires the presence of the libvpx headers and library during configuration.
  710. You need to explicitly configure the build with @code{--enable-libvpx}.
  711. @subsection Options
  712. Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
  713. @table @option
  714. @item threads
  715. g_threads
  716. @item profile
  717. g_profile
  718. @item vb
  719. rc_target_bitrate
  720. @item g
  721. kf_max_dist
  722. @item keyint_min
  723. kf_min_dist
  724. @item qmin
  725. rc_min_quantizer
  726. @item qmax
  727. rc_max_quantizer
  728. @item bufsize, vb
  729. rc_buf_sz
  730. @code{(bufsize * 1000 / vb)}
  731. rc_buf_optimal_sz
  732. @code{(bufsize * 1000 / vb * 5 / 6)}
  733. @item rc_init_occupancy, vb
  734. rc_buf_initial_sz
  735. @code{(rc_init_occupancy * 1000 / vb)}
  736. @item rc_buffer_aggressivity
  737. rc_undershoot_pct
  738. @item skip_threshold
  739. rc_dropframe_thresh
  740. @item qcomp
  741. rc_2pass_vbr_bias_pct
  742. @item maxrate, vb
  743. rc_2pass_vbr_maxsection_pct
  744. @code{(maxrate * 100 / vb)}
  745. @item minrate, vb
  746. rc_2pass_vbr_minsection_pct
  747. @code{(minrate * 100 / vb)}
  748. @item minrate, maxrate, vb
  749. @code{VPX_CBR}
  750. @code{(minrate == maxrate == vb)}
  751. @item crf
  752. @code{VPX_CQ}, @code{VP8E_SET_CQ_LEVEL}
  753. @item quality
  754. @table @option
  755. @item @var{best}
  756. @code{VPX_DL_BEST_QUALITY}
  757. @item @var{good}
  758. @code{VPX_DL_GOOD_QUALITY}
  759. @item @var{realtime}
  760. @code{VPX_DL_REALTIME}
  761. @end table
  762. @item speed
  763. @code{VP8E_SET_CPUUSED}
  764. @item nr
  765. @code{VP8E_SET_NOISE_SENSITIVITY}
  766. @item mb_threshold
  767. @code{VP8E_SET_STATIC_THRESHOLD}
  768. @item slices
  769. @code{VP8E_SET_TOKEN_PARTITIONS}
  770. @item max-intra-rate
  771. @code{VP8E_SET_MAX_INTRA_BITRATE_PCT}
  772. @item force_key_frames
  773. @code{VPX_EFLAG_FORCE_KF}
  774. @item Alternate reference frame related
  775. @table @option
  776. @item vp8flags altref
  777. @code{VP8E_SET_ENABLEAUTOALTREF}
  778. @item @var{arnr_max_frames}
  779. @code{VP8E_SET_ARNR_MAXFRAMES}
  780. @item @var{arnr_type}
  781. @code{VP8E_SET_ARNR_TYPE}
  782. @item @var{arnr_strength}
  783. @code{VP8E_SET_ARNR_STRENGTH}
  784. @item @var{rc_lookahead}
  785. g_lag_in_frames
  786. @end table
  787. @item vp8flags error_resilient
  788. g_error_resilient
  789. @end table
  790. For more information about libvpx see:
  791. @url{http://www.webmproject.org/}
  792. @section libx264
  793. x264 H.264/MPEG-4 AVC encoder wrapper.
  794. This encoder requires the presence of the libx264 headers and library
  795. during configuration. You need to explicitly configure the build with
  796. @code{--enable-libx264}.
  797. libx264 supports an impressive number of features, including 8x8 and
  798. 4x4 adaptive spatial transform, adaptive B-frame placement, CAVLC/CABAC
  799. entropy coding, interlacing (MBAFF), lossless mode, psy optimizations
  800. for detail retention (adaptive quantization, psy-RD, psy-trellis).
  801. Many libx264 encoder options are mapped to FFmpeg global codec
  802. options, while unique encoder options are provided through private
  803. options. Additionally the @option{x264opts} and @option{x264-params}
  804. private options allows to pass a list of key=value tuples as accepted
  805. by the libx264 @code{x264_param_parse} function.
  806. The x264 project website is at
  807. @url{http://www.videolan.org/developers/x264.html}.
  808. @subsection Options
  809. The following options are supported by the libx264 wrapper. The
  810. @command{x264}-equivalent options or values are listed in parentheses
  811. for easy migration.
  812. To reduce the duplication of documentation, only the private options
  813. and some others requiring special attention are documented here. For
  814. the documentation of the undocumented generic options, see
  815. @ref{codec-options,,the Codec Options chapter}.
  816. To get a more accurate and extensive documentation of the libx264
  817. options, invoke the command @command{x264 --full-help} or consult
  818. the libx264 documentation.
  819. @table @option
  820. @item b (@emph{bitrate})
  821. Set bitrate in bits/s. Note that FFmpeg's @option{b} option is
  822. expressed in bits/s, while @command{x264}'s @option{bitrate} is in
  823. kilobits/s.
  824. @item bf (@emph{bframes})
  825. @item g (@emph{keyint})
  826. @item qmax (@emph{qpmax})
  827. @item qmin (@emph{qpmin})
  828. @item qdiff (@emph{qpstep})
  829. @item qblur (@emph{qblur})
  830. @item qcomp (@emph{qcomp})
  831. @item refs (@emph{ref})
  832. @item sc_threshold (@emph{scenecut})
  833. @item trellis (@emph{trellis})
  834. @item nr (@emph{nr})
  835. @item me_range (@emph{merange})
  836. @item me_method (@emph{me})
  837. Set motion estimation method. Possible values in the decreasing order
  838. of speed:
  839. @table @samp
  840. @item dia (@emph{dia})
  841. @item epzs (@emph{dia})
  842. Diamond search with radius 1 (fastest). @samp{epzs} is an alias for
  843. @samp{dia}.
  844. @item hex (@emph{hex})
  845. Hexagonal search with radius 2.
  846. @item umh (@emph{umh})
  847. Uneven multi-hexagon search.
  848. @item esa (@emph{esa})
  849. Exhaustive search.
  850. @item tesa (@emph{tesa})
  851. Hadamard exhaustive search (slowest).
  852. @end table
  853. @item subq (@emph{subme})
  854. @item b_strategy (@emph{b-adapt})
  855. @item keyint_min (@emph{min-keyint})
  856. @item coder
  857. Set entropy encoder. Possible values:
  858. @table @samp
  859. @item ac
  860. Enable CABAC.
  861. @item vlc
  862. Enable CAVLC and disable CABAC. It generates the same effect as
  863. @command{x264}'s @option{--no-cabac} option.
  864. @end table
  865. @item cmp
  866. Set full pixel motion estimation comparation algorithm. Possible values:
  867. @table @samp
  868. @item chroma
  869. Enable chroma in motion estimation.
  870. @item sad
  871. Ignore chroma in motion estimation. It generates the same effect as
  872. @command{x264}'s @option{--no-chroma-me} option.
  873. @end table
  874. @item threads (@emph{threads})
  875. @item thread_type
  876. Set multithreading technique. Possible values:
  877. @table @samp
  878. @item slice
  879. Slice-based multithreading. It generates the same effect as
  880. @command{x264}'s @option{--sliced-threads} option.
  881. @item frame
  882. Frame-based multithreading.
  883. @end table
  884. @item flags
  885. Set encoding flags. It can be used to disable closed GOP and enable
  886. open GOP by setting it to @code{-cgop}. The result is similar to
  887. the behavior of @command{x264}'s @option{--open-gop} option.
  888. @item rc_init_occupancy (@emph{vbv-init})
  889. @item preset (@emph{preset})
  890. Set the encoding preset.
  891. @item tune (@emph{tune})
  892. Set tuning of the encoding params.
  893. @item profile (@emph{profile})
  894. Set profile restrictions.
  895. @item fastfirstpass
  896. Enable fast settings when encoding first pass, when set to 1. When set
  897. to 0, it has the same effect of @command{x264}'s
  898. @option{--slow-firstpass} option.
  899. @item crf (@emph{crf})
  900. Set the quality for constant quality mode.
  901. @item crf_max (@emph{crf-max})
  902. In CRF mode, prevents VBV from lowering quality beyond this point.
  903. @item qp (@emph{qp})
  904. Set constant quantization rate control method parameter.
  905. @item aq-mode (@emph{aq-mode})
  906. Set AQ method. Possible values:
  907. @table @samp
  908. @item none (@emph{0})
  909. Disabled.
  910. @item variance (@emph{1})
  911. Variance AQ (complexity mask).
  912. @item autovariance (@emph{2})
  913. Auto-variance AQ (experimental).
  914. @end table
  915. @item aq-strength (@emph{aq-strength})
  916. Set AQ strength, reduce blocking and blurring in flat and textured areas.
  917. @item psy
  918. Use psychovisual optimizations when set to 1. When set to 0, it has the
  919. same effect as @command{x264}'s @option{--no-psy} option.
  920. @item psy-rd (@emph{psy-rd})
  921. Set strength of psychovisual optimization, in
  922. @var{psy-rd}:@var{psy-trellis} format.
  923. @item rc-lookahead (@emph{rc-lookahead})
  924. Set number of frames to look ahead for frametype and ratecontrol.
  925. @item weightb
  926. Enable weighted prediction for B-frames when set to 1. When set to 0,
  927. it has the same effect as @command{x264}'s @option{--no-weightb} option.
  928. @item weightp (@emph{weightp})
  929. Set weighted prediction method for P-frames. Possible values:
  930. @table @samp
  931. @item none (@emph{0})
  932. Disabled
  933. @item simple (@emph{1})
  934. Enable only weighted refs
  935. @item smart (@emph{2})
  936. Enable both weighted refs and duplicates
  937. @end table
  938. @item ssim (@emph{ssim})
  939. Enable calculation and printing SSIM stats after the encoding.
  940. @item intra-refresh (@emph{intra-refresh})
  941. Enable the use of Periodic Intra Refresh instead of IDR frames when set
  942. to 1.
  943. @item bluray-compat (@emph{bluray-compat})
  944. Configure the encoder to be compatible with the bluray standard.
  945. It is a shorthand for setting "bluray-compat=1 force-cfr=1".
  946. @item b-bias (@emph{b-bias})
  947. Set the influence on how often B-frames are used.
  948. @item b-pyramid (@emph{b-pyramid})
  949. Set method for keeping of some B-frames as references. Possible values:
  950. @table @samp
  951. @item none (@emph{none})
  952. Disabled.
  953. @item strict (@emph{strict})
  954. Strictly hierarchical pyramid.
  955. @item normal (@emph{normal})
  956. Non-strict (not Blu-ray compatible).
  957. @end table
  958. @item mixed-refs
  959. Enable the use of one reference per partition, as opposed to one
  960. reference per macroblock when set to 1. When set to 0, it has the
  961. same effect as @command{x264}'s @option{--no-mixed-refs} option.
  962. @item 8x8dct
  963. Enable adaptive spatial transform (high profile 8x8 transform)
  964. when set to 1. When set to 0, it has the same effect as
  965. @command{x264}'s @option{--no-8x8dct} option.
  966. @item fast-pskip
  967. Enable early SKIP detection on P-frames when set to 1. When set
  968. to 0, it has the same effect as @command{x264}'s
  969. @option{--no-fast-pskip} option.
  970. @item aud (@emph{aud})
  971. Enable use of access unit delimiters when set to 1.
  972. @item mbtree
  973. Enable use macroblock tree ratecontrol when set to 1. When set
  974. to 0, it has the same effect as @command{x264}'s
  975. @option{--no-mbtree} option.
  976. @item deblock (@emph{deblock})
  977. Set loop filter parameters, in @var{alpha}:@var{beta} form.
  978. @item cplxblur (@emph{cplxblur})
  979. Set fluctuations reduction in QP (before curve compression).
  980. @item partitions (@emph{partitions})
  981. Set partitions to consider as a comma-separated list of. Possible
  982. values in the list:
  983. @table @samp
  984. @item p8x8
  985. 8x8 P-frame partition.
  986. @item p4x4
  987. 4x4 P-frame partition.
  988. @item b8x8
  989. 4x4 B-frame partition.
  990. @item i8x8
  991. 8x8 I-frame partition.
  992. @item i4x4
  993. 4x4 I-frame partition.
  994. (Enabling @samp{p4x4} requires @samp{p8x8} to be enabled. Enabling
  995. @samp{i8x8} requires adaptive spatial transform (@option{8x8dct}
  996. option) to be enabled.)
  997. @item none (@emph{none})
  998. Do not consider any partitions.
  999. @item all (@emph{all})
  1000. Consider every partition.
  1001. @end table
  1002. @item direct-pred (@emph{direct})
  1003. Set direct MV prediction mode. Possible values:
  1004. @table @samp
  1005. @item none (@emph{none})
  1006. Disable MV prediction.
  1007. @item spatial (@emph{spatial})
  1008. Enable spatial predicting.
  1009. @item temporal (@emph{temporal})
  1010. Enable temporal predicting.
  1011. @item auto (@emph{auto})
  1012. Automatically decided.
  1013. @end table
  1014. @item slice-max-size (@emph{slice-max-size})
  1015. Set the limit of the size of each slice in bytes. If not specified
  1016. but RTP payload size (@option{ps}) is specified, that is used.
  1017. @item stats (@emph{stats})
  1018. Set the file name for multi-pass stats.
  1019. @item nal-hrd (@emph{nal-hrd})
  1020. Set signal HRD information (requires @option{vbv-bufsize} to be set).
  1021. Possible values:
  1022. @table @samp
  1023. @item none (@emph{none})
  1024. Disable HRD information signaling.
  1025. @item vbr (@emph{vbr})
  1026. Variable bit rate.
  1027. @item cbr (@emph{cbr})
  1028. Constant bit rate (not allowed in MP4 container).
  1029. @end table
  1030. @item x264opts (N.A.)
  1031. Set any x264 option, see @command{x264 --fullhelp} for a list.
  1032. Argument is a list of @var{key}=@var{value} couples separated by
  1033. ":". In @var{filter} and @var{psy-rd} options that use ":" as a separator
  1034. themselves, use "," instead. They accept it as well since long ago but this
  1035. is kept undocumented for some reason.
  1036. For example to specify libx264 encoding options with @command{ffmpeg}:
  1037. @example
  1038. ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
  1039. @end example
  1040. @item x264-params (N.A.)
  1041. Override the x264 configuration using a :-separated list of key=value
  1042. parameters.
  1043. This option is functionally the same as the @option{x264opts}, but is
  1044. duplicated for compability with the Libav fork.
  1045. For example to specify libx264 encoding options with @command{ffmpeg}:
  1046. @example
  1047. ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
  1048. cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
  1049. no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
  1050. @end example
  1051. @end table
  1052. Encoding ffpresets for common usages are provided so they can be used with the
  1053. general presets system (e.g. passing the @option{pre} option).
  1054. @section libxvid
  1055. Xvid MPEG-4 Part 2 encoder wrapper.
  1056. This encoder requires the presence of the libxvidcore headers and library
  1057. during configuration. You need to explicitly configure the build with
  1058. @code{--enable-libxvid --enable-gpl}.
  1059. The native @code{mpeg4} encoder supports the MPEG-4 Part 2 format, so
  1060. users can encode to this format without this library.
  1061. @subsection Options
  1062. The following options are supported by the libxvid wrapper. Some of
  1063. the following options are listed but are not documented, and
  1064. correspond to shared codec options. See @ref{codec-options,,the Codec
  1065. Options chapter} for their documentation. The other shared options
  1066. which are not listed have no effect for the libxvid encoder.
  1067. @table @option
  1068. @item b
  1069. @item g
  1070. @item qmin
  1071. @item qmax
  1072. @item mpeg_quant
  1073. @item threads
  1074. @item bf
  1075. @item b_qfactor
  1076. @item b_qoffset
  1077. @item flags
  1078. Set specific encoding flags. Possible values:
  1079. @table @samp
  1080. @item mv4
  1081. Use four motion vector by macroblock.
  1082. @item aic
  1083. Enable high quality AC prediction.
  1084. @item gray
  1085. Only encode grayscale.
  1086. @item gmc
  1087. Enable the use of global motion compensation (GMC).
  1088. @item qpel
  1089. Enable quarter-pixel motion compensation.
  1090. @item cgop
  1091. Enable closed GOP.
  1092. @item global_header
  1093. Place global headers in extradata instead of every keyframe.
  1094. @end table
  1095. @item trellis
  1096. @item me_method
  1097. Set motion estimation method. Possible values in decreasing order of
  1098. speed and increasing order of quality:
  1099. @table @samp
  1100. @item zero
  1101. Use no motion estimation (default).
  1102. @item phods
  1103. @item x1
  1104. @item log
  1105. Enable advanced diamond zonal search for 16x16 blocks and half-pixel
  1106. refinement for 16x16 blocks. @samp{x1} and @samp{log} are aliases for
  1107. @samp{phods}.
  1108. @item epzs
  1109. Enable all of the things described above, plus advanced diamond zonal
  1110. search for 8x8 blocks, half-pixel refinement for 8x8 blocks, and motion
  1111. estimation on chroma planes.
  1112. @item full
  1113. Enable all of the things described above, plus extended 16x16 and 8x8
  1114. blocks search.
  1115. @end table
  1116. @item mbd
  1117. Set macroblock decision algorithm. Possible values in the increasing
  1118. order of quality:
  1119. @table @samp
  1120. @item simple
  1121. Use macroblock comparing function algorithm (default).
  1122. @item bits
  1123. Enable rate distortion-based half pixel and quarter pixel refinement for
  1124. 16x16 blocks.
  1125. @item rd
  1126. Enable all of the things described above, plus rate distortion-based
  1127. half pixel and quarter pixel refinement for 8x8 blocks, and rate
  1128. distortion-based search using square pattern.
  1129. @end table
  1130. @item lumi_aq
  1131. Enable lumi masking adaptive quantization when set to 1. Default is 0
  1132. (disabled).
  1133. @item variance_aq
  1134. Enable variance adaptive quantization when set to 1. Default is 0
  1135. (disabled).
  1136. When combined with @option{lumi_aq}, the resulting quality will not
  1137. be better than any of the two specified individually. In other
  1138. words, the resulting quality will be the worse one of the two
  1139. effects.
  1140. @item ssim
  1141. Set structural similarity (SSIM) displaying method. Possible values:
  1142. @table @samp
  1143. @item off
  1144. Disable displaying of SSIM information.
  1145. @item avg
  1146. Output average SSIM at the end of encoding to stdout. The format of
  1147. showing the average SSIM is:
  1148. @example
  1149. Average SSIM: %f
  1150. @end example
  1151. For users who are not familiar with C, %f means a float number, or
  1152. a decimal (e.g. 0.939232).
  1153. @item frame
  1154. Output both per-frame SSIM data during encoding and average SSIM at
  1155. the end of encoding to stdout. The format of per-frame information
  1156. is:
  1157. @example
  1158. SSIM: avg: %1.3f min: %1.3f max: %1.3f
  1159. @end example
  1160. For users who are not familiar with C, %1.3f means a float number
  1161. rounded to 3 digits after the dot (e.g. 0.932).
  1162. @end table
  1163. @item ssim_acc
  1164. Set SSIM accuracy. Valid options are integers within the range of
  1165. 0-4, while 0 gives the most accurate result and 4 computes the
  1166. fastest.
  1167. @end table
  1168. @section png
  1169. PNG image encoder.
  1170. @subsection Private options
  1171. @table @option
  1172. @item dpi @var{integer}
  1173. Set physical density of pixels, in dots per inch, unset by default
  1174. @item dpm @var{integer}
  1175. Set physical density of pixels, in dots per meter, unset by default
  1176. @end table
  1177. @section ProRes
  1178. Apple ProRes encoder.
  1179. FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
  1180. The used encoder can be choosen with the @code{-vcodec} option.
  1181. @subsection Private Options for prores-ks
  1182. @table @option
  1183. @item profile @var{integer}
  1184. Select the ProRes profile to encode
  1185. @table @samp
  1186. @item proxy
  1187. @item lt
  1188. @item standard
  1189. @item hq
  1190. @item 4444
  1191. @end table
  1192. @item quant_mat @var{integer}
  1193. Select quantization matrix.
  1194. @table @samp
  1195. @item auto
  1196. @item default
  1197. @item proxy
  1198. @item lt
  1199. @item standard
  1200. @item hq
  1201. @end table
  1202. If set to @var{auto}, the matrix matching the profile will be picked.
  1203. If not set, the matrix providing the highest quality, @var{default}, will be
  1204. picked.
  1205. @item bits_per_mb @var{integer}
  1206. How many bits to allot for coding one macroblock. Different profiles use
  1207. between 200 and 2400 bits per macroblock, the maximum is 8000.
  1208. @item mbs_per_slice @var{integer}
  1209. Number of macroblocks in each slice (1-8); the default value (8)
  1210. should be good in almost all situations.
  1211. @item vendor @var{string}
  1212. Override the 4-byte vendor ID.
  1213. A custom vendor ID like @var{apl0} would claim the stream was produced by
  1214. the Apple encoder.
  1215. @item alpha_bits @var{integer}
  1216. Specify number of bits for alpha component.
  1217. Possible values are @var{0}, @var{8} and @var{16}.
  1218. Use @var{0} to disable alpha plane coding.
  1219. @end table
  1220. @subsection Speed considerations
  1221. In the default mode of operation the encoder has to honor frame constraints
  1222. (i.e. not produc frames with size bigger than requested) while still making
  1223. output picture as good as possible.
  1224. A frame containing a lot of small details is harder to compress and the encoder
  1225. would spend more time searching for appropriate quantizers for each slice.
  1226. Setting a higher @option{bits_per_mb} limit will improve the speed.
  1227. For the fastest encoding speed set the @option{qscale} parameter (4 is the
  1228. recommended value) and do not set a size constraint.
  1229. @c man end VIDEO ENCODERS