encoders.texi 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825
  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. @section ac3 and ac3_fixed
  21. AC-3 audio encoders.
  22. These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as
  23. the undocumented RealAudio 3 (a.k.a. dnet).
  24. The @var{ac3} encoder uses floating-point math, while the @var{ac3_fixed}
  25. encoder only uses fixed-point integer math. This does not mean that one is
  26. always faster, just that one or the other may be better suited to a
  27. particular system. The floating-point encoder will generally produce better
  28. quality audio for a given bitrate. The @var{ac3_fixed} encoder is not the
  29. default codec for any of the output formats, so it must be specified explicitly
  30. using the option @code{-acodec ac3_fixed} in order to use it.
  31. @subsection AC-3 Metadata
  32. The AC-3 metadata options are used to set parameters that describe the audio,
  33. but in most cases do not affect the audio encoding itself. Some of the options
  34. do directly affect or influence the decoding and playback of the resulting
  35. bitstream, while others are just for informational purposes. A few of the
  36. options will add bits to the output stream that could otherwise be used for
  37. audio data, and will thus affect the quality of the output. Those will be
  38. indicated accordingly with a note in the option list below.
  39. These parameters are described in detail in several publicly-available
  40. documents.
  41. @itemize
  42. @item @uref{http://www.atsc.org/cms/standards/a_52-2010.pdf,A/52:2010 - Digital Audio Compression (AC-3) (E-AC-3) Standard}
  43. @item @uref{http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf,A/54 - Guide to the Use of the ATSC Digital Television Standard}
  44. @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf,Dolby Metadata Guide}
  45. @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf,Dolby Digital Professional Encoding Guidelines}
  46. @end itemize
  47. @subsubsection Metadata Control Options
  48. @table @option
  49. @item -per_frame_metadata @var{boolean}
  50. Allow Per-Frame Metadata. Specifies if the encoder should check for changing
  51. metadata for each frame.
  52. @table @option
  53. @item 0
  54. The metadata values set at initialization will be used for every frame in the
  55. stream. (default)
  56. @item 1
  57. Metadata values can be changed before encoding each frame.
  58. @end table
  59. @end table
  60. @subsubsection Downmix Levels
  61. @table @option
  62. @item -center_mixlev @var{level}
  63. Center Mix Level. The amount of gain the decoder should apply to the center
  64. channel when downmixing to stereo. This field will only be written to the
  65. bitstream if a center channel is present. The value is specified as a scale
  66. factor. There are 3 valid values:
  67. @table @option
  68. @item 0.707
  69. Apply -3dB gain
  70. @item 0.595
  71. Apply -4.5dB gain (default)
  72. @item 0.500
  73. Apply -6dB gain
  74. @end table
  75. @item -surround_mixlev @var{level}
  76. Surround Mix Level. The amount of gain the decoder should apply to the surround
  77. channel(s) when downmixing to stereo. This field will only be written to the
  78. bitstream if one or more surround channels are present. The value is specified
  79. as a scale factor. There are 3 valid values:
  80. @table @option
  81. @item 0.707
  82. Apply -3dB gain
  83. @item 0.500
  84. Apply -6dB gain (default)
  85. @item 0.000
  86. Silence Surround Channel(s)
  87. @end table
  88. @end table
  89. @subsubsection Audio Production Information
  90. Audio Production Information is optional information describing the mixing
  91. environment. Either none or both of the fields are written to the bitstream.
  92. @table @option
  93. @item -mixing_level @var{number}
  94. Mixing Level. Specifies peak sound pressure level (SPL) in the production
  95. environment when the mix was mastered. Valid values are 80 to 111, or -1 for
  96. unknown or not indicated. The default value is -1, but that value cannot be
  97. used if the Audio Production Information is written to the bitstream. Therefore,
  98. if the @code{room_type} option is not the default value, the @code{mixing_level}
  99. option must not be -1.
  100. @item -room_type @var{type}
  101. Room Type. Describes the equalization used during the final mixing session at
  102. the studio or on the dubbing stage. A large room is a dubbing stage with the
  103. industry standard X-curve equalization; a small room has flat equalization.
  104. This field will not be written to the bitstream if both the @code{mixing_level}
  105. option and the @code{room_type} option have the default values.
  106. @table @option
  107. @item 0
  108. @itemx notindicated
  109. Not Indicated (default)
  110. @item 1
  111. @itemx large
  112. Large Room
  113. @item 2
  114. @itemx small
  115. Small Room
  116. @end table
  117. @end table
  118. @subsubsection Other Metadata Options
  119. @table @option
  120. @item -copyright @var{boolean}
  121. Copyright Indicator. Specifies whether a copyright exists for this audio.
  122. @table @option
  123. @item 0
  124. @itemx off
  125. No Copyright Exists (default)
  126. @item 1
  127. @itemx on
  128. Copyright Exists
  129. @end table
  130. @item -dialnorm @var{value}
  131. Dialogue Normalization. Indicates how far the average dialogue level of the
  132. program is below digital 100% full scale (0 dBFS). This parameter determines a
  133. level shift during audio reproduction that sets the average volume of the
  134. dialogue to a preset level. The goal is to match volume level between program
  135. sources. A value of -31dB will result in no volume level change, relative to
  136. the source volume, during audio reproduction. Valid values are whole numbers in
  137. the range -31 to -1, with -31 being the default.
  138. @item -dsur_mode @var{mode}
  139. Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround
  140. (Pro Logic). This field will only be written to the bitstream if the audio
  141. stream is stereo. Using this option does @b{NOT} mean the encoder will actually
  142. apply Dolby Surround processing.
  143. @table @option
  144. @item 0
  145. @itemx notindicated
  146. Not Indicated (default)
  147. @item 1
  148. @itemx off
  149. Not Dolby Surround Encoded
  150. @item 2
  151. @itemx on
  152. Dolby Surround Encoded
  153. @end table
  154. @item -original @var{boolean}
  155. Original Bit Stream Indicator. Specifies whether this audio is from the
  156. original source and not a copy.
  157. @table @option
  158. @item 0
  159. @itemx off
  160. Not Original Source
  161. @item 1
  162. @itemx on
  163. Original Source (default)
  164. @end table
  165. @end table
  166. @subsection Extended Bitstream Information
  167. The extended bitstream options are part of the Alternate Bit Stream Syntax as
  168. specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.
  169. If any one parameter in a group is specified, all values in that group will be
  170. written to the bitstream. Default values are used for those that are written
  171. but have not been specified. If the mixing levels are written, the decoder
  172. will use these values instead of the ones specified in the @code{center_mixlev}
  173. and @code{surround_mixlev} options if it supports the Alternate Bit Stream
  174. Syntax.
  175. @subsubsection Extended Bitstream Information - Part 1
  176. @table @option
  177. @item -dmix_mode @var{mode}
  178. Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt
  179. (Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.
  180. @table @option
  181. @item 0
  182. @itemx notindicated
  183. Not Indicated (default)
  184. @item 1
  185. @itemx ltrt
  186. Lt/Rt Downmix Preferred
  187. @item 2
  188. @itemx loro
  189. Lo/Ro Downmix Preferred
  190. @end table
  191. @item -ltrt_cmixlev @var{level}
  192. Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the
  193. center channel when downmixing to stereo in Lt/Rt mode.
  194. @table @option
  195. @item 1.414
  196. Apply +3dB gain
  197. @item 1.189
  198. Apply +1.5dB gain
  199. @item 1.000
  200. Apply 0dB gain
  201. @item 0.841
  202. Apply -1.5dB gain
  203. @item 0.707
  204. Apply -3.0dB gain
  205. @item 0.595
  206. Apply -4.5dB gain (default)
  207. @item 0.500
  208. Apply -6.0dB gain
  209. @item 0.000
  210. Silence Center Channel
  211. @end table
  212. @item -ltrt_surmixlev @var{level}
  213. Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the
  214. surround channel(s) when downmixing to stereo in Lt/Rt mode.
  215. @table @option
  216. @item 0.841
  217. Apply -1.5dB gain
  218. @item 0.707
  219. Apply -3.0dB gain
  220. @item 0.595
  221. Apply -4.5dB gain
  222. @item 0.500
  223. Apply -6.0dB gain (default)
  224. @item 0.000
  225. Silence Surround Channel(s)
  226. @end table
  227. @item -loro_cmixlev @var{level}
  228. Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the
  229. center channel when downmixing to stereo in Lo/Ro mode.
  230. @table @option
  231. @item 1.414
  232. Apply +3dB gain
  233. @item 1.189
  234. Apply +1.5dB gain
  235. @item 1.000
  236. Apply 0dB gain
  237. @item 0.841
  238. Apply -1.5dB gain
  239. @item 0.707
  240. Apply -3.0dB gain
  241. @item 0.595
  242. Apply -4.5dB gain (default)
  243. @item 0.500
  244. Apply -6.0dB gain
  245. @item 0.000
  246. Silence Center Channel
  247. @end table
  248. @item -loro_surmixlev @var{level}
  249. Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the
  250. surround channel(s) when downmixing to stereo in Lo/Ro mode.
  251. @table @option
  252. @item 0.841
  253. Apply -1.5dB gain
  254. @item 0.707
  255. Apply -3.0dB gain
  256. @item 0.595
  257. Apply -4.5dB gain
  258. @item 0.500
  259. Apply -6.0dB gain (default)
  260. @item 0.000
  261. Silence Surround Channel(s)
  262. @end table
  263. @end table
  264. @subsubsection Extended Bitstream Information - Part 2
  265. @table @option
  266. @item -dsurex_mode @var{mode}
  267. Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX
  268. (7.1 matrixed to 5.1). Using this option does @b{NOT} mean the encoder will actually
  269. apply Dolby Surround EX processing.
  270. @table @option
  271. @item 0
  272. @itemx notindicated
  273. Not Indicated (default)
  274. @item 1
  275. @itemx on
  276. Dolby Surround EX Off
  277. @item 2
  278. @itemx off
  279. Dolby Surround EX On
  280. @end table
  281. @item -dheadphone_mode @var{mode}
  282. Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone
  283. encoding (multi-channel matrixed to 2.0 for use with headphones). Using this
  284. option does @b{NOT} mean the encoder will actually apply Dolby Headphone
  285. processing.
  286. @table @option
  287. @item 0
  288. @itemx notindicated
  289. Not Indicated (default)
  290. @item 1
  291. @itemx on
  292. Dolby Headphone Off
  293. @item 2
  294. @itemx off
  295. Dolby Headphone On
  296. @end table
  297. @item -ad_conv_type @var{type}
  298. A/D Converter Type. Indicates whether the audio has passed through HDCD A/D
  299. conversion.
  300. @table @option
  301. @item 0
  302. @itemx standard
  303. Standard A/D Converter (default)
  304. @item 1
  305. @itemx hdcd
  306. HDCD A/D Converter
  307. @end table
  308. @end table
  309. @subsection Other AC-3 Encoding Options
  310. @table @option
  311. @item -stereo_rematrixing @var{boolean}
  312. Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
  313. is an optional AC-3 feature that increases quality by selectively encoding
  314. the left/right channels as mid/side. This option is enabled by default, and it
  315. is highly recommended that it be left as enabled except for testing purposes.
  316. @end table
  317. @subsection Floating-Point-Only AC-3 Encoding Options
  318. These options are only valid for the floating-point encoder and do not exist
  319. for the fixed-point encoder due to the corresponding features not being
  320. implemented in fixed-point.
  321. @table @option
  322. @item -channel_coupling @var{boolean}
  323. Enables/Disables use of channel coupling, which is an optional AC-3 feature
  324. that increases quality by combining high frequency information from multiple
  325. channels into a single channel. The per-channel high frequency information is
  326. sent with less accuracy in both the frequency and time domains. This allows
  327. more bits to be used for lower frequencies while preserving enough information
  328. to reconstruct the high frequencies. This option is enabled by default for the
  329. floating-point encoder and should generally be left as enabled except for
  330. testing purposes or to increase encoding speed.
  331. @table @option
  332. @item -1
  333. @itemx auto
  334. Selected by Encoder (default)
  335. @item 0
  336. @itemx off
  337. Disable Channel Coupling
  338. @item 1
  339. @itemx on
  340. Enable Channel Coupling
  341. @end table
  342. @item -cpl_start_band @var{number}
  343. Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a
  344. value higher than the bandwidth is used, it will be reduced to 1 less than the
  345. coupling end band. If @var{auto} is used, the start band will be determined by
  346. the encoder based on the bit rate, sample rate, and channel layout. This option
  347. has no effect if channel coupling is disabled.
  348. @table @option
  349. @item -1
  350. @itemx auto
  351. Selected by Encoder (default)
  352. @end table
  353. @end table
  354. @section libmp3lame
  355. LAME (Lame Ain't an MP3 Encoder) MP3 encoder wrapper
  356. Requires the presence of the libmp3lame headers and library during
  357. configuration. You need to explicitly configure the build with
  358. @code{--enable-libmp3lame}.
  359. @subsection Option Mapping
  360. The following options are supported by the libmp3lame wrapper,
  361. the LAME-equivalent options follow the FFmpeg ones.
  362. @multitable @columnfractions .2 .2
  363. @item FFmpeg @tab LAME
  364. @item b @tab b
  365. FFmpeg @code{b} option is expressed in bits/s, lame @code{bitrate}
  366. in kilobits/s.
  367. @item q @tab V
  368. Quality setting for VBR.
  369. @item compression_level @tab q
  370. Algorithm quality. Valid options are integers from 0-9.
  371. @item reservoir @tab N.A.
  372. Enable use of bit reservoir. LAME has this enabled by default.
  373. @item joint_stereo @tab -m j
  374. Enables the the encoder to use (on a frame by frame basis) either L/R
  375. stereo or mid/side stereo.
  376. @end multitable
  377. @section libopencore-amrnb
  378. OpenCORE Adaptive Multi-Rate Narrowband encoder.
  379. Requires the presence of the libopencore-amrnb headers and library during
  380. configuration. You need to explicitly configure the build with
  381. @code{--enable-libopencore-amrnb --enable-version3}.
  382. This is a mono-only encoder. Officially it only supports 8000Hz sample rate,
  383. but you can override it by setting @option{strict} to @samp{unofficial} or
  384. lower.
  385. @subsection Options
  386. @table @option
  387. @item b
  388. Set bitrate in bits per second. Only the following bitrates are supported,
  389. otherwise libavcodec will round to the nearest valid bitrate.
  390. @table @option
  391. @item 4750
  392. @item 5150
  393. @item 5900
  394. @item 6700
  395. @item 7400
  396. @item 7950
  397. @item 10200
  398. @item 12200
  399. @end table
  400. @item dtx
  401. Allow discontinuous transmission (generate comfort noise) when set to 1. The
  402. default value is 0 (disabled).
  403. @end table
  404. @section libvo-aacenc
  405. VisualOn AAC encoder
  406. Requires the presence of the libvo-aacenc headers and library during
  407. configuration. You need to explicitly configure the build with
  408. @code{--enable-libvo-aacenc --enable-version3}.
  409. @subsection Options
  410. The VisualOn AAC encoder only support encoding AAC-LC and up to 2
  411. channels. It is also CBR-only. It is considered to be worse than the
  412. native experimental FFmpeg AAC encoder.
  413. @table @option
  414. @item b
  415. Bitrate.
  416. @end table
  417. @section libvo-amrwbenc
  418. VisualOn Adaptive Multi-Rate Wideband encoder
  419. Requires the presence of the libvo-amrwbenc headers and library during
  420. configuration. You need to explicitly configure the build with
  421. @code{--enable-libvo-amrwbenc --enable-version3}.
  422. This is a mono-only encoder. Officially it only supports 16000Hz sample
  423. rate, but you can override it by setting @option{strict} to
  424. @samp{unofficial} or lower.
  425. @subsection Options
  426. @table @option
  427. @item b
  428. Set bitrate in bits/s. Only the following bitrates are supported, otherwise
  429. libavcodec will round to the nearest valid bitrate.
  430. @table @samp
  431. @item 6600
  432. @item 8850
  433. @item 12650
  434. @item 14250
  435. @item 15850
  436. @item 18250
  437. @item 19850
  438. @item 23050
  439. @item 23850
  440. @end table
  441. @item dtx
  442. Allow discontinuous transmission (generate comfort noise) when set to 1. The
  443. default value is 0 (disabled).
  444. @end table
  445. @c man end AUDIO ENCODERS
  446. @chapter Video Encoders
  447. @c man begin VIDEO ENCODERS
  448. A description of some of the currently available video encoders
  449. follows.
  450. @section libvpx
  451. VP8 format supported through libvpx.
  452. Requires the presence of the libvpx headers and library during configuration.
  453. You need to explicitly configure the build with @code{--enable-libvpx}.
  454. @subsection Options
  455. Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
  456. @table @option
  457. @item threads
  458. g_threads
  459. @item profile
  460. g_profile
  461. @item vb
  462. rc_target_bitrate
  463. @item g
  464. kf_max_dist
  465. @item keyint_min
  466. kf_min_dist
  467. @item qmin
  468. rc_min_quantizer
  469. @item qmax
  470. rc_max_quantizer
  471. @item bufsize, vb
  472. rc_buf_sz
  473. @code{(bufsize * 1000 / vb)}
  474. rc_buf_optimal_sz
  475. @code{(bufsize * 1000 / vb * 5 / 6)}
  476. @item rc_init_occupancy, vb
  477. rc_buf_initial_sz
  478. @code{(rc_init_occupancy * 1000 / vb)}
  479. @item rc_buffer_aggressivity
  480. rc_undershoot_pct
  481. @item skip_threshold
  482. rc_dropframe_thresh
  483. @item qcomp
  484. rc_2pass_vbr_bias_pct
  485. @item maxrate, vb
  486. rc_2pass_vbr_maxsection_pct
  487. @code{(maxrate * 100 / vb)}
  488. @item minrate, vb
  489. rc_2pass_vbr_minsection_pct
  490. @code{(minrate * 100 / vb)}
  491. @item minrate, maxrate, vb
  492. @code{VPX_CBR}
  493. @code{(minrate == maxrate == vb)}
  494. @item crf
  495. @code{VPX_CQ}, @code{VP8E_SET_CQ_LEVEL}
  496. @item quality
  497. @table @option
  498. @item @var{best}
  499. @code{VPX_DL_BEST_QUALITY}
  500. @item @var{good}
  501. @code{VPX_DL_GOOD_QUALITY}
  502. @item @var{realtime}
  503. @code{VPX_DL_REALTIME}
  504. @end table
  505. @item speed
  506. @code{VP8E_SET_CPUUSED}
  507. @item nr
  508. @code{VP8E_SET_NOISE_SENSITIVITY}
  509. @item mb_threshold
  510. @code{VP8E_SET_STATIC_THRESHOLD}
  511. @item slices
  512. @code{VP8E_SET_TOKEN_PARTITIONS}
  513. @item Alternate reference frame related
  514. @table @option
  515. @item vp8flags altref
  516. @code{VP8E_SET_ENABLEAUTOALTREF}
  517. @item @var{arnr_max_frames}
  518. @code{VP8E_SET_ARNR_MAXFRAMES}
  519. @item @var{arnr_type}
  520. @code{VP8E_SET_ARNR_TYPE}
  521. @item @var{arnr_strength}
  522. @code{VP8E_SET_ARNR_STRENGTH}
  523. @item @var{rc_lookahead}
  524. g_lag_in_frames
  525. @end table
  526. @item vp8flags error_resilient
  527. g_error_resilient
  528. @end table
  529. For more information about libvpx see:
  530. @url{http://www.webmproject.org/}
  531. @section libx264
  532. H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 format supported through
  533. libx264.
  534. Requires the presence of the libx264 headers and library during
  535. configuration. You need to explicitly configure the build with
  536. @code{--enable-libx264}.
  537. @subsection Options
  538. @table @option
  539. @item preset @var{preset_name}
  540. Set the encoding preset.
  541. @item tune @var{tune_name}
  542. Tune the encoding params.
  543. @item fastfirstpass @var{bool}
  544. Use fast settings when encoding first pass, default value is 1.
  545. @item profile @var{profile_name}
  546. Set profile restrictions.
  547. @item level @var{level}
  548. Specify level (as defined by Annex A).
  549. Deprecated in favor of @var{x264opts}.
  550. @item passlogfile @var{filename}
  551. Specify filename for 2 pass stats.
  552. Deprecated in favor of @var{x264opts} (see @var{stats} libx264 option).
  553. @item wpredp @var{wpred_type}
  554. Specify Weighted prediction for P-frames.
  555. Deprecated in favor of @var{x264opts} (see @var{weightp} libx264 option).
  556. @item x264opts @var{options}
  557. Allow to set any x264 option, see x264 --fullhelp for a list.
  558. @var{options} is a list of @var{key}=@var{value} couples separated by
  559. ":".
  560. @end table
  561. For example to specify libx264 encoding options with @command{ffmpeg}:
  562. @example
  563. ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
  564. @end example
  565. For more information about libx264 and the supported options see:
  566. @url{http://www.videolan.org/developers/x264.html}
  567. @section libxvid
  568. Xvid MPEG-4 Part 2 encoder wrapper.
  569. This encoder requires the presence of the libxvidcore headers and library
  570. during configuration. You need to explicitly configure the build with
  571. @code{--enable-libxvid --enable-gpl}.
  572. The native @code{mpeg4} encoder supports the MPEG-4 Part 2 format, so
  573. users can encode to this format without this library.
  574. @subsection Options
  575. The following options are supported by the libxvid wrapper. Some of
  576. the following options are listed but are not documented, and
  577. correspond to shared codec options. The other shared options
  578. which are not listed have no effect for the libxvid encoder.
  579. @table @option
  580. @item b
  581. @item g
  582. @item qmin
  583. @item qmax
  584. @item mpeg_quant
  585. @item threads
  586. @item bf
  587. @item b_qfactor
  588. @item b_qoffset
  589. @item flags
  590. Set specific encoding flags. Possible values:
  591. @table @samp
  592. @item mv4
  593. Use four motion vector by macroblock.
  594. @item aic
  595. Enable high quality AC prediction.
  596. @item gray
  597. Only encode grayscale.
  598. @item gmc
  599. Enable the use of global motion compensation (GMC).
  600. @item qpel
  601. Enable quarter-pixel motion compensation.
  602. @item cgop
  603. Enable closed GOP.
  604. @item global_header
  605. Place global headers in extradata instead of every keyframe.
  606. @end table
  607. @item trellis
  608. @item me_method
  609. Set motion estimation method. Possible values in decreasing order of
  610. speed and increasing order of quality:
  611. @table @samp
  612. @item zero
  613. Use no motion estimation (default).
  614. @item phods
  615. @item x1
  616. @item log
  617. Enable advanced diamond zonal search for 16x16 blocks and half-pixel
  618. refinement for 16x16 blocks. @samp{x1} and @samp{log} are aliases for
  619. @samp{phods}.
  620. @item epzs
  621. Enable all of the things described above, plus advanced diamond zonal
  622. search for 8x8 blocks, half-pixel refinement for 8x8 blocks, and motion
  623. estimation on chroma planes.
  624. @item full
  625. Enable all of the things described above, plus extended 16x16 and 8x8
  626. blocks search.
  627. @end table
  628. @item mbd
  629. Set macroblock decision algorithm. Possible values in the increasing
  630. order of quality:
  631. @table @samp
  632. @item simple
  633. Use macroblock comparing function algorithm (default).
  634. @item bits
  635. Enable rate distortion-based half pixel and quarter pixel refinement for
  636. 16x16 blocks.
  637. @item rd
  638. Enable all of the things described above, plus rate distortion-based
  639. half pixel and quarter pixel refinement for 8x8 blocks, and rate
  640. distortion-based search using square pattern.
  641. @end table
  642. @end table
  643. @c man end VIDEO ENCODERS