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.

1561 lines
42KB

  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 libwavpack
  616. A wrapper providing WavPack encoding through libwavpack.
  617. Only lossless mode using 32-bit integer samples is supported currently.
  618. The @option{compression_level} option can be used to control speed vs.
  619. compression tradeoff, with the values mapped to libwavpack as follows:
  620. @table @option
  621. @item 0
  622. Fast mode - corresponding to the wavpack @option{-f} option.
  623. @item 1
  624. Normal (default) settings.
  625. @item 2
  626. High quality - corresponding to the wavpack @option{-h} option.
  627. @item 3
  628. Very high quality - corresponding to the wavpack @option{-hh} option.
  629. @item 4-8
  630. Same as 3, but with extra processing enabled - corresponding to the wavpack
  631. @option{-x} option. I.e. 4 is the same as @option{-x2} and 8 is the same as
  632. @option{-x6}.
  633. @end table
  634. @c man end AUDIO ENCODERS
  635. @chapter Video Encoders
  636. @c man begin VIDEO ENCODERS
  637. A description of some of the currently available video encoders
  638. follows.
  639. @section libtheora
  640. Theora format supported through libtheora.
  641. Requires the presence of the libtheora headers and library during
  642. configuration. You need to explicitly configure the build with
  643. @code{--enable-libtheora}.
  644. @subsection Options
  645. The following global options are mapped to internal libtheora options
  646. which affect the quality and the bitrate of the encoded stream.
  647. @table @option
  648. @item b
  649. Set the video bitrate, only works if the @code{qscale} flag in
  650. @option{flags} is not enabled.
  651. @item flags
  652. Used to enable constant quality mode encoding through the
  653. @option{qscale} flag, and to enable the @code{pass1} and @code{pass2}
  654. modes.
  655. @item g
  656. Set the GOP size.
  657. @item global_quality
  658. Set the global quality in lambda units, only works if the
  659. @code{qscale} flag in @option{flags} is enabled. The value is clipped
  660. in the [0 - 10*@code{FF_QP2LAMBDA}] range, and then multiplied for 6.3
  661. to get a value in the native libtheora range [0-63]. A higher value
  662. corresponds to a higher quality.
  663. For example, to set maximum constant quality encoding with
  664. @command{ffmpeg}:
  665. @example
  666. ffmpeg -i INPUT -flags:v qscale -global_quality:v "10*QP2LAMBDA" -codec:v libtheora OUTPUT.ogg
  667. @end example
  668. @end table
  669. @section libvpx
  670. VP8 format supported through libvpx.
  671. Requires the presence of the libvpx headers and library during configuration.
  672. You need to explicitly configure the build with @code{--enable-libvpx}.
  673. @subsection Options
  674. Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
  675. @table @option
  676. @item threads
  677. g_threads
  678. @item profile
  679. g_profile
  680. @item vb
  681. rc_target_bitrate
  682. @item g
  683. kf_max_dist
  684. @item keyint_min
  685. kf_min_dist
  686. @item qmin
  687. rc_min_quantizer
  688. @item qmax
  689. rc_max_quantizer
  690. @item bufsize, vb
  691. rc_buf_sz
  692. @code{(bufsize * 1000 / vb)}
  693. rc_buf_optimal_sz
  694. @code{(bufsize * 1000 / vb * 5 / 6)}
  695. @item rc_init_occupancy, vb
  696. rc_buf_initial_sz
  697. @code{(rc_init_occupancy * 1000 / vb)}
  698. @item rc_buffer_aggressivity
  699. rc_undershoot_pct
  700. @item skip_threshold
  701. rc_dropframe_thresh
  702. @item qcomp
  703. rc_2pass_vbr_bias_pct
  704. @item maxrate, vb
  705. rc_2pass_vbr_maxsection_pct
  706. @code{(maxrate * 100 / vb)}
  707. @item minrate, vb
  708. rc_2pass_vbr_minsection_pct
  709. @code{(minrate * 100 / vb)}
  710. @item minrate, maxrate, vb
  711. @code{VPX_CBR}
  712. @code{(minrate == maxrate == vb)}
  713. @item crf
  714. @code{VPX_CQ}, @code{VP8E_SET_CQ_LEVEL}
  715. @item quality
  716. @table @option
  717. @item @var{best}
  718. @code{VPX_DL_BEST_QUALITY}
  719. @item @var{good}
  720. @code{VPX_DL_GOOD_QUALITY}
  721. @item @var{realtime}
  722. @code{VPX_DL_REALTIME}
  723. @end table
  724. @item speed
  725. @code{VP8E_SET_CPUUSED}
  726. @item nr
  727. @code{VP8E_SET_NOISE_SENSITIVITY}
  728. @item mb_threshold
  729. @code{VP8E_SET_STATIC_THRESHOLD}
  730. @item slices
  731. @code{VP8E_SET_TOKEN_PARTITIONS}
  732. @item max-intra-rate
  733. @code{VP8E_SET_MAX_INTRA_BITRATE_PCT}
  734. @item force_key_frames
  735. @code{VPX_EFLAG_FORCE_KF}
  736. @item Alternate reference frame related
  737. @table @option
  738. @item vp8flags altref
  739. @code{VP8E_SET_ENABLEAUTOALTREF}
  740. @item @var{arnr_max_frames}
  741. @code{VP8E_SET_ARNR_MAXFRAMES}
  742. @item @var{arnr_type}
  743. @code{VP8E_SET_ARNR_TYPE}
  744. @item @var{arnr_strength}
  745. @code{VP8E_SET_ARNR_STRENGTH}
  746. @item @var{rc_lookahead}
  747. g_lag_in_frames
  748. @end table
  749. @item vp8flags error_resilient
  750. g_error_resilient
  751. @end table
  752. For more information about libvpx see:
  753. @url{http://www.webmproject.org/}
  754. @section libx264
  755. x264 H.264/MPEG-4 AVC encoder wrapper.
  756. This encoder requires the presence of the libx264 headers and library
  757. during configuration. You need to explicitly configure the build with
  758. @code{--enable-libx264}.
  759. libx264 supports an impressive number of features, including 8x8 and
  760. 4x4 adaptive spatial transform, adaptive B-frame placement, CAVLC/CABAC
  761. entropy coding, interlacing (MBAFF), lossless mode, psy optimizations
  762. for detail retention (adaptive quantization, psy-RD, psy-trellis).
  763. Many libx264 encoder options are mapped to FFmpeg global codec
  764. options, while unique encoder options are provided through private
  765. options. Additionally the @option{x264opts} and @option{x264-params}
  766. private options allows to pass a list of key=value tuples as accepted
  767. by the libx264 @code{x264_param_parse} function.
  768. The x264 project website is at
  769. @url{http://www.videolan.org/developers/x264.html}.
  770. @subsection Options
  771. The following options are supported by the libx264 wrapper. The
  772. @command{x264}-equivalent options or values are listed in parentheses
  773. for easy migration.
  774. To reduce the duplication of documentation, only the private options
  775. and some others requiring special attention are documented here. For
  776. the documentation of the undocumented generic options, see
  777. @ref{codec-options,,the Codec Options chapter}.
  778. To get a more accurate and extensive documentation of the libx264
  779. options, invoke the command @command{x264 --full-help} or consult
  780. the libx264 documentation.
  781. @table @option
  782. @item b (@emph{bitrate})
  783. Set bitrate in bits/s. Note that FFmpeg's @option{b} option is
  784. expressed in bits/s, while @command{x264}'s @option{bitrate} is in
  785. kilobits/s.
  786. @item bf (@emph{bframes})
  787. @item g (@emph{keyint})
  788. @item qmax (@emph{qpmax})
  789. @item qmin (@emph{qpmin})
  790. @item qdiff (@emph{qpstep})
  791. @item qblur (@emph{qblur})
  792. @item qcomp (@emph{qcomp})
  793. @item refs (@emph{ref})
  794. @item sc_threshold (@emph{scenecut})
  795. @item trellis (@emph{trellis})
  796. @item nr (@emph{nr})
  797. @item me_range (@emph{merange})
  798. @item me_method (@emph{me})
  799. Set motion estimation method. Possible values in the decreasing order
  800. of speed:
  801. @table @samp
  802. @item dia (@emph{dia})
  803. @item epzs (@emph{dia})
  804. Diamond search with radius 1 (fastest). @samp{epzs} is an alias for
  805. @samp{dia}.
  806. @item hex (@emph{hex})
  807. Hexagonal search with radius 2.
  808. @item umh (@emph{umh})
  809. Uneven multi-hexagon search.
  810. @item esa (@emph{esa})
  811. Exhaustive search.
  812. @item tesa (@emph{tesa})
  813. Hadamard exhaustive search (slowest).
  814. @end table
  815. @item subq (@emph{subme})
  816. @item b_strategy (@emph{b-adapt})
  817. @item keyint_min (@emph{min-keyint})
  818. @item coder
  819. Set entropy encoder. Possible values:
  820. @table @samp
  821. @item ac
  822. Enable CABAC.
  823. @item vlc
  824. Enable CAVLC and disable CABAC. It generates the same effect as
  825. @command{x264}'s @option{--no-cabac} option.
  826. @end table
  827. @item cmp
  828. Set full pixel motion estimation comparation algorithm. Possible values:
  829. @table @samp
  830. @item chroma
  831. Enable chroma in motion estimation.
  832. @item sad
  833. Ignore chroma in motion estimation. It generates the same effect as
  834. @command{x264}'s @option{--no-chroma-me} option.
  835. @end table
  836. @item threads (@emph{threads})
  837. @item thread_type
  838. Set multithreading technique. Possible values:
  839. @table @samp
  840. @item slice
  841. Slice-based multithreading. It generates the same effect as
  842. @command{x264}'s @option{--sliced-threads} option.
  843. @item frame
  844. Frame-based multithreading.
  845. @end table
  846. @item flags
  847. Set encoding flags. It can be used to disable closed GOP and enable
  848. open GOP by setting it to @code{-cgop}. The result is similar to
  849. the behavior of @command{x264}'s @option{--open-gop} option.
  850. @item rc_init_occupancy (@emph{vbv-init})
  851. @item preset (@emph{preset})
  852. Set the encoding preset.
  853. @item tune (@emph{tune})
  854. Set tuning of the encoding params.
  855. @item profile (@emph{profile})
  856. Set profile restrictions.
  857. @item fastfirstpass
  858. Enable fast settings when encoding first pass, when set to 1. When set
  859. to 0, it has the same effect of @command{x264}'s
  860. @option{--slow-firstpass} option.
  861. @item crf (@emph{crf})
  862. Set the quality for constant quality mode.
  863. @item crf_max (@emph{crf-max})
  864. In CRF mode, prevents VBV from lowering quality beyond this point.
  865. @item qp (@emph{qp})
  866. Set constant quantization rate control method parameter.
  867. @item aq-mode (@emph{aq-mode})
  868. Set AQ method. Possible values:
  869. @table @samp
  870. @item none (@emph{0})
  871. Disabled.
  872. @item variance (@emph{1})
  873. Variance AQ (complexity mask).
  874. @item autovariance (@emph{2})
  875. Auto-variance AQ (experimental).
  876. @end table
  877. @item aq-strength (@emph{aq-strength})
  878. Set AQ strength, reduce blocking and blurring in flat and textured areas.
  879. @item psy
  880. Use psychovisual optimizations when set to 1. When set to 0, it has the
  881. same effect as @command{x264}'s @option{--no-psy} option.
  882. @item psy-rd (@emph{psy-rd})
  883. Set strength of psychovisual optimization, in
  884. @var{psy-rd}:@var{psy-trellis} format.
  885. @item rc-lookahead (@emph{rc-lookahead})
  886. Set number of frames to look ahead for frametype and ratecontrol.
  887. @item weightb
  888. Enable weighted prediction for B-frames when set to 1. When set to 0,
  889. it has the same effect as @command{x264}'s @option{--no-weightb} option.
  890. @item weightp (@emph{weightp})
  891. Set weighted prediction method for P-frames. Possible values:
  892. @table @samp
  893. @item none (@emph{0})
  894. Disabled
  895. @item simple (@emph{1})
  896. Enable only weighted refs
  897. @item smart (@emph{2})
  898. Enable both weighted refs and duplicates
  899. @end table
  900. @item ssim (@emph{ssim})
  901. Enable calculation and printing SSIM stats after the encoding.
  902. @item intra-refresh (@emph{intra-refresh})
  903. Enable the use of Periodic Intra Refresh instead of IDR frames when set
  904. to 1.
  905. @item bluray-compat (@emph{bluray-compat})
  906. Configure the encoder to be compatible with the bluray standard.
  907. It is a shorthand for setting "bluray-compat=1 force-cfr=1".
  908. @item b-bias (@emph{b-bias})
  909. Set the influence on how often B-frames are used.
  910. @item b-pyramid (@emph{b-pyramid})
  911. Set method for keeping of some B-frames as references. Possible values:
  912. @table @samp
  913. @item none (@emph{none})
  914. Disabled.
  915. @item strict (@emph{strict})
  916. Strictly hierarchical pyramid.
  917. @item normal (@emph{normal})
  918. Non-strict (not Blu-ray compatible).
  919. @end table
  920. @item mixed-refs
  921. Enable the use of one reference per partition, as opposed to one
  922. reference per macroblock when set to 1. When set to 0, it has the
  923. same effect as @command{x264}'s @option{--no-mixed-refs} option.
  924. @item 8x8dct
  925. Enable adaptive spatial transform (high profile 8x8 transform)
  926. when set to 1. When set to 0, it has the same effect as
  927. @command{x264}'s @option{--no-8x8dct} option.
  928. @item fast-pskip
  929. Enable early SKIP detection on P-frames when set to 1. When set
  930. to 0, it has the same effect as @command{x264}'s
  931. @option{--no-fast-pskip} option.
  932. @item aud (@emph{aud})
  933. Enable use of access unit delimiters when set to 1.
  934. @item mbtree
  935. Enable use macroblock tree ratecontrol when set to 1. When set
  936. to 0, it has the same effect as @command{x264}'s
  937. @option{--no-mbtree} option.
  938. @item deblock (@emph{deblock})
  939. Set loop filter parameters, in @var{alpha}:@var{beta} form.
  940. @item cplxblur (@emph{cplxblur})
  941. Set fluctuations reduction in QP (before curve compression).
  942. @item partitions (@emph{partitions})
  943. Set partitions to consider as a comma-separated list of. Possible
  944. values in the list:
  945. @table @samp
  946. @item p8x8
  947. 8x8 P-frame partition.
  948. @item p4x4
  949. 4x4 P-frame partition.
  950. @item b8x8
  951. 4x4 B-frame partition.
  952. @item i8x8
  953. 8x8 I-frame partition.
  954. @item i4x4
  955. 4x4 I-frame partition.
  956. (Enabling @samp{p4x4} requires @samp{p8x8} to be enabled. Enabling
  957. @samp{i8x8} requires adaptive spatial transform (@option{8x8dct}
  958. option) to be enabled.)
  959. @item none (@emph{none})
  960. Do not consider any partitions.
  961. @item all (@emph{all})
  962. Consider every partition.
  963. @end table
  964. @item direct-pred (@emph{direct})
  965. Set direct MV prediction mode. Possible values:
  966. @table @samp
  967. @item none (@emph{none})
  968. Disable MV prediction.
  969. @item spatial (@emph{spatial})
  970. Enable spatial predicting.
  971. @item temporal (@emph{temporal})
  972. Enable temporal predicting.
  973. @item auto (@emph{auto})
  974. Automatically decided.
  975. @end table
  976. @item slice-max-size (@emph{slice-max-size})
  977. Set the limit of the size of each slice in bytes. If not specified
  978. but RTP payload size (@option{ps}) is specified, that is used.
  979. @item stats (@emph{stats})
  980. Set the file name for multi-pass stats.
  981. @item nal-hrd (@emph{nal-hrd})
  982. Set signal HRD information (requires @option{vbv-bufsize} to be set).
  983. Possible values:
  984. @table @samp
  985. @item none (@emph{none})
  986. Disable HRD information signaling.
  987. @item vbr (@emph{vbr})
  988. Variable bit rate.
  989. @item cbr (@emph{cbr})
  990. Constant bit rate (not allowed in MP4 container).
  991. @end table
  992. @item x264opts (N.A.)
  993. Set any x264 option, see @command{x264 --fullhelp} for a list.
  994. Argument is a list of @var{key}=@var{value} couples separated by
  995. ":". In @var{filter} and @var{psy-rd} options that use ":" as a separator
  996. themselves, use "," instead. They accept it as well since long ago but this
  997. is kept undocumented for some reason.
  998. For example to specify libx264 encoding options with @command{ffmpeg}:
  999. @example
  1000. ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
  1001. @end example
  1002. @item x264-params (N.A.)
  1003. Override the x264 configuration using a :-separated list of key=value
  1004. parameters.
  1005. This option is functionally the same as the @option{x264opts}, but is
  1006. duplicated for compability with the Libav fork.
  1007. For example to specify libx264 encoding options with @command{ffmpeg}:
  1008. @example
  1009. ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
  1010. cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
  1011. no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
  1012. @end example
  1013. @end table
  1014. Encoding ffpresets for common usages are provided so they can be used with the
  1015. general presets system (e.g. passing the @option{pre} option).
  1016. @section libxvid
  1017. Xvid MPEG-4 Part 2 encoder wrapper.
  1018. This encoder requires the presence of the libxvidcore headers and library
  1019. during configuration. You need to explicitly configure the build with
  1020. @code{--enable-libxvid --enable-gpl}.
  1021. The native @code{mpeg4} encoder supports the MPEG-4 Part 2 format, so
  1022. users can encode to this format without this library.
  1023. @subsection Options
  1024. The following options are supported by the libxvid wrapper. Some of
  1025. the following options are listed but are not documented, and
  1026. correspond to shared codec options. See @ref{codec-options,,the Codec
  1027. Options chapter} for their documentation. The other shared options
  1028. which are not listed have no effect for the libxvid encoder.
  1029. @table @option
  1030. @item b
  1031. @item g
  1032. @item qmin
  1033. @item qmax
  1034. @item mpeg_quant
  1035. @item threads
  1036. @item bf
  1037. @item b_qfactor
  1038. @item b_qoffset
  1039. @item flags
  1040. Set specific encoding flags. Possible values:
  1041. @table @samp
  1042. @item mv4
  1043. Use four motion vector by macroblock.
  1044. @item aic
  1045. Enable high quality AC prediction.
  1046. @item gray
  1047. Only encode grayscale.
  1048. @item gmc
  1049. Enable the use of global motion compensation (GMC).
  1050. @item qpel
  1051. Enable quarter-pixel motion compensation.
  1052. @item cgop
  1053. Enable closed GOP.
  1054. @item global_header
  1055. Place global headers in extradata instead of every keyframe.
  1056. @end table
  1057. @item trellis
  1058. @item me_method
  1059. Set motion estimation method. Possible values in decreasing order of
  1060. speed and increasing order of quality:
  1061. @table @samp
  1062. @item zero
  1063. Use no motion estimation (default).
  1064. @item phods
  1065. @item x1
  1066. @item log
  1067. Enable advanced diamond zonal search for 16x16 blocks and half-pixel
  1068. refinement for 16x16 blocks. @samp{x1} and @samp{log} are aliases for
  1069. @samp{phods}.
  1070. @item epzs
  1071. Enable all of the things described above, plus advanced diamond zonal
  1072. search for 8x8 blocks, half-pixel refinement for 8x8 blocks, and motion
  1073. estimation on chroma planes.
  1074. @item full
  1075. Enable all of the things described above, plus extended 16x16 and 8x8
  1076. blocks search.
  1077. @end table
  1078. @item mbd
  1079. Set macroblock decision algorithm. Possible values in the increasing
  1080. order of quality:
  1081. @table @samp
  1082. @item simple
  1083. Use macroblock comparing function algorithm (default).
  1084. @item bits
  1085. Enable rate distortion-based half pixel and quarter pixel refinement for
  1086. 16x16 blocks.
  1087. @item rd
  1088. Enable all of the things described above, plus rate distortion-based
  1089. half pixel and quarter pixel refinement for 8x8 blocks, and rate
  1090. distortion-based search using square pattern.
  1091. @end table
  1092. @item lumi_aq
  1093. Enable lumi masking adaptive quantization when set to 1. Default is 0
  1094. (disabled).
  1095. @item variance_aq
  1096. Enable variance adaptive quantization when set to 1. Default is 0
  1097. (disabled).
  1098. When combined with @option{lumi_aq}, the resulting quality will not
  1099. be better than any of the two specified individually. In other
  1100. words, the resulting quality will be the worse one of the two
  1101. effects.
  1102. @item ssim
  1103. Set structural similarity (SSIM) displaying method. Possible values:
  1104. @table @samp
  1105. @item off
  1106. Disable displaying of SSIM information.
  1107. @item avg
  1108. Output average SSIM at the end of encoding to stdout. The format of
  1109. showing the average SSIM is:
  1110. @example
  1111. Average SSIM: %f
  1112. @end example
  1113. For users who are not familiar with C, %f means a float number, or
  1114. a decimal (e.g. 0.939232).
  1115. @item frame
  1116. Output both per-frame SSIM data during encoding and average SSIM at
  1117. the end of encoding to stdout. The format of per-frame information
  1118. is:
  1119. @example
  1120. SSIM: avg: %1.3f min: %1.3f max: %1.3f
  1121. @end example
  1122. For users who are not familiar with C, %1.3f means a float number
  1123. rounded to 3 digits after the dot (e.g. 0.932).
  1124. @end table
  1125. @item ssim_acc
  1126. Set SSIM accuracy. Valid options are integers within the range of
  1127. 0-4, while 0 gives the most accurate result and 4 computes the
  1128. fastest.
  1129. @end table
  1130. @section png
  1131. PNG image encoder.
  1132. @subsection Private options
  1133. @table @option
  1134. @item dpi @var{integer}
  1135. Set physical density of pixels, in dots per inch, unset by default
  1136. @item dpm @var{integer}
  1137. Set physical density of pixels, in dots per meter, unset by default
  1138. @end table
  1139. @section ProRes
  1140. Apple ProRes encoder.
  1141. FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
  1142. The used encoder can be choosen with the @code{-vcodec} option.
  1143. @subsection Private Options for prores-ks
  1144. @table @option
  1145. @item profile @var{integer}
  1146. Select the ProRes profile to encode
  1147. @table @samp
  1148. @item proxy
  1149. @item lt
  1150. @item standard
  1151. @item hq
  1152. @item 4444
  1153. @end table
  1154. @item quant_mat @var{integer}
  1155. Select quantization matrix.
  1156. @table @samp
  1157. @item auto
  1158. @item default
  1159. @item proxy
  1160. @item lt
  1161. @item standard
  1162. @item hq
  1163. @end table
  1164. If set to @var{auto}, the matrix matching the profile will be picked.
  1165. If not set, the matrix providing the highest quality, @var{default}, will be
  1166. picked.
  1167. @item bits_per_mb @var{integer}
  1168. How many bits to allot for coding one macroblock. Different profiles use
  1169. between 200 and 2400 bits per macroblock, the maximum is 8000.
  1170. @item mbs_per_slice @var{integer}
  1171. Number of macroblocks in each slice (1-8); the default value (8)
  1172. should be good in almost all situations.
  1173. @item vendor @var{string}
  1174. Override the 4-byte vendor ID.
  1175. A custom vendor ID like @var{apl0} would claim the stream was produced by
  1176. the Apple encoder.
  1177. @item alpha_bits @var{integer}
  1178. Specify number of bits for alpha component.
  1179. Possible values are @var{0}, @var{8} and @var{16}.
  1180. Use @var{0} to disable alpha plane coding.
  1181. @end table
  1182. @subsection Speed considerations
  1183. In the default mode of operation the encoder has to honor frame constraints
  1184. (i.e. not produc frames with size bigger than requested) while still making
  1185. output picture as good as possible.
  1186. A frame containing a lot of small details is harder to compress and the encoder
  1187. would spend more time searching for appropriate quantizers for each slice.
  1188. Setting a higher @option{bits_per_mb} limit will improve the speed.
  1189. For the fastest encoding speed set the @option{qscale} parameter (4 is the
  1190. recommended value) and do not set a size constraint.
  1191. @c man end VIDEO ENCODERS