3 <!-- Created on December 14, 2013 by texi2html 1.82 -->
5 texi2html was written by:
6 Lionel Cons <Lionel.Cons@cern.ch> (original author)
7 Karl Berry <karl@freefriends.org>
8 Olaf Bachmann <obachman@mathematik.uni-kl.de>
10 Maintained by: Many creative people.
11 Send bugs and suggestions to <texi2html-bug@nongnu.org>
15 <title>FFmpeg documentation : FFmpeg Codecs </title>
17 <meta name="description" content="FFmpeg Codecs Documentation: ">
18 <meta name="keywords" content="FFmpeg documentation : FFmpeg Codecs ">
19 <meta name="Generator" content="texi2html 1.82">
20 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
21 <link rel="stylesheet" type="text/css" href="default.css" />
23 <link rel="icon" href="favicon.png" type="image/png" />
29 <a name="SEC_Top"></a>
30 <h1 class="settitle">FFmpeg Codecs Documentation</h1>
32 <a name="SEC_Contents"></a>
33 <h1>Table of Contents</h1>
34 <div class="contents">
37 <li><a name="toc-Description" href="#Description">1. Description</a></li>
38 <li><a name="toc-Codec-Options" href="#Codec-Options">2. Codec Options</a></li>
39 <li><a name="toc-Decoders" href="#Decoders">3. Decoders</a></li>
40 <li><a name="toc-Video-Decoders" href="#Video-Decoders">4. Video Decoders</a>
42 <li><a name="toc-rawvideo" href="#rawvideo">4.1 rawvideo</a>
44 <li><a name="toc-Options-17" href="#Options-17">4.1.1 Options</a></li>
48 <li><a name="toc-Audio-Decoders" href="#Audio-Decoders">5. Audio Decoders</a>
50 <li><a name="toc-ffwavesynth" href="#ffwavesynth">5.1 ffwavesynth</a></li>
51 <li><a name="toc-libcelt" href="#libcelt">5.2 libcelt</a></li>
52 <li><a name="toc-libgsm" href="#libgsm">5.3 libgsm</a></li>
53 <li><a name="toc-libilbc" href="#libilbc">5.4 libilbc</a>
55 <li><a name="toc-Options-13" href="#Options-13">5.4.1 Options</a></li>
57 <li><a name="toc-libopencore_002damrnb" href="#libopencore_002damrnb">5.5 libopencore-amrnb</a></li>
58 <li><a name="toc-libopencore_002damrwb" href="#libopencore_002damrwb">5.6 libopencore-amrwb</a></li>
59 <li><a name="toc-libopus" href="#libopus">5.7 libopus</a></li>
61 <li><a name="toc-Subtitles-Decoders" href="#Subtitles-Decoders">6. Subtitles Decoders</a>
63 <li><a name="toc-dvdsub" href="#dvdsub">6.1 dvdsub</a>
65 <li><a name="toc-Options-7" href="#Options-7">6.1.1 Options</a></li>
67 <li><a name="toc-libzvbi_002dteletext" href="#libzvbi_002dteletext">6.2 libzvbi-teletext</a>
69 <li><a name="toc-Options-11" href="#Options-11">6.2.1 Options</a></li>
73 <li><a name="toc-Encoders" href="#Encoders">7. Encoders</a></li>
74 <li><a name="toc-Audio-Encoders" href="#Audio-Encoders">8. Audio Encoders</a>
76 <li><a name="toc-aac" href="#aac">8.1 aac</a>
78 <li><a name="toc-Options-8" href="#Options-8">8.1.1 Options</a></li>
80 <li><a name="toc-ac3-and-ac3_005ffixed" href="#ac3-and-ac3_005ffixed">8.2 ac3 and ac3_fixed</a>
82 <li><a name="toc-AC_002d3-Metadata" href="#AC_002d3-Metadata">8.2.1 AC-3 Metadata</a>
84 <li><a name="toc-Metadata-Control-Options" href="#Metadata-Control-Options">8.2.1.1 Metadata Control Options</a></li>
85 <li><a name="toc-Downmix-Levels" href="#Downmix-Levels">8.2.1.2 Downmix Levels</a></li>
86 <li><a name="toc-Audio-Production-Information" href="#Audio-Production-Information">8.2.1.3 Audio Production Information</a></li>
87 <li><a name="toc-Other-Metadata-Options" href="#Other-Metadata-Options">8.2.1.4 Other Metadata Options</a></li>
89 <li><a name="toc-Extended-Bitstream-Information" href="#Extended-Bitstream-Information">8.2.2 Extended Bitstream Information</a>
91 <li><a name="toc-Extended-Bitstream-Information-_002d-Part-1" href="#Extended-Bitstream-Information-_002d-Part-1">8.2.2.1 Extended Bitstream Information - Part 1</a></li>
92 <li><a name="toc-Extended-Bitstream-Information-_002d-Part-2" href="#Extended-Bitstream-Information-_002d-Part-2">8.2.2.2 Extended Bitstream Information - Part 2</a></li>
94 <li><a name="toc-Other-AC_002d3-Encoding-Options" href="#Other-AC_002d3-Encoding-Options">8.2.3 Other AC-3 Encoding Options</a></li>
95 <li><a name="toc-Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options" href="#Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options">8.2.4 Floating-Point-Only AC-3 Encoding Options</a></li>
97 <li><a name="toc-libfaac-1" href="#libfaac-1">8.3 libfaac</a>
99 <li><a name="toc-Options-10" href="#Options-10">8.3.1 Options</a></li>
100 <li><a name="toc-Examples-1" href="#Examples-1">8.3.2 Examples</a></li>
102 <li><a name="toc-libfdk_005faac" href="#libfdk_005faac">8.4 libfdk_aac</a>
104 <li><a name="toc-Options-5" href="#Options-5">8.4.1 Options</a></li>
105 <li><a name="toc-Examples-2" href="#Examples-2">8.4.2 Examples</a></li>
107 <li><a name="toc-libmp3lame-1" href="#libmp3lame-1">8.5 libmp3lame</a>
109 <li><a name="toc-Options-12" href="#Options-12">8.5.1 Options</a></li>
111 <li><a name="toc-libopencore_002damrnb-1" href="#libopencore_002damrnb-1">8.6 libopencore-amrnb</a>
113 <li><a name="toc-Options-9" href="#Options-9">8.6.1 Options</a></li>
115 <li><a name="toc-libshine-1" href="#libshine-1">8.7 libshine</a>
117 <li><a name="toc-Options" href="#Options">8.7.1 Options</a></li>
119 <li><a name="toc-libtwolame" href="#libtwolame">8.8 libtwolame</a>
121 <li><a name="toc-Options-1" href="#Options-1">8.8.1 Options</a></li>
123 <li><a name="toc-libvo_002daacenc-1" href="#libvo_002daacenc-1">8.9 libvo-aacenc</a>
125 <li><a name="toc-Options-4" href="#Options-4">8.9.1 Options</a></li>
127 <li><a name="toc-libvo_002damrwbenc" href="#libvo_002damrwbenc">8.10 libvo-amrwbenc</a>
129 <li><a name="toc-Options-15" href="#Options-15">8.10.1 Options</a></li>
131 <li><a name="toc-libopus-1" href="#libopus-1">8.11 libopus</a>
133 <li><a name="toc-Option-Mapping" href="#Option-Mapping">8.11.1 Option Mapping</a></li>
135 <li><a name="toc-libvorbis" href="#libvorbis">8.12 libvorbis</a>
137 <li><a name="toc-Options-16" href="#Options-16">8.12.1 Options</a></li>
139 <li><a name="toc-libwavpack" href="#libwavpack">8.13 libwavpack</a></li>
141 <li><a name="toc-Video-Encoders" href="#Video-Encoders">9. Video Encoders</a>
143 <li><a name="toc-libtheora" href="#libtheora">9.1 libtheora</a>
145 <li><a name="toc-Options-14" href="#Options-14">9.1.1 Options</a></li>
146 <li><a name="toc-Examples" href="#Examples">9.1.2 Examples</a></li>
148 <li><a name="toc-libvpx" href="#libvpx">9.2 libvpx</a>
150 <li><a name="toc-Options-3" href="#Options-3">9.2.1 Options</a></li>
152 <li><a name="toc-libx264" href="#libx264">9.3 libx264</a>
154 <li><a name="toc-Options-6" href="#Options-6">9.3.1 Options</a></li>
156 <li><a name="toc-libxvid" href="#libxvid">9.4 libxvid</a>
158 <li><a name="toc-Options-2" href="#Options-2">9.4.1 Options</a></li>
160 <li><a name="toc-png" href="#png">9.5 png</a>
162 <li><a name="toc-Private-options" href="#Private-options">9.5.1 Private options</a></li>
164 <li><a name="toc-ProRes" href="#ProRes">9.6 ProRes</a>
166 <li><a name="toc-Private-Options-for-prores_002dks" href="#Private-Options-for-prores_002dks">9.6.1 Private Options for prores-ks</a></li>
167 <li><a name="toc-Speed-considerations" href="#Speed-considerations">9.6.2 Speed considerations</a></li>
171 <li><a name="toc-See-Also" href="#See-Also">10. See Also</a></li>
172 <li><a name="toc-Authors" href="#Authors">11. Authors</a></li>
176 <a name="Description"></a>
177 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Description">1. Description</a></h1>
179 <p>This document describes the codecs (decoders and encoders) provided by
180 the libavcodec library.
183 <p><a name="codec_002doptions"></a>
184 </p><a name="Codec-Options"></a>
185 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Codec-Options">2. Codec Options</a></h1>
187 <p>libavcodec provides some generic global options, which can be set on
188 all the encoders and decoders. In addition each codec may support
189 so-called private options, which are specific for a given codec.
191 <p>Sometimes, a global option may only affect a specific kind of codec,
192 and may be unsensical or ignored by another, so you need to be aware
193 of the meaning of the specified options. Also some options are
194 meant only for decoding or encoding.
196 <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
197 FFmpeg tools, or by setting the value explicitly in the
198 <code>AVCodecContext</code> options or using the ‘<tt>libavutil/opt.h</tt>’ API
199 for programmatic use.
201 <p>The list of supported options follow:
203 <dl compact="compact">
204 <dt> ‘<samp>b <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
205 <dd><p>Set bitrate in bits/s. Default value is 200K.
208 <dt> ‘<samp>ab <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
209 <dd><p>Set audio bitrate (in bits/s). Default value is 128K.
212 <dt> ‘<samp>bt <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
213 <dd><p>Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate
214 tolerance specifies how far ratecontrol is willing to deviate from the
215 target average bitrate value. This is not related to min/max
216 bitrate. Lowering tolerance too much has an adverse effect on quality.
219 <dt> ‘<samp>flags <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp>’</dt>
220 <dd><p>Set generic flags.
223 </p><dl compact="compact">
224 <dt> ‘<samp>mv4</samp>’</dt>
225 <dd><p>Use four motion vector by macroblock (mpeg4).
227 <dt> ‘<samp>qpel</samp>’</dt>
228 <dd><p>Use 1/4 pel motion compensation.
230 <dt> ‘<samp>loop</samp>’</dt>
231 <dd><p>Use loop filter.
233 <dt> ‘<samp>qscale</samp>’</dt>
234 <dd><p>Use fixed qscale.
236 <dt> ‘<samp>gmc</samp>’</dt>
239 <dt> ‘<samp>mv0</samp>’</dt>
240 <dd><p>Always try a mb with mv=<0,0>.
242 <dt> ‘<samp>input_preserved</samp>’</dt>
243 <dt> ‘<samp>pass1</samp>’</dt>
244 <dd><p>Use internal 2pass ratecontrol in first pass mode.
246 <dt> ‘<samp>pass2</samp>’</dt>
247 <dd><p>Use internal 2pass ratecontrol in second pass mode.
249 <dt> ‘<samp>gray</samp>’</dt>
250 <dd><p>Only decode/encode grayscale.
252 <dt> ‘<samp>emu_edge</samp>’</dt>
253 <dd><p>Do not draw edges.
255 <dt> ‘<samp>psnr</samp>’</dt>
256 <dd><p>Set error[?] variables during encoding.
258 <dt> ‘<samp>truncated</samp>’</dt>
259 <dt> ‘<samp>naq</samp>’</dt>
260 <dd><p>Normalize adaptive quantization.
262 <dt> ‘<samp>ildct</samp>’</dt>
263 <dd><p>Use interlaced DCT.
265 <dt> ‘<samp>low_delay</samp>’</dt>
266 <dd><p>Force low delay.
268 <dt> ‘<samp>global_header</samp>’</dt>
269 <dd><p>Place global headers in extradata instead of every keyframe.
271 <dt> ‘<samp>bitexact</samp>’</dt>
272 <dd><p>Use only bitexact stuff (except (I)DCT).
274 <dt> ‘<samp>aic</samp>’</dt>
275 <dd><p>Apply H263 advanced intra coding / mpeg4 ac prediction.
277 <dt> ‘<samp>cbp</samp>’</dt>
278 <dd><p>Deprecated, use mpegvideo private options instead.
280 <dt> ‘<samp>qprd</samp>’</dt>
281 <dd><p>Deprecated, use mpegvideo private options instead.
283 <dt> ‘<samp>ilme</samp>’</dt>
284 <dd><p>Apply interlaced motion estimation.
286 <dt> ‘<samp>cgop</samp>’</dt>
287 <dd><p>Use closed gop.
292 <dt> ‘<samp>me_method <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
293 <dd><p>Set motion estimation method.
296 </p><dl compact="compact">
297 <dt> ‘<samp>zero</samp>’</dt>
298 <dd><p>zero motion estimation (fastest)
300 <dt> ‘<samp>full</samp>’</dt>
301 <dd><p>full motion estimation (slowest)
303 <dt> ‘<samp>epzs</samp>’</dt>
304 <dd><p>EPZS motion estimation (default)
306 <dt> ‘<samp>esa</samp>’</dt>
307 <dd><p>esa motion estimation (alias for full)
309 <dt> ‘<samp>tesa</samp>’</dt>
310 <dd><p>tesa motion estimation
312 <dt> ‘<samp>dia</samp>’</dt>
313 <dd><p>dia motion estimation (alias for epzs)
315 <dt> ‘<samp>log</samp>’</dt>
316 <dd><p>log motion estimation
318 <dt> ‘<samp>phods</samp>’</dt>
319 <dd><p>phods motion estimation
321 <dt> ‘<samp>x1</samp>’</dt>
322 <dd><p>X1 motion estimation
324 <dt> ‘<samp>hex</samp>’</dt>
325 <dd><p>hex motion estimation
327 <dt> ‘<samp>umh</samp>’</dt>
328 <dd><p>umh motion estimation
330 <dt> ‘<samp>iter</samp>’</dt>
331 <dd><p>iter motion estimation
336 <dt> ‘<samp>extradata_size <var>integer</var></samp>’</dt>
337 <dd><p>Set extradata size.
340 <dt> ‘<samp>time_base <var>rational number</var></samp>’</dt>
341 <dd><p>Set codec time base.
343 <p>It is the fundamental unit of time (in seconds) in terms of which
344 frame timestamps are represented. For fixed-fps content, timebase
345 should be <code>1 / frame_rate</code> and timestamp increments should be
349 <dt> ‘<samp>g <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
350 <dd><p>Set the group of picture size. Default value is 12.
353 <dt> ‘<samp>ar <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>’</dt>
354 <dd><p>Set audio sampling rate (in Hz).
357 <dt> ‘<samp>ac <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>’</dt>
358 <dd><p>Set number of audio channels.
361 <dt> ‘<samp>cutoff <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
362 <dd><p>Set cutoff bandwidth.
365 <dt> ‘<samp>frame_size <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
366 <dd><p>Set audio frame size.
368 <p>Each submitted frame except the last must contain exactly frame_size
369 samples per channel. May be 0 when the codec has
370 CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is not
371 restricted. It is set by some decoders to indicate constant frame
375 <dt> ‘<samp>frame_number <var>integer</var></samp>’</dt>
376 <dd><p>Set the frame number.
379 <dt> ‘<samp>delay <var>integer</var></samp>’</dt>
380 <dt> ‘<samp>qcomp <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
381 <dd><p>Set video quantizer scale compression (VBR). It is used as a constant
382 in the ratecontrol equation. Recommended range for default rc_eq:
386 <dt> ‘<samp>qblur <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
387 <dd><p>Set video quantizer scale blur (VBR).
390 <dt> ‘<samp>qmin <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
391 <dd><p>Set min video quantizer scale (VBR). Must be included between -1 and
392 69, default value is 2.
395 <dt> ‘<samp>qmax <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
396 <dd><p>Set max video quantizer scale (VBR). Must be included between -1 and
397 1024, default value is 31.
400 <dt> ‘<samp>qdiff <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
401 <dd><p>Set max difference between the quantizer scale (VBR).
404 <dt> ‘<samp>bf <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
405 <dd><p>Set max number of B frames between non-B-frames.
407 <p>Must be an integer between -1 and 16. 0 means that B-frames are
408 disabled. If a value of -1 is used, it will choose an automatic value
409 depending on the encoder.
411 <p>Default value is 0.
414 <dt> ‘<samp>b_qfactor <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
415 <dd><p>Set qp factor between P and B frames.
418 <dt> ‘<samp>rc_strategy <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
419 <dd><p>Set ratecontrol method.
422 <dt> ‘<samp>b_strategy <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
423 <dd><p>Set strategy to choose between I/P/B-frames.
426 <dt> ‘<samp>ps <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
427 <dd><p>Set RTP payload size in bytes.
430 <dt> ‘<samp>mv_bits <var>integer</var></samp>’</dt>
431 <dt> ‘<samp>header_bits <var>integer</var></samp>’</dt>
432 <dt> ‘<samp>i_tex_bits <var>integer</var></samp>’</dt>
433 <dt> ‘<samp>p_tex_bits <var>integer</var></samp>’</dt>
434 <dt> ‘<samp>i_count <var>integer</var></samp>’</dt>
435 <dt> ‘<samp>p_count <var>integer</var></samp>’</dt>
436 <dt> ‘<samp>skip_count <var>integer</var></samp>’</dt>
437 <dt> ‘<samp>misc_bits <var>integer</var></samp>’</dt>
438 <dt> ‘<samp>frame_bits <var>integer</var></samp>’</dt>
439 <dt> ‘<samp>codec_tag <var>integer</var></samp>’</dt>
440 <dt> ‘<samp>bug <var>flags</var> (<em>decoding,video</em>)</samp>’</dt>
441 <dd><p>Workaround not auto detected encoder bugs.
444 </p><dl compact="compact">
445 <dt> ‘<samp>autodetect</samp>’</dt>
446 <dt> ‘<samp>old_msmpeg4</samp>’</dt>
447 <dd><p>some old lavc generated msmpeg4v3 files (no autodetection)
449 <dt> ‘<samp>xvid_ilace</samp>’</dt>
450 <dd><p>Xvid interlacing bug (autodetected if fourcc==XVIX)
452 <dt> ‘<samp>ump4</samp>’</dt>
453 <dd><p>(autodetected if fourcc==UMP4)
455 <dt> ‘<samp>no_padding</samp>’</dt>
456 <dd><p>padding bug (autodetected)
458 <dt> ‘<samp>amv</samp>’</dt>
459 <dt> ‘<samp>ac_vlc</samp>’</dt>
460 <dd><p>illegal vlc bug (autodetected per fourcc)
462 <dt> ‘<samp>qpel_chroma</samp>’</dt>
463 <dt> ‘<samp>std_qpel</samp>’</dt>
464 <dd><p>old standard qpel (autodetected per fourcc/version)
466 <dt> ‘<samp>qpel_chroma2</samp>’</dt>
467 <dt> ‘<samp>direct_blocksize</samp>’</dt>
468 <dd><p>direct-qpel-blocksize bug (autodetected per fourcc/version)
470 <dt> ‘<samp>edge</samp>’</dt>
471 <dd><p>edge padding bug (autodetected per fourcc/version)
473 <dt> ‘<samp>hpel_chroma</samp>’</dt>
474 <dt> ‘<samp>dc_clip</samp>’</dt>
475 <dt> ‘<samp>ms</samp>’</dt>
476 <dd><p>Workaround various bugs in microsoft broken decoders.
478 <dt> ‘<samp>trunc</samp>’</dt>
479 <dd><p>trancated frames
484 <dt> ‘<samp>lelim <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
485 <dd><p>Set single coefficient elimination threshold for luminance (negative
486 values also consider DC coefficient).
489 <dt> ‘<samp>celim <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
490 <dd><p>Set single coefficient elimination threshold for chrominance (negative
491 values also consider dc coefficient)
494 <dt> ‘<samp>strict <var>integer</var> (<em>decoding/encoding,audio,video</em>)</samp>’</dt>
495 <dd><p>Specify how strictly to follow the standards.
498 </p><dl compact="compact">
499 <dt> ‘<samp>very</samp>’</dt>
500 <dd><p>strictly conform to a older more strict version of the spec or reference software
502 <dt> ‘<samp>strict</samp>’</dt>
503 <dd><p>strictly conform to all the things in the spec no matter what consequences
505 <dt> ‘<samp>normal</samp>’</dt>
506 <dt> ‘<samp>unofficial</samp>’</dt>
507 <dd><p>allow unofficial extensions
509 <dt> ‘<samp>experimental</samp>’</dt>
510 <dd><p>allow non standardized experimental things, experimental
511 (unfinished/work in progress/not well tested) decoders and encoders.
512 Note: experimental decoders can pose a security risk, do not use this for
513 decoding untrusted input.
518 <dt> ‘<samp>b_qoffset <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
519 <dd><p>Set QP offset between P and B frames.
522 <dt> ‘<samp>err_detect <var>flags</var> (<em>decoding,audio,video</em>)</samp>’</dt>
523 <dd><p>Set error detection flags.
526 </p><dl compact="compact">
527 <dt> ‘<samp>crccheck</samp>’</dt>
528 <dd><p>verify embedded CRCs
530 <dt> ‘<samp>bitstream</samp>’</dt>
531 <dd><p>detect bitstream specification deviations
533 <dt> ‘<samp>buffer</samp>’</dt>
534 <dd><p>detect improper bitstream length
536 <dt> ‘<samp>explode</samp>’</dt>
537 <dd><p>abort decoding on minor error detection
539 <dt> ‘<samp>careful</samp>’</dt>
540 <dd><p>consider things that violate the spec and have not been seen in the wild as errors
542 <dt> ‘<samp>compliant</samp>’</dt>
543 <dd><p>consider all spec non compliancies as errors
545 <dt> ‘<samp>aggressive</samp>’</dt>
546 <dd><p>consider things that a sane encoder should not do as an error
551 <dt> ‘<samp>has_b_frames <var>integer</var></samp>’</dt>
552 <dt> ‘<samp>block_align <var>integer</var></samp>’</dt>
553 <dt> ‘<samp>mpeg_quant <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
554 <dd><p>Use MPEG quantizers instead of H.263.
557 <dt> ‘<samp>qsquish <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
558 <dd><p>How to keep quantizer between qmin and qmax (0 = clip, 1 = use
559 differentiable function).
562 <dt> ‘<samp>rc_qmod_amp <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
563 <dd><p>Set experimental quantizer modulation.
566 <dt> ‘<samp>rc_qmod_freq <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
567 <dd><p>Set experimental quantizer modulation.
570 <dt> ‘<samp>rc_override_count <var>integer</var></samp>’</dt>
571 <dt> ‘<samp>rc_eq <var>string</var> (<em>encoding,video</em>)</samp>’</dt>
572 <dd><p>Set rate control equation. When computing the expression, besides the
573 standard functions defined in the section ’Expression Evaluation’, the
574 following functions are available: bits2qp(bits), qp2bits(qp). Also
575 the following constants are available: iTex pTex tex mv fCode iCount
576 mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex
580 <dt> ‘<samp>maxrate <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
581 <dd><p>Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
584 <dt> ‘<samp>minrate <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
585 <dd><p>Set min bitrate tolerance (in bits/s). Most useful in setting up a CBR
586 encode. It is of little use elsewise.
589 <dt> ‘<samp>bufsize <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
590 <dd><p>Set ratecontrol buffer size (in bits).
593 <dt> ‘<samp>rc_buf_aggressivity <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
594 <dd><p>Currently useless.
597 <dt> ‘<samp>i_qfactor <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
598 <dd><p>Set QP factor between P and I frames.
601 <dt> ‘<samp>i_qoffset <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
602 <dd><p>Set QP offset between P and I frames.
605 <dt> ‘<samp>rc_init_cplx <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
606 <dd><p>Set initial complexity for 1-pass encoding.
609 <dt> ‘<samp>dct <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
610 <dd><p>Set DCT algorithm.
613 </p><dl compact="compact">
614 <dt> ‘<samp>auto</samp>’</dt>
615 <dd><p>autoselect a good one (default)
617 <dt> ‘<samp>fastint</samp>’</dt>
620 <dt> ‘<samp>int</samp>’</dt>
621 <dd><p>accurate integer
623 <dt> ‘<samp>mmx</samp>’</dt>
624 <dt> ‘<samp>altivec</samp>’</dt>
625 <dt> ‘<samp>faan</samp>’</dt>
626 <dd><p>floating point AAN DCT
631 <dt> ‘<samp>lumi_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
632 <dd><p>Compress bright areas stronger than medium ones.
635 <dt> ‘<samp>tcplx_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
636 <dd><p>Set temporal complexity masking.
639 <dt> ‘<samp>scplx_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
640 <dd><p>Set spatial complexity masking.
643 <dt> ‘<samp>p_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
644 <dd><p>Set inter masking.
647 <dt> ‘<samp>dark_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
648 <dd><p>Compress dark areas stronger than medium ones.
651 <dt> ‘<samp>idct <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
652 <dd><p>Select IDCT implementation.
655 </p><dl compact="compact">
656 <dt> ‘<samp>auto</samp>’</dt>
657 <dt> ‘<samp>int</samp>’</dt>
658 <dt> ‘<samp>simple</samp>’</dt>
659 <dt> ‘<samp>simplemmx</samp>’</dt>
660 <dt> ‘<samp>arm</samp>’</dt>
661 <dt> ‘<samp>altivec</samp>’</dt>
662 <dt> ‘<samp>sh4</samp>’</dt>
663 <dt> ‘<samp>simplearm</samp>’</dt>
664 <dt> ‘<samp>simplearmv5te</samp>’</dt>
665 <dt> ‘<samp>simplearmv6</samp>’</dt>
666 <dt> ‘<samp>simpleneon</samp>’</dt>
667 <dt> ‘<samp>simplealpha</samp>’</dt>
668 <dt> ‘<samp>ipp</samp>’</dt>
669 <dt> ‘<samp>xvidmmx</samp>’</dt>
670 <dt> ‘<samp>faani</samp>’</dt>
671 <dd><p>floating point AAN IDCT
676 <dt> ‘<samp>slice_count <var>integer</var></samp>’</dt>
677 <dt> ‘<samp>ec <var>flags</var> (<em>decoding,video</em>)</samp>’</dt>
678 <dd><p>Set error concealment strategy.
681 </p><dl compact="compact">
682 <dt> ‘<samp>guess_mvs</samp>’</dt>
683 <dd><p>iterative motion vector (MV) search (slow)
685 <dt> ‘<samp>deblock</samp>’</dt>
686 <dd><p>use strong deblock filter for damaged MBs
691 <dt> ‘<samp>bits_per_coded_sample <var>integer</var></samp>’</dt>
692 <dt> ‘<samp>pred <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
693 <dd><p>Set prediction method.
696 </p><dl compact="compact">
697 <dt> ‘<samp>left</samp>’</dt>
698 <dt> ‘<samp>plane</samp>’</dt>
699 <dt> ‘<samp>median</samp>’</dt>
703 <dt> ‘<samp>aspect <var>rational number</var> (<em>encoding,video</em>)</samp>’</dt>
704 <dd><p>Set sample aspect ratio.
707 <dt> ‘<samp>debug <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp>’</dt>
708 <dd><p>Print specific debug info.
711 </p><dl compact="compact">
712 <dt> ‘<samp>pict</samp>’</dt>
715 <dt> ‘<samp>rc</samp>’</dt>
718 <dt> ‘<samp>bitstream</samp>’</dt>
719 <dt> ‘<samp>mb_type</samp>’</dt>
720 <dd><p>macroblock (MB) type
722 <dt> ‘<samp>qp</samp>’</dt>
723 <dd><p>per-block quantization parameter (QP)
725 <dt> ‘<samp>mv</samp>’</dt>
728 <dt> ‘<samp>dct_coeff</samp>’</dt>
729 <dt> ‘<samp>skip</samp>’</dt>
730 <dt> ‘<samp>startcode</samp>’</dt>
731 <dt> ‘<samp>pts</samp>’</dt>
732 <dt> ‘<samp>er</samp>’</dt>
733 <dd><p>error recognition
735 <dt> ‘<samp>mmco</samp>’</dt>
736 <dd><p>memory management control operations (H.264)
738 <dt> ‘<samp>bugs</samp>’</dt>
739 <dt> ‘<samp>vis_qp</samp>’</dt>
740 <dd><p>visualize quantization parameter (QP), lower QP are tinted greener
742 <dt> ‘<samp>vis_mb_type</samp>’</dt>
743 <dd><p>visualize block types
745 <dt> ‘<samp>buffers</samp>’</dt>
746 <dd><p>picture buffer allocations
748 <dt> ‘<samp>thread_ops</samp>’</dt>
749 <dd><p>threading operations
754 <dt> ‘<samp>vismv <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
755 <dd><p>Visualize motion vectors (MVs).
758 </p><dl compact="compact">
759 <dt> ‘<samp>pf</samp>’</dt>
760 <dd><p>forward predicted MVs of P-frames
762 <dt> ‘<samp>bf</samp>’</dt>
763 <dd><p>forward predicted MVs of B-frames
765 <dt> ‘<samp>bb</samp>’</dt>
766 <dd><p>backward predicted MVs of B-frames
771 <dt> ‘<samp>cmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
772 <dd><p>Set full pel me compare function.
775 </p><dl compact="compact">
776 <dt> ‘<samp>sad</samp>’</dt>
777 <dd><p>sum of absolute differences, fast (default)
779 <dt> ‘<samp>sse</samp>’</dt>
780 <dd><p>sum of squared errors
782 <dt> ‘<samp>satd</samp>’</dt>
783 <dd><p>sum of absolute Hadamard transformed differences
785 <dt> ‘<samp>dct</samp>’</dt>
786 <dd><p>sum of absolute DCT transformed differences
788 <dt> ‘<samp>psnr</samp>’</dt>
789 <dd><p>sum of squared quantization errors (avoid, low quality)
791 <dt> ‘<samp>bit</samp>’</dt>
792 <dd><p>number of bits needed for the block
794 <dt> ‘<samp>rd</samp>’</dt>
795 <dd><p>rate distortion optimal, slow
797 <dt> ‘<samp>zero</samp>’</dt>
800 <dt> ‘<samp>vsad</samp>’</dt>
801 <dd><p>sum of absolute vertical differences
803 <dt> ‘<samp>vsse</samp>’</dt>
804 <dd><p>sum of squared vertical differences
806 <dt> ‘<samp>nsse</samp>’</dt>
807 <dd><p>noise preserving sum of squared differences
809 <dt> ‘<samp>w53</samp>’</dt>
810 <dd><p>5/3 wavelet, only used in snow
812 <dt> ‘<samp>w97</samp>’</dt>
813 <dd><p>9/7 wavelet, only used in snow
815 <dt> ‘<samp>dctmax</samp>’</dt>
816 <dt> ‘<samp>chroma</samp>’</dt>
820 <dt> ‘<samp>subcmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
821 <dd><p>Set sub pel me compare function.
824 </p><dl compact="compact">
825 <dt> ‘<samp>sad</samp>’</dt>
826 <dd><p>sum of absolute differences, fast (default)
828 <dt> ‘<samp>sse</samp>’</dt>
829 <dd><p>sum of squared errors
831 <dt> ‘<samp>satd</samp>’</dt>
832 <dd><p>sum of absolute Hadamard transformed differences
834 <dt> ‘<samp>dct</samp>’</dt>
835 <dd><p>sum of absolute DCT transformed differences
837 <dt> ‘<samp>psnr</samp>’</dt>
838 <dd><p>sum of squared quantization errors (avoid, low quality)
840 <dt> ‘<samp>bit</samp>’</dt>
841 <dd><p>number of bits needed for the block
843 <dt> ‘<samp>rd</samp>’</dt>
844 <dd><p>rate distortion optimal, slow
846 <dt> ‘<samp>zero</samp>’</dt>
849 <dt> ‘<samp>vsad</samp>’</dt>
850 <dd><p>sum of absolute vertical differences
852 <dt> ‘<samp>vsse</samp>’</dt>
853 <dd><p>sum of squared vertical differences
855 <dt> ‘<samp>nsse</samp>’</dt>
856 <dd><p>noise preserving sum of squared differences
858 <dt> ‘<samp>w53</samp>’</dt>
859 <dd><p>5/3 wavelet, only used in snow
861 <dt> ‘<samp>w97</samp>’</dt>
862 <dd><p>9/7 wavelet, only used in snow
864 <dt> ‘<samp>dctmax</samp>’</dt>
865 <dt> ‘<samp>chroma</samp>’</dt>
869 <dt> ‘<samp>mbcmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
870 <dd><p>Set macroblock compare function.
873 </p><dl compact="compact">
874 <dt> ‘<samp>sad</samp>’</dt>
875 <dd><p>sum of absolute differences, fast (default)
877 <dt> ‘<samp>sse</samp>’</dt>
878 <dd><p>sum of squared errors
880 <dt> ‘<samp>satd</samp>’</dt>
881 <dd><p>sum of absolute Hadamard transformed differences
883 <dt> ‘<samp>dct</samp>’</dt>
884 <dd><p>sum of absolute DCT transformed differences
886 <dt> ‘<samp>psnr</samp>’</dt>
887 <dd><p>sum of squared quantization errors (avoid, low quality)
889 <dt> ‘<samp>bit</samp>’</dt>
890 <dd><p>number of bits needed for the block
892 <dt> ‘<samp>rd</samp>’</dt>
893 <dd><p>rate distortion optimal, slow
895 <dt> ‘<samp>zero</samp>’</dt>
898 <dt> ‘<samp>vsad</samp>’</dt>
899 <dd><p>sum of absolute vertical differences
901 <dt> ‘<samp>vsse</samp>’</dt>
902 <dd><p>sum of squared vertical differences
904 <dt> ‘<samp>nsse</samp>’</dt>
905 <dd><p>noise preserving sum of squared differences
907 <dt> ‘<samp>w53</samp>’</dt>
908 <dd><p>5/3 wavelet, only used in snow
910 <dt> ‘<samp>w97</samp>’</dt>
911 <dd><p>9/7 wavelet, only used in snow
913 <dt> ‘<samp>dctmax</samp>’</dt>
914 <dt> ‘<samp>chroma</samp>’</dt>
918 <dt> ‘<samp>ildctcmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
919 <dd><p>Set interlaced dct compare function.
922 </p><dl compact="compact">
923 <dt> ‘<samp>sad</samp>’</dt>
924 <dd><p>sum of absolute differences, fast (default)
926 <dt> ‘<samp>sse</samp>’</dt>
927 <dd><p>sum of squared errors
929 <dt> ‘<samp>satd</samp>’</dt>
930 <dd><p>sum of absolute Hadamard transformed differences
932 <dt> ‘<samp>dct</samp>’</dt>
933 <dd><p>sum of absolute DCT transformed differences
935 <dt> ‘<samp>psnr</samp>’</dt>
936 <dd><p>sum of squared quantization errors (avoid, low quality)
938 <dt> ‘<samp>bit</samp>’</dt>
939 <dd><p>number of bits needed for the block
941 <dt> ‘<samp>rd</samp>’</dt>
942 <dd><p>rate distortion optimal, slow
944 <dt> ‘<samp>zero</samp>’</dt>
947 <dt> ‘<samp>vsad</samp>’</dt>
948 <dd><p>sum of absolute vertical differences
950 <dt> ‘<samp>vsse</samp>’</dt>
951 <dd><p>sum of squared vertical differences
953 <dt> ‘<samp>nsse</samp>’</dt>
954 <dd><p>noise preserving sum of squared differences
956 <dt> ‘<samp>w53</samp>’</dt>
957 <dd><p>5/3 wavelet, only used in snow
959 <dt> ‘<samp>w97</samp>’</dt>
960 <dd><p>9/7 wavelet, only used in snow
962 <dt> ‘<samp>dctmax</samp>’</dt>
963 <dt> ‘<samp>chroma</samp>’</dt>
967 <dt> ‘<samp>dia_size <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
968 <dd><p>Set diamond type & size for motion estimation.
971 <dt> ‘<samp>last_pred <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
972 <dd><p>Set amount of motion predictors from the previous frame.
975 <dt> ‘<samp>preme <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
976 <dd><p>Set pre motion estimation.
979 <dt> ‘<samp>precmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
980 <dd><p>Set pre motion estimation compare function.
983 </p><dl compact="compact">
984 <dt> ‘<samp>sad</samp>’</dt>
985 <dd><p>sum of absolute differences, fast (default)
987 <dt> ‘<samp>sse</samp>’</dt>
988 <dd><p>sum of squared errors
990 <dt> ‘<samp>satd</samp>’</dt>
991 <dd><p>sum of absolute Hadamard transformed differences
993 <dt> ‘<samp>dct</samp>’</dt>
994 <dd><p>sum of absolute DCT transformed differences
996 <dt> ‘<samp>psnr</samp>’</dt>
997 <dd><p>sum of squared quantization errors (avoid, low quality)
999 <dt> ‘<samp>bit</samp>’</dt>
1000 <dd><p>number of bits needed for the block
1002 <dt> ‘<samp>rd</samp>’</dt>
1003 <dd><p>rate distortion optimal, slow
1005 <dt> ‘<samp>zero</samp>’</dt>
1008 <dt> ‘<samp>vsad</samp>’</dt>
1009 <dd><p>sum of absolute vertical differences
1011 <dt> ‘<samp>vsse</samp>’</dt>
1012 <dd><p>sum of squared vertical differences
1014 <dt> ‘<samp>nsse</samp>’</dt>
1015 <dd><p>noise preserving sum of squared differences
1017 <dt> ‘<samp>w53</samp>’</dt>
1018 <dd><p>5/3 wavelet, only used in snow
1020 <dt> ‘<samp>w97</samp>’</dt>
1021 <dd><p>9/7 wavelet, only used in snow
1023 <dt> ‘<samp>dctmax</samp>’</dt>
1024 <dt> ‘<samp>chroma</samp>’</dt>
1028 <dt> ‘<samp>pre_dia_size <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1029 <dd><p>Set diamond type & size for motion estimation pre-pass.
1032 <dt> ‘<samp>subq <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1033 <dd><p>Set sub pel motion estimation quality.
1036 <dt> ‘<samp>dtg_active_format <var>integer</var></samp>’</dt>
1037 <dt> ‘<samp>me_range <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1038 <dd><p>Set limit motion vectors range (1023 for DivX player).
1041 <dt> ‘<samp>ibias <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1042 <dd><p>Set intra quant bias.
1045 <dt> ‘<samp>pbias <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1046 <dd><p>Set inter quant bias.
1049 <dt> ‘<samp>color_table_id <var>integer</var></samp>’</dt>
1050 <dt> ‘<samp>global_quality <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
1051 <dt> ‘<samp>coder <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1054 </p><dl compact="compact">
1055 <dt> ‘<samp>vlc</samp>’</dt>
1056 <dd><p>variable length coder / huffman coder
1058 <dt> ‘<samp>ac</samp>’</dt>
1059 <dd><p>arithmetic coder
1061 <dt> ‘<samp>raw</samp>’</dt>
1062 <dd><p>raw (no encoding)
1064 <dt> ‘<samp>rle</samp>’</dt>
1065 <dd><p>run-length coder
1067 <dt> ‘<samp>deflate</samp>’</dt>
1068 <dd><p>deflate-based coder
1073 <dt> ‘<samp>context <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1074 <dd><p>Set context model.
1077 <dt> ‘<samp>slice_flags <var>integer</var></samp>’</dt>
1078 <dt> ‘<samp>xvmc_acceleration <var>integer</var></samp>’</dt>
1079 <dt> ‘<samp>mbd <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1080 <dd><p>Set macroblock decision algorithm (high quality mode).
1083 </p><dl compact="compact">
1084 <dt> ‘<samp>simple</samp>’</dt>
1085 <dd><p>use mbcmp (default)
1087 <dt> ‘<samp>bits</samp>’</dt>
1088 <dd><p>use fewest bits
1090 <dt> ‘<samp>rd</samp>’</dt>
1091 <dd><p>use best rate distortion
1096 <dt> ‘<samp>stream_codec_tag <var>integer</var></samp>’</dt>
1097 <dt> ‘<samp>sc_threshold <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1098 <dd><p>Set scene change threshold.
1101 <dt> ‘<samp>lmin <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1102 <dd><p>Set min lagrange factor (VBR).
1105 <dt> ‘<samp>lmax <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1106 <dd><p>Set max lagrange factor (VBR).
1109 <dt> ‘<samp>nr <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1110 <dd><p>Set noise reduction.
1113 <dt> ‘<samp>rc_init_occupancy <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1114 <dd><p>Set number of bits which should be loaded into the rc buffer before
1118 <dt> ‘<samp>flags2 <var>flags</var> (<em>decoding/encoding,audio,video</em>)</samp>’</dt>
1121 </p><dl compact="compact">
1122 <dt> ‘<samp>fast</samp>’</dt>
1123 <dd><p>Allow non spec compliant speedup tricks.
1125 <dt> ‘<samp>sgop</samp>’</dt>
1126 <dd><p>Deprecated, use mpegvideo private options instead.
1128 <dt> ‘<samp>noout</samp>’</dt>
1129 <dd><p>Skip bitstream encoding.
1131 <dt> ‘<samp>ignorecrop</samp>’</dt>
1132 <dd><p>Ignore cropping information from sps.
1134 <dt> ‘<samp>local_header</samp>’</dt>
1135 <dd><p>Place global headers at every keyframe instead of in extradata.
1137 <dt> ‘<samp>chunks</samp>’</dt>
1138 <dd><p>Frame data might be split into multiple chunks.
1140 <dt> ‘<samp>showall</samp>’</dt>
1141 <dd><p>Show all frames before the first keyframe.
1143 <dt> ‘<samp>skiprd</samp>’</dt>
1144 <dd><p>Deprecated, use mpegvideo private options instead.
1149 <dt> ‘<samp>error <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1150 <dt> ‘<samp>qns <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1151 <dd><p>Deprecated, use mpegvideo private options instead.
1154 <dt> ‘<samp>threads <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1157 </p><dl compact="compact">
1158 <dt> ‘<samp>auto</samp>’</dt>
1159 <dd><p>detect a good number of threads
1164 <dt> ‘<samp>me_threshold <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1165 <dd><p>Set motion estimation threshold.
1168 <dt> ‘<samp>mb_threshold <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1169 <dd><p>Set macroblock threshold.
1172 <dt> ‘<samp>dc <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1173 <dd><p>Set intra_dc_precision.
1176 <dt> ‘<samp>nssew <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1177 <dd><p>Set nsse weight.
1180 <dt> ‘<samp>skip_top <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1181 <dd><p>Set number of macroblock rows at the top which are skipped.
1184 <dt> ‘<samp>skip_bottom <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1185 <dd><p>Set number of macroblock rows at the bottom which are skipped.
1188 <dt> ‘<samp>profile <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
1191 </p><dl compact="compact">
1192 <dt> ‘<samp>unknown</samp>’</dt>
1193 <dt> ‘<samp>aac_main</samp>’</dt>
1194 <dt> ‘<samp>aac_low</samp>’</dt>
1195 <dt> ‘<samp>aac_ssr</samp>’</dt>
1196 <dt> ‘<samp>aac_ltp</samp>’</dt>
1197 <dt> ‘<samp>aac_he</samp>’</dt>
1198 <dt> ‘<samp>aac_he_v2</samp>’</dt>
1199 <dt> ‘<samp>aac_ld</samp>’</dt>
1200 <dt> ‘<samp>aac_eld</samp>’</dt>
1201 <dt> ‘<samp>mpeg2_aac_low</samp>’</dt>
1202 <dt> ‘<samp>mpeg2_aac_he</samp>’</dt>
1203 <dt> ‘<samp>dts</samp>’</dt>
1204 <dt> ‘<samp>dts_es</samp>’</dt>
1205 <dt> ‘<samp>dts_96_24</samp>’</dt>
1206 <dt> ‘<samp>dts_hd_hra</samp>’</dt>
1207 <dt> ‘<samp>dts_hd_ma</samp>’</dt>
1211 <dt> ‘<samp>level <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
1214 </p><dl compact="compact">
1215 <dt> ‘<samp>unknown</samp>’</dt>
1219 <dt> ‘<samp>lowres <var>integer</var> (<em>decoding,audio,video</em>)</samp>’</dt>
1220 <dd><p>Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
1223 <dt> ‘<samp>skip_threshold <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1224 <dd><p>Set frame skip threshold.
1227 <dt> ‘<samp>skip_factor <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1228 <dd><p>Set frame skip factor.
1231 <dt> ‘<samp>skip_exp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1232 <dd><p>Set frame skip exponent.
1235 <dt> ‘<samp>skipcmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1236 <dd><p>Set frame skip compare function.
1239 </p><dl compact="compact">
1240 <dt> ‘<samp>sad</samp>’</dt>
1241 <dd><p>sum of absolute differences, fast (default)
1243 <dt> ‘<samp>sse</samp>’</dt>
1244 <dd><p>sum of squared errors
1246 <dt> ‘<samp>satd</samp>’</dt>
1247 <dd><p>sum of absolute Hadamard transformed differences
1249 <dt> ‘<samp>dct</samp>’</dt>
1250 <dd><p>sum of absolute DCT transformed differences
1252 <dt> ‘<samp>psnr</samp>’</dt>
1253 <dd><p>sum of squared quantization errors (avoid, low quality)
1255 <dt> ‘<samp>bit</samp>’</dt>
1256 <dd><p>number of bits needed for the block
1258 <dt> ‘<samp>rd</samp>’</dt>
1259 <dd><p>rate distortion optimal, slow
1261 <dt> ‘<samp>zero</samp>’</dt>
1264 <dt> ‘<samp>vsad</samp>’</dt>
1265 <dd><p>sum of absolute vertical differences
1267 <dt> ‘<samp>vsse</samp>’</dt>
1268 <dd><p>sum of squared vertical differences
1270 <dt> ‘<samp>nsse</samp>’</dt>
1271 <dd><p>noise preserving sum of squared differences
1273 <dt> ‘<samp>w53</samp>’</dt>
1274 <dd><p>5/3 wavelet, only used in snow
1276 <dt> ‘<samp>w97</samp>’</dt>
1277 <dd><p>9/7 wavelet, only used in snow
1279 <dt> ‘<samp>dctmax</samp>’</dt>
1280 <dt> ‘<samp>chroma</samp>’</dt>
1284 <dt> ‘<samp>border_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
1285 <dd><p>Increase the quantizer for macroblocks close to borders.
1288 <dt> ‘<samp>mblmin <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1289 <dd><p>Set min macroblock lagrange factor (VBR).
1292 <dt> ‘<samp>mblmax <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1293 <dd><p>Set max macroblock lagrange factor (VBR).
1296 <dt> ‘<samp>mepc <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1297 <dd><p>Set motion estimation bitrate penalty compensation (1.0 = 256).
1300 <dt> ‘<samp>skip_loop_filter <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1301 <dt> ‘<samp>skip_idct <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1302 <dt> ‘<samp>skip_frame <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1304 <p>Make decoder discard processing depending on the frame type selected
1305 by the option value.
1307 <p>‘<samp>skip_loop_filter</samp>’ skips frame loop filtering, ‘<samp>skip_idct</samp>’
1308 skips frame IDCT/dequantization, ‘<samp>skip_frame</samp>’ skips decoding.
1311 </p><dl compact="compact">
1312 <dt> ‘<samp>none</samp>’</dt>
1313 <dd><p>Discard no frame.
1316 <dt> ‘<samp>default</samp>’</dt>
1317 <dd><p>Discard useless frames like 0-sized frames.
1320 <dt> ‘<samp>noref</samp>’</dt>
1321 <dd><p>Discard all non-reference frames.
1324 <dt> ‘<samp>bidir</samp>’</dt>
1325 <dd><p>Discard all bidirectional frames.
1328 <dt> ‘<samp>nokey</samp>’</dt>
1329 <dd><p>Discard all frames excepts keyframes.
1332 <dt> ‘<samp>all</samp>’</dt>
1333 <dd><p>Discard all frames.
1337 <p>Default value is ‘<samp>default</samp>’.
1340 <dt> ‘<samp>bidir_refine <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1341 <dd><p>Refine the two motion vectors used in bidirectional macroblocks.
1344 <dt> ‘<samp>brd_scale <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1345 <dd><p>Downscale frames for dynamic B-frame decision.
1348 <dt> ‘<samp>keyint_min <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1349 <dd><p>Set minimum interval between IDR-frames.
1352 <dt> ‘<samp>refs <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1353 <dd><p>Set reference frames to consider for motion compensation.
1356 <dt> ‘<samp>chromaoffset <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1357 <dd><p>Set chroma qp offset from luma.
1360 <dt> ‘<samp>trellis <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
1361 <dd><p>Set rate-distortion optimal quantization.
1364 <dt> ‘<samp>sc_factor <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1365 <dd><p>Set value multiplied by qscale for each frame and added to
1369 <dt> ‘<samp>mv0_threshold <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1370 <dt> ‘<samp>b_sensitivity <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1371 <dd><p>Adjust sensitivity of b_frame_strategy 1.
1374 <dt> ‘<samp>compression_level <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
1375 <dt> ‘<samp>min_prediction_order <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
1376 <dt> ‘<samp>max_prediction_order <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
1377 <dt> ‘<samp>timecode_frame_start <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1378 <dd><p>Set GOP timecode frame start number, in non drop frame format.
1381 <dt> ‘<samp>request_channels <var>integer</var> (<em>decoding,audio</em>)</samp>’</dt>
1382 <dd><p>Set desired number of audio channels.
1385 <dt> ‘<samp>bits_per_raw_sample <var>integer</var></samp>’</dt>
1386 <dt> ‘<samp>channel_layout <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>’</dt>
1390 <dt> ‘<samp>request_channel_layout <var>integer</var> (<em>decoding,audio</em>)</samp>’</dt>
1394 <dt> ‘<samp>rc_max_vbv_use <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
1395 <dt> ‘<samp>rc_min_vbv_use <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
1396 <dt> ‘<samp>ticks_per_frame <var>integer</var> (<em>decoding/encoding,audio,video</em>)</samp>’</dt>
1397 <dt> ‘<samp>color_primaries <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1398 <dt> ‘<samp>color_trc <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1399 <dt> ‘<samp>colorspace <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1400 <dt> ‘<samp>color_range <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1401 <dt> ‘<samp>chroma_sample_location <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1402 <dt> ‘<samp>log_level_offset <var>integer</var></samp>’</dt>
1403 <dd><p>Set the log level offset.
1406 <dt> ‘<samp>slices <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1407 <dd><p>Number of slices, used in parallelized encoding.
1410 <dt> ‘<samp>thread_type <var>flags</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1411 <dd><p>Select multithreading type.
1414 </p><dl compact="compact">
1415 <dt> ‘<samp>slice</samp>’</dt>
1416 <dt> ‘<samp>frame</samp>’</dt>
1419 <dt> ‘<samp>audio_service_type <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
1420 <dd><p>Set audio service type.
1423 </p><dl compact="compact">
1424 <dt> ‘<samp>ma</samp>’</dt>
1425 <dd><p>Main Audio Service
1427 <dt> ‘<samp>ef</samp>’</dt>
1430 <dt> ‘<samp>vi</samp>’</dt>
1431 <dd><p>Visually Impaired
1433 <dt> ‘<samp>hi</samp>’</dt>
1434 <dd><p>Hearing Impaired
1436 <dt> ‘<samp>di</samp>’</dt>
1439 <dt> ‘<samp>co</samp>’</dt>
1442 <dt> ‘<samp>em</samp>’</dt>
1445 <dt> ‘<samp>vo</samp>’</dt>
1448 <dt> ‘<samp>ka</samp>’</dt>
1454 <dt> ‘<samp>request_sample_fmt <var>sample_fmt</var> (<em>decoding,audio</em>)</samp>’</dt>
1455 <dd><p>Set sample format audio decoders should prefer. Default value is
1459 <dt> ‘<samp>pkt_timebase <var>rational number</var></samp>’</dt>
1460 <dt> ‘<samp>sub_charenc <var>encoding</var> (<em>decoding,subtitles</em>)</samp>’</dt>
1461 <dd><p>Set the input subtitles character encoding.
1464 <dt> ‘<samp>field_order <var>field_order</var> (<em>video</em>)</samp>’</dt>
1465 <dd><p>Set/override the field order of the video.
1467 </p><dl compact="compact">
1468 <dt> ‘<samp>progressive</samp>’</dt>
1469 <dd><p>Progressive video
1471 <dt> ‘<samp>tt</samp>’</dt>
1472 <dd><p>Interlaced video, top field coded and displayed first
1474 <dt> ‘<samp>bb</samp>’</dt>
1475 <dd><p>Interlaced video, bottom field coded and displayed first
1477 <dt> ‘<samp>tb</samp>’</dt>
1478 <dd><p>Interlaced video, top coded first, bottom displayed first
1480 <dt> ‘<samp>bt</samp>’</dt>
1481 <dd><p>Interlaced video, bottom coded first, top displayed first
1486 <dt> ‘<samp>skip_alpha <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1487 <dd><p>Set to 1 to disable processing alpha (transparency). This works like the
1488 ‘<samp>gray</samp>’ flag in the ‘<samp>flags</samp>’ option which skips chroma information
1489 instead of alpha. Default is 0.
1494 <a name="Decoders"></a>
1495 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Decoders">3. Decoders</a></h1>
1497 <p>Decoders are configured elements in FFmpeg which allow the decoding of
1500 <p>When you configure your FFmpeg build, all the supported native decoders
1501 are enabled by default. Decoders requiring an external library must be enabled
1502 manually via the corresponding <code>--enable-lib</code> option. You can list all
1503 available decoders using the configure option <code>--list-decoders</code>.
1505 <p>You can disable all the decoders with the configure option
1506 <code>--disable-decoders</code> and selectively enable / disable single decoders
1507 with the options <code>--enable-decoder=<var>DECODER</var></code> /
1508 <code>--disable-decoder=<var>DECODER</var></code>.
1510 <p>The option <code>-codecs</code> of the ff* tools will display the list of
1514 <a name="Video-Decoders"></a>
1515 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Video-Decoders">4. Video Decoders</a></h1>
1517 <p>A description of some of the currently available video decoders
1520 <a name="rawvideo"></a>
1521 <h2 class="section"><a href="ffmpeg-codecs.html#toc-rawvideo">4.1 rawvideo</a></h2>
1523 <p>Raw video decoder.
1525 <p>This decoder decodes rawvideo streams.
1527 <a name="Options-17"></a>
1528 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-17">4.1.1 Options</a></h3>
1530 <dl compact="compact">
1531 <dt> ‘<samp>top <var>top_field_first</var></samp>’</dt>
1532 <dd><p>Specify the assumed field type of the input video.
1533 </p><dl compact="compact">
1534 <dt> ‘<samp>-1</samp>’</dt>
1535 <dd><p>the video is assumed to be progressive (default)
1537 <dt> ‘<samp>0</samp>’</dt>
1538 <dd><p>bottom-field-first is assumed
1540 <dt> ‘<samp>1</samp>’</dt>
1541 <dd><p>top-field-first is assumed
1549 <a name="Audio-Decoders"></a>
1550 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Audio-Decoders">5. Audio Decoders</a></h1>
1552 <a name="ffwavesynth"></a>
1553 <h2 class="section"><a href="ffmpeg-codecs.html#toc-ffwavesynth">5.1 ffwavesynth</a></h2>
1555 <p>Internal wave synthetizer.
1557 <p>This decoder generates wave patterns according to predefined sequences. Its
1558 use is purely internal and the format of the data it accepts is not publicly
1561 <a name="libcelt"></a>
1562 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libcelt">5.2 libcelt</a></h2>
1564 <p>libcelt decoder wrapper.
1566 <p>libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
1567 Requires the presence of the libcelt headers and library during configuration.
1568 You need to explicitly configure the build with <code>--enable-libcelt</code>.
1570 <a name="libgsm"></a>
1571 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libgsm">5.3 libgsm</a></h2>
1573 <p>libgsm decoder wrapper.
1575 <p>libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
1576 the presence of the libgsm headers and library during configuration. You need
1577 to explicitly configure the build with <code>--enable-libgsm</code>.
1579 <p>This decoder supports both the ordinary GSM and the Microsoft variant.
1581 <a name="libilbc"></a>
1582 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libilbc">5.4 libilbc</a></h2>
1584 <p>libilbc decoder wrapper.
1586 <p>libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
1587 audio codec. Requires the presence of the libilbc headers and library during
1588 configuration. You need to explicitly configure the build with
1589 <code>--enable-libilbc</code>.
1591 <a name="Options-13"></a>
1592 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-13">5.4.1 Options</a></h3>
1594 <p>The following option is supported by the libilbc wrapper.
1596 <dl compact="compact">
1597 <dt> ‘<samp>enhance</samp>’</dt>
1599 <p>Enable the enhancement of the decoded audio when set to 1. The default
1600 value is 0 (disabled).
1605 <a name="libopencore_002damrnb"></a>
1606 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopencore_002damrnb">5.5 libopencore-amrnb</a></h2>
1608 <p>libopencore-amrnb decoder wrapper.
1610 <p>libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
1611 Narrowband audio codec. Using it requires the presence of the
1612 libopencore-amrnb headers and library during configuration. You need to
1613 explicitly configure the build with <code>--enable-libopencore-amrnb</code>.
1615 <p>An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
1616 without this library.
1618 <a name="libopencore_002damrwb"></a>
1619 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopencore_002damrwb">5.6 libopencore-amrwb</a></h2>
1621 <p>libopencore-amrwb decoder wrapper.
1623 <p>libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
1624 Wideband audio codec. Using it requires the presence of the
1625 libopencore-amrwb headers and library during configuration. You need to
1626 explicitly configure the build with <code>--enable-libopencore-amrwb</code>.
1628 <p>An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
1629 without this library.
1631 <a name="libopus"></a>
1632 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopus">5.7 libopus</a></h2>
1634 <p>libopus decoder wrapper.
1636 <p>libopus allows libavcodec to decode the Opus Interactive Audio Codec.
1637 Requires the presence of the libopus headers and library during
1638 configuration. You need to explicitly configure the build with
1639 <code>--enable-libopus</code>.
1642 <a name="Subtitles-Decoders"></a>
1643 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Subtitles-Decoders">6. Subtitles Decoders</a></h1>
1645 <a name="dvdsub"></a>
1646 <h2 class="section"><a href="ffmpeg-codecs.html#toc-dvdsub">6.1 dvdsub</a></h2>
1648 <p>This codec decodes the bitmap subtitles used in DVDs; the same subtitles can
1649 also be found in VobSub file pairs and in some Matroska files.
1651 <a name="Options-7"></a>
1652 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-7">6.1.1 Options</a></h3>
1654 <dl compact="compact">
1655 <dt> ‘<samp>palette</samp>’</dt>
1656 <dd><p>Specify the global palette used by the bitmaps. When stored in VobSub, the
1657 palette is normally specified in the index file; in Matroska, the palette is
1658 stored in the codec extra-data in the same format as in VobSub. In DVDs, the
1659 palette is stored in the IFO file, and therefore not available when reading
1660 from dumped VOB files.
1662 <p>The format for this option is a string containing 16 24-bits hexadecimal
1663 numbers (without 0x prefix) separated by comas, for example <code>0d00ee,
1664 ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
1665 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b</code>.
1669 <a name="libzvbi_002dteletext"></a>
1670 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libzvbi_002dteletext">6.2 libzvbi-teletext</a></h2>
1672 <p>Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
1673 subtitles. Requires the presence of the libzvbi headers and library during
1674 configuration. You need to explicitly configure the build with
1675 <code>--enable-libzvbi</code>.
1677 <a name="Options-11"></a>
1678 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-11">6.2.1 Options</a></h3>
1680 <dl compact="compact">
1681 <dt> ‘<samp>txt_page</samp>’</dt>
1682 <dd><p>List of teletext page numbers to decode. You may use the special * string to
1683 match all pages. Pages that do not match the specified list are dropped.
1686 <dt> ‘<samp>txt_chop_top</samp>’</dt>
1687 <dd><p>Discards the top teletext line. Default value is 1.
1689 <dt> ‘<samp>txt_format</samp>’</dt>
1690 <dd><p>Specifies the format of the decoded subtitles. The teletext decoder is capable
1691 of decoding the teletext pages to bitmaps or to simple text, you should use
1692 "bitmap" for teletext pages, because certain graphics and colors cannot be
1693 expressed in simple text. You might use "text" for teletext based subtitles if
1694 your application can handle simple text based subtitles. Default value is
1697 <dt> ‘<samp>txt_left</samp>’</dt>
1698 <dd><p>X offset of generated bitmaps, default is 0.
1700 <dt> ‘<samp>txt_top</samp>’</dt>
1701 <dd><p>Y offset of generated bitmaps, default is 0.
1703 <dt> ‘<samp>txt_chop_spaces</samp>’</dt>
1704 <dd><p>Chops leading and trailing spaces and removes empty lines from the generated
1705 text. This option is useful for teletext based subtitles where empty spaces may
1706 be present at the start or at the end of the lines or empty lines may be
1707 present between the subtitle lines because of double-sized teletext charactes.
1710 <dt> ‘<samp>txt_duration</samp>’</dt>
1711 <dd><p>Sets the display duration of the decoded teletext pages or subtitles in
1712 miliseconds. Default value is 30000 which is 30 seconds.
1714 <dt> ‘<samp>txt_transparent</samp>’</dt>
1715 <dd><p>Force transparent background of the generated teletext bitmaps. Default value
1716 is 0 which means an opaque (black) background.
1720 <a name="Encoders"></a>
1721 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Encoders">7. Encoders</a></h1>
1723 <p>Encoders are configured elements in FFmpeg which allow the encoding of
1726 <p>When you configure your FFmpeg build, all the supported native encoders
1727 are enabled by default. Encoders requiring an external library must be enabled
1728 manually via the corresponding <code>--enable-lib</code> option. You can list all
1729 available encoders using the configure option <code>--list-encoders</code>.
1731 <p>You can disable all the encoders with the configure option
1732 <code>--disable-encoders</code> and selectively enable / disable single encoders
1733 with the options <code>--enable-encoder=<var>ENCODER</var></code> /
1734 <code>--disable-encoder=<var>ENCODER</var></code>.
1736 <p>The option <code>-codecs</code> of the ff* tools will display the list of
1740 <a name="Audio-Encoders"></a>
1741 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Audio-Encoders">8. Audio Encoders</a></h1>
1743 <p>A description of some of the currently available audio encoders
1746 <p><a name="aacenc"></a>
1747 </p><a name="aac"></a>
1748 <h2 class="section"><a href="ffmpeg-codecs.html#toc-aac">8.1 aac</a></h2>
1750 <p>Advanced Audio Coding (AAC) encoder.
1752 <p>This encoder is an experimental FFmpeg-native AAC encoder. Currently only the
1753 low complexity (AAC-LC) profile is supported. To use this encoder, you must set
1754 ‘<samp>strict</samp>’ option to ‘<samp>experimental</samp>’ or lower.
1756 <p>As this encoder is experimental, unexpected behavior may exist from time to
1757 time. For a more stable AAC encoder, see <a href="#libvo_002daacenc">libvo-aacenc</a>. However, be warned
1758 that it has a worse quality reported by some users.
1760 <p>See also <a href="#libfdk_002daac_002denc">libfdk_aac</a> and <a href="#libfaac">libfaac</a>.
1762 <a name="Options-8"></a>
1763 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-8">8.1.1 Options</a></h3>
1765 <dl compact="compact">
1766 <dt> ‘<samp>b</samp>’</dt>
1767 <dd><p>Set bit rate in bits/s. Setting this automatically activates constant bit rate
1771 <dt> ‘<samp>q</samp>’</dt>
1772 <dd><p>Set quality for variable bit rate (VBR) mode. This option is valid only using
1773 the <code>ffmpeg</code> command-line tool. For library interface users, use
1774 ‘<samp>global_quality</samp>’.
1777 <dt> ‘<samp>stereo_mode</samp>’</dt>
1778 <dd><p>Set stereo encoding mode. Possible values:
1780 <dl compact="compact">
1781 <dt> ‘<samp>auto</samp>’</dt>
1782 <dd><p>Automatically selected by the encoder.
1785 <dt> ‘<samp>ms_off</samp>’</dt>
1786 <dd><p>Disable middle/side encoding. This is the default.
1789 <dt> ‘<samp>ms_force</samp>’</dt>
1790 <dd><p>Force middle/side encoding.
1795 <dt> ‘<samp>aac_coder</samp>’</dt>
1796 <dd><p>Set AAC encoder coding method. Possible values:
1798 <dl compact="compact">
1799 <dt> ‘<samp>faac</samp>’</dt>
1800 <dd><p>FAAC-inspired method.
1802 <p>This method is a simplified reimplementation of the method used in FAAC, which
1803 sets thresholds proportional to the band energies, and then decreases all the
1804 thresholds with quantizer steps to find the appropriate quantization with
1805 distortion below threshold band by band.
1807 <p>The quality of this method is comparable to the two loop searching method
1808 descibed below, but somewhat a little better and slower.
1811 <dt> ‘<samp>anmr</samp>’</dt>
1812 <dd><p>Average noise to mask ratio (ANMR) trellis-based solution.
1814 <p>This has a theoretic best quality out of all the coding methods, but at the
1815 cost of the slowest speed.
1818 <dt> ‘<samp>twoloop</samp>’</dt>
1819 <dd><p>Two loop searching (TLS) method.
1821 <p>This method first sets quantizers depending on band thresholds and then tries
1822 to find an optimal combination by adding or subtracting a specific value from
1823 all quantizers and adjusting some individual quantizer a little.
1825 <p>This method produces similar quality with the FAAC method and is the default.
1828 <dt> ‘<samp>fast</samp>’</dt>
1829 <dd><p>Constant quantizer method.
1831 <p>This method sets a constant quantizer for all bands. This is the fastest of all
1832 the methods, yet produces the worst quality.
1840 <a name="ac3-and-ac3_005ffixed"></a>
1841 <h2 class="section"><a href="ffmpeg-codecs.html#toc-ac3-and-ac3_005ffixed">8.2 ac3 and ac3_fixed</a></h2>
1843 <p>AC-3 audio encoders.
1845 <p>These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as
1846 the undocumented RealAudio 3 (a.k.a. dnet).
1848 <p>The <var>ac3</var> encoder uses floating-point math, while the <var>ac3_fixed</var>
1849 encoder only uses fixed-point integer math. This does not mean that one is
1850 always faster, just that one or the other may be better suited to a
1851 particular system. The floating-point encoder will generally produce better
1852 quality audio for a given bitrate. The <var>ac3_fixed</var> encoder is not the
1853 default codec for any of the output formats, so it must be specified explicitly
1854 using the option <code>-acodec ac3_fixed</code> in order to use it.
1856 <a name="AC_002d3-Metadata"></a>
1857 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-AC_002d3-Metadata">8.2.1 AC-3 Metadata</a></h3>
1859 <p>The AC-3 metadata options are used to set parameters that describe the audio,
1860 but in most cases do not affect the audio encoding itself. Some of the options
1861 do directly affect or influence the decoding and playback of the resulting
1862 bitstream, while others are just for informational purposes. A few of the
1863 options will add bits to the output stream that could otherwise be used for
1864 audio data, and will thus affect the quality of the output. Those will be
1865 indicated accordingly with a note in the option list below.
1867 <p>These parameters are described in detail in several publicly-available
1870 <li> <a href="http://www.atsc.org/cms/standards/a_52-2010.pdf">A/52:2010 - Digital Audio Compression (AC-3) (E-AC-3) Standard</a>
1871 </li><li> <a href="http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf">A/54 - Guide to the Use of the ATSC Digital Television Standard</a>
1872 </li><li> <a href="http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf">Dolby Metadata Guide</a>
1873 </li><li> <a href="http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf">Dolby Digital Professional Encoding Guidelines</a>
1876 <a name="Metadata-Control-Options"></a>
1877 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Metadata-Control-Options">8.2.1.1 Metadata Control Options</a></h4>
1879 <dl compact="compact">
1880 <dt> ‘<samp>-per_frame_metadata <var>boolean</var></samp>’</dt>
1881 <dd><p>Allow Per-Frame Metadata. Specifies if the encoder should check for changing
1882 metadata for each frame.
1883 </p><dl compact="compact">
1884 <dt> ‘<samp>0</samp>’</dt>
1885 <dd><p>The metadata values set at initialization will be used for every frame in the
1888 <dt> ‘<samp>1</samp>’</dt>
1889 <dd><p>Metadata values can be changed before encoding each frame.
1896 <a name="Downmix-Levels"></a>
1897 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Downmix-Levels">8.2.1.2 Downmix Levels</a></h4>
1899 <dl compact="compact">
1900 <dt> ‘<samp>-center_mixlev <var>level</var></samp>’</dt>
1901 <dd><p>Center Mix Level. The amount of gain the decoder should apply to the center
1902 channel when downmixing to stereo. This field will only be written to the
1903 bitstream if a center channel is present. The value is specified as a scale
1904 factor. There are 3 valid values:
1905 </p><dl compact="compact">
1906 <dt> ‘<samp>0.707</samp>’</dt>
1907 <dd><p>Apply -3dB gain
1909 <dt> ‘<samp>0.595</samp>’</dt>
1910 <dd><p>Apply -4.5dB gain (default)
1912 <dt> ‘<samp>0.500</samp>’</dt>
1913 <dd><p>Apply -6dB gain
1918 <dt> ‘<samp>-surround_mixlev <var>level</var></samp>’</dt>
1919 <dd><p>Surround Mix Level. The amount of gain the decoder should apply to the surround
1920 channel(s) when downmixing to stereo. This field will only be written to the
1921 bitstream if one or more surround channels are present. The value is specified
1922 as a scale factor. There are 3 valid values:
1923 </p><dl compact="compact">
1924 <dt> ‘<samp>0.707</samp>’</dt>
1925 <dd><p>Apply -3dB gain
1927 <dt> ‘<samp>0.500</samp>’</dt>
1928 <dd><p>Apply -6dB gain (default)
1930 <dt> ‘<samp>0.000</samp>’</dt>
1931 <dd><p>Silence Surround Channel(s)
1938 <a name="Audio-Production-Information"></a>
1939 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Audio-Production-Information">8.2.1.3 Audio Production Information</a></h4>
1940 <p>Audio Production Information is optional information describing the mixing
1941 environment. Either none or both of the fields are written to the bitstream.
1943 <dl compact="compact">
1944 <dt> ‘<samp>-mixing_level <var>number</var></samp>’</dt>
1945 <dd><p>Mixing Level. Specifies peak sound pressure level (SPL) in the production
1946 environment when the mix was mastered. Valid values are 80 to 111, or -1 for
1947 unknown or not indicated. The default value is -1, but that value cannot be
1948 used if the Audio Production Information is written to the bitstream. Therefore,
1949 if the <code>room_type</code> option is not the default value, the <code>mixing_level</code>
1950 option must not be -1.
1953 <dt> ‘<samp>-room_type <var>type</var></samp>’</dt>
1954 <dd><p>Room Type. Describes the equalization used during the final mixing session at
1955 the studio or on the dubbing stage. A large room is a dubbing stage with the
1956 industry standard X-curve equalization; a small room has flat equalization.
1957 This field will not be written to the bitstream if both the <code>mixing_level</code>
1958 option and the <code>room_type</code> option have the default values.
1959 </p><dl compact="compact">
1960 <dt> ‘<samp>0</samp>’</dt>
1961 <dt> ‘<samp>notindicated</samp>’</dt>
1962 <dd><p>Not Indicated (default)
1964 <dt> ‘<samp>1</samp>’</dt>
1965 <dt> ‘<samp>large</samp>’</dt>
1968 <dt> ‘<samp>2</samp>’</dt>
1969 <dt> ‘<samp>small</samp>’</dt>
1977 <a name="Other-Metadata-Options"></a>
1978 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Other-Metadata-Options">8.2.1.4 Other Metadata Options</a></h4>
1980 <dl compact="compact">
1981 <dt> ‘<samp>-copyright <var>boolean</var></samp>’</dt>
1982 <dd><p>Copyright Indicator. Specifies whether a copyright exists for this audio.
1983 </p><dl compact="compact">
1984 <dt> ‘<samp>0</samp>’</dt>
1985 <dt> ‘<samp>off</samp>’</dt>
1986 <dd><p>No Copyright Exists (default)
1988 <dt> ‘<samp>1</samp>’</dt>
1989 <dt> ‘<samp>on</samp>’</dt>
1990 <dd><p>Copyright Exists
1995 <dt> ‘<samp>-dialnorm <var>value</var></samp>’</dt>
1996 <dd><p>Dialogue Normalization. Indicates how far the average dialogue level of the
1997 program is below digital 100% full scale (0 dBFS). This parameter determines a
1998 level shift during audio reproduction that sets the average volume of the
1999 dialogue to a preset level. The goal is to match volume level between program
2000 sources. A value of -31dB will result in no volume level change, relative to
2001 the source volume, during audio reproduction. Valid values are whole numbers in
2002 the range -31 to -1, with -31 being the default.
2005 <dt> ‘<samp>-dsur_mode <var>mode</var></samp>’</dt>
2006 <dd><p>Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround
2007 (Pro Logic). This field will only be written to the bitstream if the audio
2008 stream is stereo. Using this option does <b>NOT</b> mean the encoder will actually
2009 apply Dolby Surround processing.
2010 </p><dl compact="compact">
2011 <dt> ‘<samp>0</samp>’</dt>
2012 <dt> ‘<samp>notindicated</samp>’</dt>
2013 <dd><p>Not Indicated (default)
2015 <dt> ‘<samp>1</samp>’</dt>
2016 <dt> ‘<samp>off</samp>’</dt>
2017 <dd><p>Not Dolby Surround Encoded
2019 <dt> ‘<samp>2</samp>’</dt>
2020 <dt> ‘<samp>on</samp>’</dt>
2021 <dd><p>Dolby Surround Encoded
2026 <dt> ‘<samp>-original <var>boolean</var></samp>’</dt>
2027 <dd><p>Original Bit Stream Indicator. Specifies whether this audio is from the
2028 original source and not a copy.
2029 </p><dl compact="compact">
2030 <dt> ‘<samp>0</samp>’</dt>
2031 <dt> ‘<samp>off</samp>’</dt>
2032 <dd><p>Not Original Source
2034 <dt> ‘<samp>1</samp>’</dt>
2035 <dt> ‘<samp>on</samp>’</dt>
2036 <dd><p>Original Source (default)
2043 <a name="Extended-Bitstream-Information"></a>
2044 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Extended-Bitstream-Information">8.2.2 Extended Bitstream Information</a></h3>
2045 <p>The extended bitstream options are part of the Alternate Bit Stream Syntax as
2046 specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.
2047 If any one parameter in a group is specified, all values in that group will be
2048 written to the bitstream. Default values are used for those that are written
2049 but have not been specified. If the mixing levels are written, the decoder
2050 will use these values instead of the ones specified in the <code>center_mixlev</code>
2051 and <code>surround_mixlev</code> options if it supports the Alternate Bit Stream
2054 <a name="Extended-Bitstream-Information-_002d-Part-1"></a>
2055 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Extended-Bitstream-Information-_002d-Part-1">8.2.2.1 Extended Bitstream Information - Part 1</a></h4>
2057 <dl compact="compact">
2058 <dt> ‘<samp>-dmix_mode <var>mode</var></samp>’</dt>
2059 <dd><p>Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt
2060 (Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.
2061 </p><dl compact="compact">
2062 <dt> ‘<samp>0</samp>’</dt>
2063 <dt> ‘<samp>notindicated</samp>’</dt>
2064 <dd><p>Not Indicated (default)
2066 <dt> ‘<samp>1</samp>’</dt>
2067 <dt> ‘<samp>ltrt</samp>’</dt>
2068 <dd><p>Lt/Rt Downmix Preferred
2070 <dt> ‘<samp>2</samp>’</dt>
2071 <dt> ‘<samp>loro</samp>’</dt>
2072 <dd><p>Lo/Ro Downmix Preferred
2077 <dt> ‘<samp>-ltrt_cmixlev <var>level</var></samp>’</dt>
2078 <dd><p>Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the
2079 center channel when downmixing to stereo in Lt/Rt mode.
2080 </p><dl compact="compact">
2081 <dt> ‘<samp>1.414</samp>’</dt>
2082 <dd><p>Apply +3dB gain
2084 <dt> ‘<samp>1.189</samp>’</dt>
2085 <dd><p>Apply +1.5dB gain
2087 <dt> ‘<samp>1.000</samp>’</dt>
2088 <dd><p>Apply 0dB gain
2090 <dt> ‘<samp>0.841</samp>’</dt>
2091 <dd><p>Apply -1.5dB gain
2093 <dt> ‘<samp>0.707</samp>’</dt>
2094 <dd><p>Apply -3.0dB gain
2096 <dt> ‘<samp>0.595</samp>’</dt>
2097 <dd><p>Apply -4.5dB gain (default)
2099 <dt> ‘<samp>0.500</samp>’</dt>
2100 <dd><p>Apply -6.0dB gain
2102 <dt> ‘<samp>0.000</samp>’</dt>
2103 <dd><p>Silence Center Channel
2108 <dt> ‘<samp>-ltrt_surmixlev <var>level</var></samp>’</dt>
2109 <dd><p>Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the
2110 surround channel(s) when downmixing to stereo in Lt/Rt mode.
2111 </p><dl compact="compact">
2112 <dt> ‘<samp>0.841</samp>’</dt>
2113 <dd><p>Apply -1.5dB gain
2115 <dt> ‘<samp>0.707</samp>’</dt>
2116 <dd><p>Apply -3.0dB gain
2118 <dt> ‘<samp>0.595</samp>’</dt>
2119 <dd><p>Apply -4.5dB gain
2121 <dt> ‘<samp>0.500</samp>’</dt>
2122 <dd><p>Apply -6.0dB gain (default)
2124 <dt> ‘<samp>0.000</samp>’</dt>
2125 <dd><p>Silence Surround Channel(s)
2130 <dt> ‘<samp>-loro_cmixlev <var>level</var></samp>’</dt>
2131 <dd><p>Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the
2132 center channel when downmixing to stereo in Lo/Ro mode.
2133 </p><dl compact="compact">
2134 <dt> ‘<samp>1.414</samp>’</dt>
2135 <dd><p>Apply +3dB gain
2137 <dt> ‘<samp>1.189</samp>’</dt>
2138 <dd><p>Apply +1.5dB gain
2140 <dt> ‘<samp>1.000</samp>’</dt>
2141 <dd><p>Apply 0dB gain
2143 <dt> ‘<samp>0.841</samp>’</dt>
2144 <dd><p>Apply -1.5dB gain
2146 <dt> ‘<samp>0.707</samp>’</dt>
2147 <dd><p>Apply -3.0dB gain
2149 <dt> ‘<samp>0.595</samp>’</dt>
2150 <dd><p>Apply -4.5dB gain (default)
2152 <dt> ‘<samp>0.500</samp>’</dt>
2153 <dd><p>Apply -6.0dB gain
2155 <dt> ‘<samp>0.000</samp>’</dt>
2156 <dd><p>Silence Center Channel
2161 <dt> ‘<samp>-loro_surmixlev <var>level</var></samp>’</dt>
2162 <dd><p>Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the
2163 surround channel(s) when downmixing to stereo in Lo/Ro mode.
2164 </p><dl compact="compact">
2165 <dt> ‘<samp>0.841</samp>’</dt>
2166 <dd><p>Apply -1.5dB gain
2168 <dt> ‘<samp>0.707</samp>’</dt>
2169 <dd><p>Apply -3.0dB gain
2171 <dt> ‘<samp>0.595</samp>’</dt>
2172 <dd><p>Apply -4.5dB gain
2174 <dt> ‘<samp>0.500</samp>’</dt>
2175 <dd><p>Apply -6.0dB gain (default)
2177 <dt> ‘<samp>0.000</samp>’</dt>
2178 <dd><p>Silence Surround Channel(s)
2185 <a name="Extended-Bitstream-Information-_002d-Part-2"></a>
2186 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Extended-Bitstream-Information-_002d-Part-2">8.2.2.2 Extended Bitstream Information - Part 2</a></h4>
2188 <dl compact="compact">
2189 <dt> ‘<samp>-dsurex_mode <var>mode</var></samp>’</dt>
2190 <dd><p>Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX
2191 (7.1 matrixed to 5.1). Using this option does <b>NOT</b> mean the encoder will actually
2192 apply Dolby Surround EX processing.
2193 </p><dl compact="compact">
2194 <dt> ‘<samp>0</samp>’</dt>
2195 <dt> ‘<samp>notindicated</samp>’</dt>
2196 <dd><p>Not Indicated (default)
2198 <dt> ‘<samp>1</samp>’</dt>
2199 <dt> ‘<samp>on</samp>’</dt>
2200 <dd><p>Dolby Surround EX Off
2202 <dt> ‘<samp>2</samp>’</dt>
2203 <dt> ‘<samp>off</samp>’</dt>
2204 <dd><p>Dolby Surround EX On
2209 <dt> ‘<samp>-dheadphone_mode <var>mode</var></samp>’</dt>
2210 <dd><p>Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone
2211 encoding (multi-channel matrixed to 2.0 for use with headphones). Using this
2212 option does <b>NOT</b> mean the encoder will actually apply Dolby Headphone
2214 </p><dl compact="compact">
2215 <dt> ‘<samp>0</samp>’</dt>
2216 <dt> ‘<samp>notindicated</samp>’</dt>
2217 <dd><p>Not Indicated (default)
2219 <dt> ‘<samp>1</samp>’</dt>
2220 <dt> ‘<samp>on</samp>’</dt>
2221 <dd><p>Dolby Headphone Off
2223 <dt> ‘<samp>2</samp>’</dt>
2224 <dt> ‘<samp>off</samp>’</dt>
2225 <dd><p>Dolby Headphone On
2230 <dt> ‘<samp>-ad_conv_type <var>type</var></samp>’</dt>
2231 <dd><p>A/D Converter Type. Indicates whether the audio has passed through HDCD A/D
2233 </p><dl compact="compact">
2234 <dt> ‘<samp>0</samp>’</dt>
2235 <dt> ‘<samp>standard</samp>’</dt>
2236 <dd><p>Standard A/D Converter (default)
2238 <dt> ‘<samp>1</samp>’</dt>
2239 <dt> ‘<samp>hdcd</samp>’</dt>
2240 <dd><p>HDCD A/D Converter
2247 <a name="Other-AC_002d3-Encoding-Options"></a>
2248 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Other-AC_002d3-Encoding-Options">8.2.3 Other AC-3 Encoding Options</a></h3>
2250 <dl compact="compact">
2251 <dt> ‘<samp>-stereo_rematrixing <var>boolean</var></samp>’</dt>
2252 <dd><p>Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
2253 is an optional AC-3 feature that increases quality by selectively encoding
2254 the left/right channels as mid/side. This option is enabled by default, and it
2255 is highly recommended that it be left as enabled except for testing purposes.
2260 <a name="Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options"></a>
2261 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options">8.2.4 Floating-Point-Only AC-3 Encoding Options</a></h3>
2263 <p>These options are only valid for the floating-point encoder and do not exist
2264 for the fixed-point encoder due to the corresponding features not being
2265 implemented in fixed-point.
2267 <dl compact="compact">
2268 <dt> ‘<samp>-channel_coupling <var>boolean</var></samp>’</dt>
2269 <dd><p>Enables/Disables use of channel coupling, which is an optional AC-3 feature
2270 that increases quality by combining high frequency information from multiple
2271 channels into a single channel. The per-channel high frequency information is
2272 sent with less accuracy in both the frequency and time domains. This allows
2273 more bits to be used for lower frequencies while preserving enough information
2274 to reconstruct the high frequencies. This option is enabled by default for the
2275 floating-point encoder and should generally be left as enabled except for
2276 testing purposes or to increase encoding speed.
2277 </p><dl compact="compact">
2278 <dt> ‘<samp>-1</samp>’</dt>
2279 <dt> ‘<samp>auto</samp>’</dt>
2280 <dd><p>Selected by Encoder (default)
2282 <dt> ‘<samp>0</samp>’</dt>
2283 <dt> ‘<samp>off</samp>’</dt>
2284 <dd><p>Disable Channel Coupling
2286 <dt> ‘<samp>1</samp>’</dt>
2287 <dt> ‘<samp>on</samp>’</dt>
2288 <dd><p>Enable Channel Coupling
2293 <dt> ‘<samp>-cpl_start_band <var>number</var></samp>’</dt>
2294 <dd><p>Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a
2295 value higher than the bandwidth is used, it will be reduced to 1 less than the
2296 coupling end band. If <var>auto</var> is used, the start band will be determined by
2297 the encoder based on the bit rate, sample rate, and channel layout. This option
2298 has no effect if channel coupling is disabled.
2299 </p><dl compact="compact">
2300 <dt> ‘<samp>-1</samp>’</dt>
2301 <dt> ‘<samp>auto</samp>’</dt>
2302 <dd><p>Selected by Encoder (default)
2309 <p><a name="libfaac"></a>
2310 </p><a name="libfaac-1"></a>
2311 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libfaac-1">8.3 libfaac</a></h2>
2313 <p>libfaac AAC (Advanced Audio Coding) encoder wrapper.
2315 <p>Requires the presence of the libfaac headers and library during
2316 configuration. You need to explicitly configure the build with
2317 <code>--enable-libfaac --enable-nonfree</code>.
2319 <p>This encoder is considered to be of higher quality with respect to the
2320 <a href="#aacenc">the native experimental FFmpeg AAC encoder</a>.
2322 <p>For more information see the libfaac project at
2323 <a href="http://www.audiocoding.com/faac.html/">http://www.audiocoding.com/faac.html/</a>.
2325 <a name="Options-10"></a>
2326 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-10">8.3.1 Options</a></h3>
2328 <p>The following shared FFmpeg codec options are recognized.
2330 <p>The following options are supported by the libfaac wrapper. The
2331 <code>faac</code>-equivalent of the options are listed in parentheses.
2333 <dl compact="compact">
2334 <dt> ‘<samp>b (<em>-b</em>)</samp>’</dt>
2335 <dd><p>Set bit rate in bits/s for ABR (Average Bit Rate) mode. If the bit rate
2336 is not explicitly specified, it is automatically set to a suitable
2337 value depending on the selected profile. <code>faac</code> bitrate is
2338 expressed in kilobits/s.
2340 <p>Note that libfaac does not support CBR (Constant Bit Rate) but only
2341 ABR (Average Bit Rate).
2343 <p>If VBR mode is enabled this option is ignored.
2346 <dt> ‘<samp>ar (<em>-R</em>)</samp>’</dt>
2347 <dd><p>Set audio sampling rate (in Hz).
2350 <dt> ‘<samp>ac (<em>-c</em>)</samp>’</dt>
2351 <dd><p>Set the number of audio channels.
2354 <dt> ‘<samp>cutoff (<em>-C</em>)</samp>’</dt>
2355 <dd><p>Set cutoff frequency. If not specified (or explicitly set to 0) it
2356 will use a value automatically computed by the library. Default value
2360 <dt> ‘<samp>profile</samp>’</dt>
2361 <dd><p>Set audio profile.
2363 <p>The following profiles are recognized:
2364 </p><dl compact="compact">
2365 <dt> ‘<samp>aac_main</samp>’</dt>
2366 <dd><p>Main AAC (Main)
2369 <dt> ‘<samp>aac_low</samp>’</dt>
2370 <dd><p>Low Complexity AAC (LC)
2373 <dt> ‘<samp>aac_ssr</samp>’</dt>
2374 <dd><p>Scalable Sample Rate (SSR)
2377 <dt> ‘<samp>aac_ltp</samp>’</dt>
2378 <dd><p>Long Term Prediction (LTP)
2382 <p>If not specified it is set to ‘<samp>aac_low</samp>’.
2385 <dt> ‘<samp>flags +qscale</samp>’</dt>
2386 <dd><p>Set constant quality VBR (Variable Bit Rate) mode.
2389 <dt> ‘<samp>global_quality</samp>’</dt>
2390 <dd><p>Set quality in VBR mode as an integer number of lambda units.
2392 <p>Only relevant when VBR mode is enabled with <code>flags +qscale</code>. The
2393 value is converted to QP units by dividing it by <code>FF_QP2LAMBDA</code>,
2394 and used to set the quality value used by libfaac. A reasonable range
2395 for the option value in QP units is [10-500], the higher the value the
2399 <dt> ‘<samp>q (<em>-q</em>)</samp>’</dt>
2400 <dd><p>Enable VBR mode when set to a non-negative value, and set constant
2401 quality value as a double floating point value in QP units.
2403 <p>The value sets the quality value used by libfaac. A reasonable range
2404 for the option value is [10-500], the higher the value the higher the
2407 <p>This option is valid only using the <code>ffmpeg</code> command-line
2408 tool. For library interface users, use ‘<samp>global_quality</samp>’.
2412 <a name="Examples-1"></a>
2413 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Examples-1">8.3.2 Examples</a></h3>
2417 Use <code>ffmpeg</code> to convert an audio file to ABR 128 kbps AAC in an M4A (MP4)
2419 <table><tr><td> </td><td><pre class="example">ffmpeg -i input.wav -codec:a libfaac -b:a 128k -output.m4a
2420 </pre></td></tr></table>
2423 Use <code>ffmpeg</code> to convert an audio file to VBR AAC, using the
2425 <table><tr><td> </td><td><pre class="example">ffmpeg -i input.wav -c:a libfaac -profile:a aac_ltp -q:a 100 output.m4a
2426 </pre></td></tr></table>
2429 <p><a name="libfdk_002daac_002denc"></a>
2430 </p><a name="libfdk_005faac"></a>
2431 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libfdk_005faac">8.4 libfdk_aac</a></h2>
2433 <p>libfdk-aac AAC (Advanced Audio Coding) encoder wrapper.
2435 <p>The libfdk-aac library is based on the Fraunhofer FDK AAC code from
2436 the Android project.
2438 <p>Requires the presence of the libfdk-aac headers and library during
2439 configuration. You need to explicitly configure the build with
2440 <code>--enable-libfdk-aac</code>. The library is also incompatible with GPL,
2441 so if you allow the use of GPL, you should configure with
2442 <code>--enable-gpl --enable-nonfree --enable-libfdk-aac</code>.
2444 <p>This encoder is considered to be of higher quality with respect to
2445 both <a href="#aacenc">the native experimental FFmpeg AAC encoder</a> and
2446 <a href="#libfaac">libfaac</a>.
2448 <p>VBR encoding, enabled through the ‘<samp>vbr</samp>’ or ‘<samp>flags
2449 +qscale</samp>’ options, is experimental and only works with some
2450 combinations of parameters.
2452 <p>For more information see the fdk-aac project at
2453 <a href="http://sourceforge.net/p/opencore-amr/fdk-aac/">http://sourceforge.net/p/opencore-amr/fdk-aac/</a>.
2455 <a name="Options-5"></a>
2456 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-5">8.4.1 Options</a></h3>
2458 <p>The following options are mapped on the shared FFmpeg codec options.
2460 <dl compact="compact">
2461 <dt> ‘<samp>b</samp>’</dt>
2462 <dd><p>Set bit rate in bits/s. If the bitrate is not explicitly specified, it
2463 is automatically set to a suitable value depending on the selected
2466 <p>In case VBR mode is enabled the option is ignored.
2469 <dt> ‘<samp>ar</samp>’</dt>
2470 <dd><p>Set audio sampling rate (in Hz).
2473 <dt> ‘<samp>channels</samp>’</dt>
2474 <dd><p>Set the number of audio channels.
2477 <dt> ‘<samp>flags +qscale</samp>’</dt>
2478 <dd><p>Enable fixed quality, VBR (Variable Bit Rate) mode.
2479 Note that VBR is implicitly enabled when the ‘<samp>vbr</samp>’ value is
2483 <dt> ‘<samp>cutoff</samp>’</dt>
2484 <dd><p>Set cutoff frequency. If not specified (or explicitly set to 0) it
2485 will use a value automatically computed by the library. Default value
2489 <dt> ‘<samp>profile</samp>’</dt>
2490 <dd><p>Set audio profile.
2492 <p>The following profiles are recognized:
2493 </p><dl compact="compact">
2494 <dt> ‘<samp>aac_low</samp>’</dt>
2495 <dd><p>Low Complexity AAC (LC)
2498 <dt> ‘<samp>aac_he</samp>’</dt>
2499 <dd><p>High Efficiency AAC (HE-AAC)
2502 <dt> ‘<samp>aac_he_v2</samp>’</dt>
2503 <dd><p>High Efficiency AAC version 2 (HE-AACv2)
2506 <dt> ‘<samp>aac_ld</samp>’</dt>
2507 <dd><p>Low Delay AAC (LD)
2510 <dt> ‘<samp>aac_eld</samp>’</dt>
2511 <dd><p>Enhanced Low Delay AAC (ELD)
2515 <p>If not specified it is set to ‘<samp>aac_low</samp>’.
2519 <p>The following are private options of the libfdk_aac encoder.
2521 <dl compact="compact">
2522 <dt> ‘<samp>afterburner</samp>’</dt>
2523 <dd><p>Enable afterburner feature if set to 1, disabled if set to 0. This
2524 improves the quality but also the required processing power.
2526 <p>Default value is 1.
2529 <dt> ‘<samp>eld_sbr</samp>’</dt>
2530 <dd><p>Enable SBR (Spectral Band Replication) for ELD if set to 1, disabled
2533 <p>Default value is 0.
2536 <dt> ‘<samp>signaling</samp>’</dt>
2537 <dd><p>Set SBR/PS signaling style.
2539 <p>It can assume one of the following values:
2540 </p><dl compact="compact">
2541 <dt> ‘<samp>default</samp>’</dt>
2542 <dd><p>choose signaling implicitly (explicit hierarchical by default,
2543 implicit if global header is disabled)
2546 <dt> ‘<samp>implicit</samp>’</dt>
2547 <dd><p>implicit backwards compatible signaling
2550 <dt> ‘<samp>explicit_sbr</samp>’</dt>
2551 <dd><p>explicit SBR, implicit PS signaling
2554 <dt> ‘<samp>explicit_hierarchical</samp>’</dt>
2555 <dd><p>explicit hierarchical signaling
2559 <p>Default value is ‘<samp>default</samp>’.
2562 <dt> ‘<samp>latm</samp>’</dt>
2563 <dd><p>Output LATM/LOAS encapsulated data if set to 1, disabled if set to 0.
2565 <p>Default value is 0.
2568 <dt> ‘<samp>header_period</samp>’</dt>
2569 <dd><p>Set StreamMuxConfig and PCE repetition period (in frames) for sending
2570 in-band configuration buffers within LATM/LOAS transport layer.
2572 <p>Must be a 16-bits non-negative integer.
2574 <p>Default value is 0.
2577 <dt> ‘<samp>vbr</samp>’</dt>
2578 <dd><p>Set VBR mode, from 1 to 5. 1 is lowest quality (though still pretty
2579 good) and 5 is highest quality. A value of 0 will disable VBR, and CBR
2580 (Constant Bit Rate) is enabled.
2582 <p>Currently only the ‘<samp>aac_low</samp>’ profile supports VBR encoding.
2584 <p>VBR modes 1-5 correspond to roughly the following average bit rates:
2586 <dl compact="compact">
2587 <dt> ‘<samp>1</samp>’</dt>
2588 <dd><p>32 kbps/channel
2590 <dt> ‘<samp>2</samp>’</dt>
2591 <dd><p>40 kbps/channel
2593 <dt> ‘<samp>3</samp>’</dt>
2594 <dd><p>48-56 kbps/channel
2596 <dt> ‘<samp>4</samp>’</dt>
2597 <dd><p>64 kbps/channel
2599 <dt> ‘<samp>5</samp>’</dt>
2600 <dd><p>about 80-96 kbps/channel
2604 <p>Default value is 0.
2608 <a name="Examples-2"></a>
2609 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Examples-2">8.4.2 Examples</a></h3>
2613 Use <code>ffmpeg</code> to convert an audio file to VBR AAC in an M4A (MP4)
2615 <table><tr><td> </td><td><pre class="example">ffmpeg -i input.wav -codec:a libfdk_aac -vbr 3 output.m4a
2616 </pre></td></tr></table>
2619 Use <code>ffmpeg</code> to convert an audio file to CBR 64k kbps AAC, using the
2620 High-Efficiency AAC profile:
2621 <table><tr><td> </td><td><pre class="example">ffmpeg -i input.wav -c:a libfdk_aac -profile:a aac_he -b:a 64k output.m4a
2622 </pre></td></tr></table>
2625 <p><a name="libmp3lame"></a>
2626 </p><a name="libmp3lame-1"></a>
2627 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libmp3lame-1">8.5 libmp3lame</a></h2>
2629 <p>LAME (Lame Ain’t an MP3 Encoder) MP3 encoder wrapper.
2631 <p>Requires the presence of the libmp3lame headers and library during
2632 configuration. You need to explicitly configure the build with
2633 <code>--enable-libmp3lame</code>.
2635 <p>See <a href="#libshine">libshine</a> for a fixed-point MP3 encoder, although with a
2638 <a name="Options-12"></a>
2639 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-12">8.5.1 Options</a></h3>
2641 <p>The following options are supported by the libmp3lame wrapper. The
2642 <code>lame</code>-equivalent of the options are listed in parentheses.
2644 <dl compact="compact">
2645 <dt> ‘<samp>b (<em>-b</em>)</samp>’</dt>
2646 <dd><p>Set bitrate expressed in bits/s for CBR or ABR. LAME <code>bitrate</code> is
2647 expressed in kilobits/s.
2650 <dt> ‘<samp>q (<em>-V</em>)</samp>’</dt>
2651 <dd><p>Set constant quality setting for VBR. This option is valid only
2652 using the <code>ffmpeg</code> command-line tool. For library interface
2653 users, use ‘<samp>global_quality</samp>’.
2656 <dt> ‘<samp>compression_level (<em>-q</em>)</samp>’</dt>
2657 <dd><p>Set algorithm quality. Valid arguments are integers in the 0-9 range,
2658 with 0 meaning highest quality but slowest, and 9 meaning fastest
2659 while producing the worst quality.
2662 <dt> ‘<samp>reservoir</samp>’</dt>
2663 <dd><p>Enable use of bit reservoir when set to 1. Default value is 1. LAME
2664 has this enabled by default, but can be overriden by use
2665 ‘<samp>--nores</samp>’ option.
2668 <dt> ‘<samp>joint_stereo (<em>-m j</em>)</samp>’</dt>
2669 <dd><p>Enable the encoder to use (on a frame by frame basis) either L/R
2670 stereo or mid/side stereo. Default value is 1.
2673 <dt> ‘<samp>abr (<em>--abr</em>)</samp>’</dt>
2674 <dd><p>Enable the encoder to use ABR when set to 1. The <code>lame</code>
2675 ‘<samp>--abr</samp>’ sets the target bitrate, while this options only
2676 tells FFmpeg to use ABR still relies on ‘<samp>b</samp>’ to set bitrate.
2681 <a name="libopencore_002damrnb-1"></a>
2682 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopencore_002damrnb-1">8.6 libopencore-amrnb</a></h2>
2684 <p>OpenCORE Adaptive Multi-Rate Narrowband encoder.
2686 <p>Requires the presence of the libopencore-amrnb headers and library during
2687 configuration. You need to explicitly configure the build with
2688 <code>--enable-libopencore-amrnb --enable-version3</code>.
2690 <p>This is a mono-only encoder. Officially it only supports 8000Hz sample rate,
2691 but you can override it by setting ‘<samp>strict</samp>’ to ‘<samp>unofficial</samp>’ or
2694 <a name="Options-9"></a>
2695 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-9">8.6.1 Options</a></h3>
2697 <dl compact="compact">
2698 <dt> ‘<samp>b</samp>’</dt>
2699 <dd><p>Set bitrate in bits per second. Only the following bitrates are supported,
2700 otherwise libavcodec will round to the nearest valid bitrate.
2702 <dl compact="compact">
2703 <dt> ‘<samp>4750</samp>’</dt>
2704 <dt> ‘<samp>5150</samp>’</dt>
2705 <dt> ‘<samp>5900</samp>’</dt>
2706 <dt> ‘<samp>6700</samp>’</dt>
2707 <dt> ‘<samp>7400</samp>’</dt>
2708 <dt> ‘<samp>7950</samp>’</dt>
2709 <dt> ‘<samp>10200</samp>’</dt>
2710 <dt> ‘<samp>12200</samp>’</dt>
2714 <dt> ‘<samp>dtx</samp>’</dt>
2715 <dd><p>Allow discontinuous transmission (generate comfort noise) when set to 1. The
2716 default value is 0 (disabled).
2721 <p><a name="libshine"></a>
2722 </p><a name="libshine-1"></a>
2723 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libshine-1">8.7 libshine</a></h2>
2725 <p>Shine Fixed-Point MP3 encoder wrapper.
2727 <p>Shine is a fixed-point MP3 encoder. It has a far better performance on
2728 platforms without an FPU, e.g. armel CPUs, and some phones and tablets.
2729 However, as it is more targeted on performance than quality, it is not on par
2730 with LAME and other production-grade encoders quality-wise. Also, according to
2731 the project’s homepage, this encoder may not be free of bugs as the code was
2732 written a long time ago and the project was dead for at least 5 years.
2734 <p>This encoder only supports stereo and mono input. This is also CBR-only.
2736 <p>The original project (last updated in early 2007) is at
2737 <a href="http://sourceforge.net/projects/libshine-fxp/">http://sourceforge.net/projects/libshine-fxp/</a>. We only support the
2738 updated fork by the Savonet/Liquidsoap project at <a href="https://github.com/savonet/shine">https://github.com/savonet/shine</a>.
2740 <p>Requires the presence of the libshine headers and library during
2741 configuration. You need to explicitly configure the build with
2742 <code>--enable-libshine</code>.
2744 <p>See also <a href="#libmp3lame">libmp3lame</a>.
2746 <a name="Options"></a>
2747 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options">8.7.1 Options</a></h3>
2749 <p>The following options are supported by the libshine wrapper. The
2750 <code>shineenc</code>-equivalent of the options are listed in parentheses.
2752 <dl compact="compact">
2753 <dt> ‘<samp>b (<em>-b</em>)</samp>’</dt>
2754 <dd><p>Set bitrate expressed in bits/s for CBR. <code>shineenc</code> ‘<samp>-b</samp>’ option
2755 is expressed in kilobits/s.
2760 <a name="libtwolame"></a>
2761 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libtwolame">8.8 libtwolame</a></h2>
2763 <p>TwoLAME MP2 encoder wrapper.
2765 <p>Requires the presence of the libtwolame headers and library during
2766 configuration. You need to explicitly configure the build with
2767 <code>--enable-libtwolame</code>.
2769 <a name="Options-1"></a>
2770 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-1">8.8.1 Options</a></h3>
2772 <p>The following options are supported by the libtwolame wrapper. The
2773 <code>twolame</code>-equivalent options follow the FFmpeg ones and are in
2776 <dl compact="compact">
2777 <dt> ‘<samp>b (<em>-b</em>)</samp>’</dt>
2778 <dd><p>Set bitrate expressed in bits/s for CBR. <code>twolame</code> ‘<samp>b</samp>’
2779 option is expressed in kilobits/s. Default value is 128k.
2782 <dt> ‘<samp>q (<em>-V</em>)</samp>’</dt>
2783 <dd><p>Set quality for experimental VBR support. Maximum value range is
2784 from -50 to 50, useful range is from -10 to 10. The higher the
2785 value, the better the quality. This option is valid only using the
2786 <code>ffmpeg</code> command-line tool. For library interface users,
2787 use ‘<samp>global_quality</samp>’.
2790 <dt> ‘<samp>mode (<em>--mode</em>)</samp>’</dt>
2791 <dd><p>Set the mode of the resulting audio. Possible values:
2793 <dl compact="compact">
2794 <dt> ‘<samp>auto</samp>’</dt>
2795 <dd><p>Choose mode automatically based on the input. This is the default.
2797 <dt> ‘<samp>stereo</samp>’</dt>
2800 <dt> ‘<samp>joint_stereo</samp>’</dt>
2803 <dt> ‘<samp>dual_channel</samp>’</dt>
2806 <dt> ‘<samp>mono</samp>’</dt>
2812 <dt> ‘<samp>psymodel (<em>--psyc-mode</em>)</samp>’</dt>
2813 <dd><p>Set psychoacoustic model to use in encoding. The argument must be
2814 an integer between -1 and 4, inclusive. The higher the value, the
2815 better the quality. The default value is 3.
2818 <dt> ‘<samp>energy_levels (<em>--energy</em>)</samp>’</dt>
2819 <dd><p>Enable energy levels extensions when set to 1. The default value is
2823 <dt> ‘<samp>error_protection (<em>--protect</em>)</samp>’</dt>
2824 <dd><p>Enable CRC error protection when set to 1. The default value is 0
2828 <dt> ‘<samp>copyright (<em>--copyright</em>)</samp>’</dt>
2829 <dd><p>Set MPEG audio copyright flag when set to 1. The default value is 0
2833 <dt> ‘<samp>original (<em>--original</em>)</samp>’</dt>
2834 <dd><p>Set MPEG audio original flag when set to 1. The default value is 0
2840 <p><a name="libvo_002daacenc"></a>
2841 </p><a name="libvo_002daacenc-1"></a>
2842 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvo_002daacenc-1">8.9 libvo-aacenc</a></h2>
2844 <p>VisualOn AAC encoder.
2846 <p>Requires the presence of the libvo-aacenc headers and library during
2847 configuration. You need to explicitly configure the build with
2848 <code>--enable-libvo-aacenc --enable-version3</code>.
2850 <p>This encoder is considered to be worse than the
2851 <a href="#aacenc">native experimental FFmpeg AAC encoder</a>, according to
2854 <a name="Options-4"></a>
2855 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-4">8.9.1 Options</a></h3>
2857 <p>The VisualOn AAC encoder only support encoding AAC-LC and up to 2
2858 channels. It is also CBR-only.
2860 <dl compact="compact">
2861 <dt> ‘<samp>b</samp>’</dt>
2862 <dd><p>Set bit rate in bits/s.
2867 <a name="libvo_002damrwbenc"></a>
2868 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvo_002damrwbenc">8.10 libvo-amrwbenc</a></h2>
2870 <p>VisualOn Adaptive Multi-Rate Wideband encoder.
2872 <p>Requires the presence of the libvo-amrwbenc headers and library during
2873 configuration. You need to explicitly configure the build with
2874 <code>--enable-libvo-amrwbenc --enable-version3</code>.
2876 <p>This is a mono-only encoder. Officially it only supports 16000Hz sample
2877 rate, but you can override it by setting ‘<samp>strict</samp>’ to
2878 ‘<samp>unofficial</samp>’ or lower.
2880 <a name="Options-15"></a>
2881 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-15">8.10.1 Options</a></h3>
2883 <dl compact="compact">
2884 <dt> ‘<samp>b</samp>’</dt>
2885 <dd><p>Set bitrate in bits/s. Only the following bitrates are supported, otherwise
2886 libavcodec will round to the nearest valid bitrate.
2888 <dl compact="compact">
2889 <dt> ‘<samp>6600</samp>’</dt>
2890 <dt> ‘<samp>8850</samp>’</dt>
2891 <dt> ‘<samp>12650</samp>’</dt>
2892 <dt> ‘<samp>14250</samp>’</dt>
2893 <dt> ‘<samp>15850</samp>’</dt>
2894 <dt> ‘<samp>18250</samp>’</dt>
2895 <dt> ‘<samp>19850</samp>’</dt>
2896 <dt> ‘<samp>23050</samp>’</dt>
2897 <dt> ‘<samp>23850</samp>’</dt>
2901 <dt> ‘<samp>dtx</samp>’</dt>
2902 <dd><p>Allow discontinuous transmission (generate comfort noise) when set to 1. The
2903 default value is 0 (disabled).
2908 <a name="libopus-1"></a>
2909 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopus-1">8.11 libopus</a></h2>
2911 <p>libopus Opus Interactive Audio Codec encoder wrapper.
2913 <p>Requires the presence of the libopus headers and library during
2914 configuration. You need to explicitly configure the build with
2915 <code>--enable-libopus</code>.
2917 <a name="Option-Mapping"></a>
2918 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Option-Mapping">8.11.1 Option Mapping</a></h3>
2920 <p>Most libopus options are modeled after the <code>opusenc</code> utility from
2921 opus-tools. The following is an option mapping chart describing options
2922 supported by the libopus wrapper, and their <code>opusenc</code>-equivalent
2925 <dl compact="compact">
2926 <dt> ‘<samp>b (<em>bitrate</em>)</samp>’</dt>
2927 <dd><p>Set the bit rate in bits/s. FFmpeg’s ‘<samp>b</samp>’ option is
2928 expressed in bits/s, while <code>opusenc</code>’s ‘<samp>bitrate</samp>’ in
2932 <dt> ‘<samp>vbr (<em>vbr</em>, <em>hard-cbr</em>, and <em>cvbr</em>)</samp>’</dt>
2933 <dd><p>Set VBR mode. The FFmpeg ‘<samp>vbr</samp>’ option has the following
2934 valid arguments, with the their <code>opusenc</code> equivalent options
2937 <dl compact="compact">
2938 <dt> ‘<samp>off (<em>hard-cbr</em>)</samp>’</dt>
2939 <dd><p>Use constant bit rate encoding.
2942 <dt> ‘<samp>on (<em>vbr</em>)</samp>’</dt>
2943 <dd><p>Use variable bit rate encoding (the default).
2946 <dt> ‘<samp>constrained (<em>cvbr</em>)</samp>’</dt>
2947 <dd><p>Use constrained variable bit rate encoding.
2952 <dt> ‘<samp>compression_level (<em>comp</em>)</samp>’</dt>
2953 <dd><p>Set encoding algorithm complexity. Valid options are integers in
2954 the 0-10 range. 0 gives the fastest encodes but lower quality, while 10
2955 gives the highest quality but slowest encoding. The default is 10.
2958 <dt> ‘<samp>frame_duration (<em>framesize</em>)</samp>’</dt>
2959 <dd><p>Set maximum frame size, or duration of a frame in milliseconds. The
2960 argument must be exactly the following: 2.5, 5, 10, 20, 40, 60. Smaller
2961 frame sizes achieve lower latency but less quality at a given bitrate.
2962 Sizes greater than 20ms are only interesting at fairly low bitrates.
2963 The default is 20ms.
2966 <dt> ‘<samp>packet_loss (<em>expect-loss</em>)</samp>’</dt>
2967 <dd><p>Set expected packet loss percentage. The default is 0.
2970 <dt> ‘<samp>application (N.A.)</samp>’</dt>
2971 <dd><p>Set intended application type. Valid options are listed below:
2973 <dl compact="compact">
2974 <dt> ‘<samp>voip</samp>’</dt>
2975 <dd><p>Favor improved speech intelligibility.
2977 <dt> ‘<samp>audio</samp>’</dt>
2978 <dd><p>Favor faithfulness to the input (the default).
2980 <dt> ‘<samp>lowdelay</samp>’</dt>
2981 <dd><p>Restrict to only the lowest delay modes.
2986 <dt> ‘<samp>cutoff (N.A.)</samp>’</dt>
2987 <dd><p>Set cutoff bandwidth in Hz. The argument must be exactly one of the
2988 following: 4000, 6000, 8000, 12000, or 20000, corresponding to
2989 narrowband, mediumband, wideband, super wideband, and fullband
2990 respectively. The default is 0 (cutoff disabled).
2995 <a name="libvorbis"></a>
2996 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvorbis">8.12 libvorbis</a></h2>
2998 <p>libvorbis encoder wrapper.
3000 <p>Requires the presence of the libvorbisenc headers and library during
3001 configuration. You need to explicitly configure the build with
3002 <code>--enable-libvorbis</code>.
3004 <a name="Options-16"></a>
3005 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-16">8.12.1 Options</a></h3>
3007 <p>The following options are supported by the libvorbis wrapper. The
3008 <code>oggenc</code>-equivalent of the options are listed in parentheses.
3010 <p>To get a more accurate and extensive documentation of the libvorbis
3011 options, consult the libvorbisenc’s and <code>oggenc</code>’s documentations.
3012 See <a href="http://xiph.org/vorbis/">http://xiph.org/vorbis/</a>,
3013 <a href="http://wiki.xiph.org/Vorbis-tools">http://wiki.xiph.org/Vorbis-tools</a>, and oggenc(1).
3015 <dl compact="compact">
3016 <dt> ‘<samp>b (<em>-b</em>)</samp>’</dt>
3017 <dd><p>Set bitrate expressed in bits/s for ABR. <code>oggenc</code> ‘<samp>-b</samp>’ is
3018 expressed in kilobits/s.
3021 <dt> ‘<samp>q (<em>-q</em>)</samp>’</dt>
3022 <dd><p>Set constant quality setting for VBR. The value should be a float
3023 number in the range of -1.0 to 10.0. The higher the value, the better
3024 the quality. The default value is ‘<samp>3.0</samp>’.
3026 <p>This option is valid only using the <code>ffmpeg</code> command-line tool.
3027 For library interface users, use ‘<samp>global_quality</samp>’.
3030 <dt> ‘<samp>cutoff (<em>--advanced-encode-option lowpass_frequency=N</em>)</samp>’</dt>
3031 <dd><p>Set cutoff bandwidth in Hz, a value of 0 disables cutoff. <code>oggenc</code>’s
3032 related option is expressed in kHz. The default value is ‘<samp>0</samp>’ (cutoff
3036 <dt> ‘<samp>minrate (<em>-m</em>)</samp>’</dt>
3037 <dd><p>Set minimum bitrate expressed in bits/s. <code>oggenc</code> ‘<samp>-m</samp>’ is
3038 expressed in kilobits/s.
3041 <dt> ‘<samp>maxrate (<em>-M</em>)</samp>’</dt>
3042 <dd><p>Set maximum bitrate expressed in bits/s. <code>oggenc</code> ‘<samp>-M</samp>’ is
3043 expressed in kilobits/s. This only has effect on ABR mode.
3046 <dt> ‘<samp>iblock (<em>--advanced-encode-option impulse_noisetune=N</em>)</samp>’</dt>
3047 <dd><p>Set noise floor bias for impulse blocks. The value is a float number from
3048 -15.0 to 0.0. A negative bias instructs the encoder to pay special attention
3049 to the crispness of transients in the encoded audio. The tradeoff for better
3050 transient response is a higher bitrate.
3055 <a name="libwavpack"></a>
3056 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libwavpack">8.13 libwavpack</a></h2>
3058 <p>A wrapper providing WavPack encoding through libwavpack.
3060 <p>Only lossless mode using 32-bit integer samples is supported currently.
3061 The ‘<samp>compression_level</samp>’ option can be used to control speed vs.
3062 compression tradeoff, with the values mapped to libwavpack as follows:
3064 <dl compact="compact">
3065 <dt> ‘<samp>0</samp>’</dt>
3066 <dd><p>Fast mode - corresponding to the wavpack ‘<samp>-f</samp>’ option.
3069 <dt> ‘<samp>1</samp>’</dt>
3070 <dd><p>Normal (default) settings.
3073 <dt> ‘<samp>2</samp>’</dt>
3074 <dd><p>High quality - corresponding to the wavpack ‘<samp>-h</samp>’ option.
3077 <dt> ‘<samp>3</samp>’</dt>
3078 <dd><p>Very high quality - corresponding to the wavpack ‘<samp>-hh</samp>’ option.
3081 <dt> ‘<samp>4-8</samp>’</dt>
3082 <dd><p>Same as 3, but with extra processing enabled - corresponding to the wavpack
3083 ‘<samp>-x</samp>’ option. I.e. 4 is the same as ‘<samp>-x2</samp>’ and 8 is the same as
3084 ‘<samp>-x6</samp>’.
3090 <a name="Video-Encoders"></a>
3091 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Video-Encoders">9. Video Encoders</a></h1>
3093 <p>A description of some of the currently available video encoders
3096 <a name="libtheora"></a>
3097 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libtheora">9.1 libtheora</a></h2>
3099 <p>libtheora Theora encoder wrapper.
3101 <p>Requires the presence of the libtheora headers and library during
3102 configuration. You need to explicitly configure the build with
3103 <code>--enable-libtheora</code>.
3105 <p>For more informations about the libtheora project see
3106 <a href="http://www.theora.org/">http://www.theora.org/</a>.
3108 <a name="Options-14"></a>
3109 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-14">9.1.1 Options</a></h3>
3111 <p>The following global options are mapped to internal libtheora options
3112 which affect the quality and the bitrate of the encoded stream.
3114 <dl compact="compact">
3115 <dt> ‘<samp>b</samp>’</dt>
3116 <dd><p>Set the video bitrate in bit/s for CBR (Constant Bit Rate) mode. In
3117 case VBR (Variable Bit Rate) mode is enabled this option is ignored.
3120 <dt> ‘<samp>flags</samp>’</dt>
3121 <dd><p>Used to enable constant quality mode (VBR) encoding through the
3122 ‘<samp>qscale</samp>’ flag, and to enable the <code>pass1</code> and <code>pass2</code>
3126 <dt> ‘<samp>g</samp>’</dt>
3127 <dd><p>Set the GOP size.
3130 <dt> ‘<samp>global_quality</samp>’</dt>
3131 <dd><p>Set the global quality as an integer in lambda units.
3133 <p>Only relevant when VBR mode is enabled with <code>flags +qscale</code>. The
3134 value is converted to QP units by dividing it by <code>FF_QP2LAMBDA</code>,
3135 clipped in the [0 - 10] range, and then multiplied by 6.3 to get a
3136 value in the native libtheora range [0-63]. A higher value corresponds
3137 to a higher quality.
3140 <dt> ‘<samp>q</samp>’</dt>
3141 <dd><p>Enable VBR mode when set to a non-negative value, and set constant
3142 quality value as a double floating point value in QP units.
3144 <p>The value is clipped in the [0-10] range, and then multiplied by 6.3
3145 to get a value in the native libtheora range [0-63].
3147 <p>This option is valid only using the <code>ffmpeg</code> command-line
3148 tool. For library interface users, use ‘<samp>global_quality</samp>’.
3152 <a name="Examples"></a>
3153 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Examples">9.1.2 Examples</a></h3>
3157 Set maximum constant quality (VBR) encoding with <code>ffmpeg</code>:
3158 <table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -codec:v libtheora -q:v 10 OUTPUT.ogg
3159 </pre></td></tr></table>
3162 Use <code>ffmpeg</code> to convert a CBR 1000 kbps Theora video stream:
3163 <table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -codec:v libtheora -b:v 1000k OUTPUT.ogg
3164 </pre></td></tr></table>
3167 <a name="libvpx"></a>
3168 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvpx">9.2 libvpx</a></h2>
3170 <p>VP8 format supported through libvpx.
3172 <p>Requires the presence of the libvpx headers and library during configuration.
3173 You need to explicitly configure the build with <code>--enable-libvpx</code>.
3175 <a name="Options-3"></a>
3176 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-3">9.2.1 Options</a></h3>
3178 <p>Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
3180 <dl compact="compact">
3181 <dt> ‘<samp>threads</samp>’</dt>
3185 <dt> ‘<samp>profile</samp>’</dt>
3189 <dt> ‘<samp>vb</samp>’</dt>
3190 <dd><p>rc_target_bitrate
3193 <dt> ‘<samp>g</samp>’</dt>
3197 <dt> ‘<samp>keyint_min</samp>’</dt>
3201 <dt> ‘<samp>qmin</samp>’</dt>
3202 <dd><p>rc_min_quantizer
3205 <dt> ‘<samp>qmax</samp>’</dt>
3206 <dd><p>rc_max_quantizer
3209 <dt> ‘<samp>bufsize, vb</samp>’</dt>
3211 <code>(bufsize * 1000 / vb)</code>
3213 <p>rc_buf_optimal_sz
3214 <code>(bufsize * 1000 / vb * 5 / 6)</code>
3217 <dt> ‘<samp>rc_init_occupancy, vb</samp>’</dt>
3218 <dd><p>rc_buf_initial_sz
3219 <code>(rc_init_occupancy * 1000 / vb)</code>
3222 <dt> ‘<samp>rc_buffer_aggressivity</samp>’</dt>
3223 <dd><p>rc_undershoot_pct
3226 <dt> ‘<samp>skip_threshold</samp>’</dt>
3227 <dd><p>rc_dropframe_thresh
3230 <dt> ‘<samp>qcomp</samp>’</dt>
3231 <dd><p>rc_2pass_vbr_bias_pct
3234 <dt> ‘<samp>maxrate, vb</samp>’</dt>
3235 <dd><p>rc_2pass_vbr_maxsection_pct
3236 <code>(maxrate * 100 / vb)</code>
3239 <dt> ‘<samp>minrate, vb</samp>’</dt>
3240 <dd><p>rc_2pass_vbr_minsection_pct
3241 <code>(minrate * 100 / vb)</code>
3244 <dt> ‘<samp>minrate, maxrate, vb</samp>’</dt>
3245 <dd><p><code>VPX_CBR</code>
3246 <code>(minrate == maxrate == vb)</code>
3249 <dt> ‘<samp>crf</samp>’</dt>
3250 <dd><p><code>VPX_CQ</code>, <code>VP8E_SET_CQ_LEVEL</code>
3253 <dt> ‘<samp>quality</samp>’</dt>
3254 <dd><dl compact="compact">
3255 <dt> ‘<samp><var>best</var></samp>’</dt>
3256 <dd><p><code>VPX_DL_BEST_QUALITY</code>
3258 <dt> ‘<samp><var>good</var></samp>’</dt>
3259 <dd><p><code>VPX_DL_GOOD_QUALITY</code>
3261 <dt> ‘<samp><var>realtime</var></samp>’</dt>
3262 <dd><p><code>VPX_DL_REALTIME</code>
3267 <dt> ‘<samp>speed</samp>’</dt>
3268 <dd><p><code>VP8E_SET_CPUUSED</code>
3271 <dt> ‘<samp>nr</samp>’</dt>
3272 <dd><p><code>VP8E_SET_NOISE_SENSITIVITY</code>
3275 <dt> ‘<samp>mb_threshold</samp>’</dt>
3276 <dd><p><code>VP8E_SET_STATIC_THRESHOLD</code>
3279 <dt> ‘<samp>slices</samp>’</dt>
3280 <dd><p><code>VP8E_SET_TOKEN_PARTITIONS</code>
3283 <dt> ‘<samp>max-intra-rate</samp>’</dt>
3284 <dd><p><code>VP8E_SET_MAX_INTRA_BITRATE_PCT</code>
3287 <dt> ‘<samp>force_key_frames</samp>’</dt>
3288 <dd><p><code>VPX_EFLAG_FORCE_KF</code>
3291 <dt> ‘<samp>Alternate reference frame related</samp>’</dt>
3292 <dd><dl compact="compact">
3293 <dt> ‘<samp>vp8flags altref</samp>’</dt>
3294 <dd><p><code>VP8E_SET_ENABLEAUTOALTREF</code>
3296 <dt> ‘<samp><var>arnr_max_frames</var></samp>’</dt>
3297 <dd><p><code>VP8E_SET_ARNR_MAXFRAMES</code>
3299 <dt> ‘<samp><var>arnr_type</var></samp>’</dt>
3300 <dd><p><code>VP8E_SET_ARNR_TYPE</code>
3302 <dt> ‘<samp><var>arnr_strength</var></samp>’</dt>
3303 <dd><p><code>VP8E_SET_ARNR_STRENGTH</code>
3305 <dt> ‘<samp><var>rc_lookahead</var></samp>’</dt>
3306 <dd><p>g_lag_in_frames
3311 <dt> ‘<samp>vp8flags error_resilient</samp>’</dt>
3312 <dd><p>g_error_resilient
3317 <p>For more information about libvpx see:
3318 <a href="http://www.webmproject.org/">http://www.webmproject.org/</a>
3320 <a name="libx264"></a>
3321 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libx264">9.3 libx264</a></h2>
3323 <p>x264 H.264/MPEG-4 AVC encoder wrapper.
3325 <p>This encoder requires the presence of the libx264 headers and library
3326 during configuration. You need to explicitly configure the build with
3327 <code>--enable-libx264</code>.
3329 <p>libx264 supports an impressive number of features, including 8x8 and
3330 4x4 adaptive spatial transform, adaptive B-frame placement, CAVLC/CABAC
3331 entropy coding, interlacing (MBAFF), lossless mode, psy optimizations
3332 for detail retention (adaptive quantization, psy-RD, psy-trellis).
3334 <p>Many libx264 encoder options are mapped to FFmpeg global codec
3335 options, while unique encoder options are provided through private
3336 options. Additionally the ‘<samp>x264opts</samp>’ and ‘<samp>x264-params</samp>’
3337 private options allows to pass a list of key=value tuples as accepted
3338 by the libx264 <code>x264_param_parse</code> function.
3340 <p>The x264 project website is at
3341 <a href="http://www.videolan.org/developers/x264.html">http://www.videolan.org/developers/x264.html</a>.
3343 <a name="Options-6"></a>
3344 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-6">9.3.1 Options</a></h3>
3346 <p>The following options are supported by the libx264 wrapper. The
3347 <code>x264</code>-equivalent options or values are listed in parentheses
3350 <p>To reduce the duplication of documentation, only the private options
3351 and some others requiring special attention are documented here. For
3352 the documentation of the undocumented generic options, see
3353 <a href="#codec_002doptions">the Codec Options chapter</a>.
3355 <p>To get a more accurate and extensive documentation of the libx264
3356 options, invoke the command <code>x264 --full-help</code> or consult
3357 the libx264 documentation.
3359 <dl compact="compact">
3360 <dt> ‘<samp>b (<em>bitrate</em>)</samp>’</dt>
3361 <dd><p>Set bitrate in bits/s. Note that FFmpeg’s ‘<samp>b</samp>’ option is
3362 expressed in bits/s, while <code>x264</code>’s ‘<samp>bitrate</samp>’ is in
3366 <dt> ‘<samp>bf (<em>bframes</em>)</samp>’</dt>
3367 <dt> ‘<samp>g (<em>keyint</em>)</samp>’</dt>
3368 <dt> ‘<samp>qmax (<em>qpmax</em>)</samp>’</dt>
3369 <dt> ‘<samp>qmin (<em>qpmin</em>)</samp>’</dt>
3370 <dt> ‘<samp>qdiff (<em>qpstep</em>)</samp>’</dt>
3371 <dt> ‘<samp>qblur (<em>qblur</em>)</samp>’</dt>
3372 <dt> ‘<samp>qcomp (<em>qcomp</em>)</samp>’</dt>
3373 <dt> ‘<samp>refs (<em>ref</em>)</samp>’</dt>
3374 <dt> ‘<samp>sc_threshold (<em>scenecut</em>)</samp>’</dt>
3375 <dt> ‘<samp>trellis (<em>trellis</em>)</samp>’</dt>
3376 <dt> ‘<samp>nr (<em>nr</em>)</samp>’</dt>
3377 <dt> ‘<samp>me_range (<em>merange</em>)</samp>’</dt>
3378 <dt> ‘<samp>me_method (<em>me</em>)</samp>’</dt>
3379 <dd><p>Set motion estimation method. Possible values in the decreasing order
3382 <dl compact="compact">
3383 <dt> ‘<samp>dia (<em>dia</em>)</samp>’</dt>
3384 <dt> ‘<samp>epzs (<em>dia</em>)</samp>’</dt>
3385 <dd><p>Diamond search with radius 1 (fastest). ‘<samp>epzs</samp>’ is an alias for
3386 ‘<samp>dia</samp>’.
3388 <dt> ‘<samp>hex (<em>hex</em>)</samp>’</dt>
3389 <dd><p>Hexagonal search with radius 2.
3391 <dt> ‘<samp>umh (<em>umh</em>)</samp>’</dt>
3392 <dd><p>Uneven multi-hexagon search.
3394 <dt> ‘<samp>esa (<em>esa</em>)</samp>’</dt>
3395 <dd><p>Exhaustive search.
3397 <dt> ‘<samp>tesa (<em>tesa</em>)</samp>’</dt>
3398 <dd><p>Hadamard exhaustive search (slowest).
3403 <dt> ‘<samp>subq (<em>subme</em>)</samp>’</dt>
3404 <dt> ‘<samp>b_strategy (<em>b-adapt</em>)</samp>’</dt>
3405 <dt> ‘<samp>keyint_min (<em>min-keyint</em>)</samp>’</dt>
3406 <dt> ‘<samp>coder</samp>’</dt>
3407 <dd><p>Set entropy encoder. Possible values:
3409 <dl compact="compact">
3410 <dt> ‘<samp>ac</samp>’</dt>
3411 <dd><p>Enable CABAC.
3414 <dt> ‘<samp>vlc</samp>’</dt>
3415 <dd><p>Enable CAVLC and disable CABAC. It generates the same effect as
3416 <code>x264</code>’s ‘<samp>--no-cabac</samp>’ option.
3421 <dt> ‘<samp>cmp</samp>’</dt>
3422 <dd><p>Set full pixel motion estimation comparation algorithm. Possible values:
3424 <dl compact="compact">
3425 <dt> ‘<samp>chroma</samp>’</dt>
3426 <dd><p>Enable chroma in motion estimation.
3429 <dt> ‘<samp>sad</samp>’</dt>
3430 <dd><p>Ignore chroma in motion estimation. It generates the same effect as
3431 <code>x264</code>’s ‘<samp>--no-chroma-me</samp>’ option.
3436 <dt> ‘<samp>threads (<em>threads</em>)</samp>’</dt>
3437 <dt> ‘<samp>thread_type</samp>’</dt>
3438 <dd><p>Set multithreading technique. Possible values:
3440 <dl compact="compact">
3441 <dt> ‘<samp>slice</samp>’</dt>
3442 <dd><p>Slice-based multithreading. It generates the same effect as
3443 <code>x264</code>’s ‘<samp>--sliced-threads</samp>’ option.
3445 <dt> ‘<samp>frame</samp>’</dt>
3446 <dd><p>Frame-based multithreading.
3451 <dt> ‘<samp>flags</samp>’</dt>
3452 <dd><p>Set encoding flags. It can be used to disable closed GOP and enable
3453 open GOP by setting it to <code>-cgop</code>. The result is similar to
3454 the behavior of <code>x264</code>’s ‘<samp>--open-gop</samp>’ option.
3457 <dt> ‘<samp>rc_init_occupancy (<em>vbv-init</em>)</samp>’</dt>
3458 <dt> ‘<samp>preset (<em>preset</em>)</samp>’</dt>
3459 <dd><p>Set the encoding preset.
3462 <dt> ‘<samp>tune (<em>tune</em>)</samp>’</dt>
3463 <dd><p>Set tuning of the encoding params.
3466 <dt> ‘<samp>profile (<em>profile</em>)</samp>’</dt>
3467 <dd><p>Set profile restrictions.
3470 <dt> ‘<samp>fastfirstpass</samp>’</dt>
3471 <dd><p>Enable fast settings when encoding first pass, when set to 1. When set
3472 to 0, it has the same effect of <code>x264</code>’s
3473 ‘<samp>--slow-firstpass</samp>’ option.
3476 <dt> ‘<samp>crf (<em>crf</em>)</samp>’</dt>
3477 <dd><p>Set the quality for constant quality mode.
3480 <dt> ‘<samp>crf_max (<em>crf-max</em>)</samp>’</dt>
3481 <dd><p>In CRF mode, prevents VBV from lowering quality beyond this point.
3484 <dt> ‘<samp>qp (<em>qp</em>)</samp>’</dt>
3485 <dd><p>Set constant quantization rate control method parameter.
3488 <dt> ‘<samp>aq-mode (<em>aq-mode</em>)</samp>’</dt>
3489 <dd><p>Set AQ method. Possible values:
3491 <dl compact="compact">
3492 <dt> ‘<samp>none (<em>0</em>)</samp>’</dt>
3496 <dt> ‘<samp>variance (<em>1</em>)</samp>’</dt>
3497 <dd><p>Variance AQ (complexity mask).
3500 <dt> ‘<samp>autovariance (<em>2</em>)</samp>’</dt>
3501 <dd><p>Auto-variance AQ (experimental).
3506 <dt> ‘<samp>aq-strength (<em>aq-strength</em>)</samp>’</dt>
3507 <dd><p>Set AQ strength, reduce blocking and blurring in flat and textured areas.
3510 <dt> ‘<samp>psy</samp>’</dt>
3511 <dd><p>Use psychovisual optimizations when set to 1. When set to 0, it has the
3512 same effect as <code>x264</code>’s ‘<samp>--no-psy</samp>’ option.
3515 <dt> ‘<samp>psy-rd (<em>psy-rd</em>)</samp>’</dt>
3516 <dd><p>Set strength of psychovisual optimization, in
3517 <var>psy-rd</var>:<var>psy-trellis</var> format.
3520 <dt> ‘<samp>rc-lookahead (<em>rc-lookahead</em>)</samp>’</dt>
3521 <dd><p>Set number of frames to look ahead for frametype and ratecontrol.
3524 <dt> ‘<samp>weightb</samp>’</dt>
3525 <dd><p>Enable weighted prediction for B-frames when set to 1. When set to 0,
3526 it has the same effect as <code>x264</code>’s ‘<samp>--no-weightb</samp>’ option.
3529 <dt> ‘<samp>weightp (<em>weightp</em>)</samp>’</dt>
3530 <dd><p>Set weighted prediction method for P-frames. Possible values:
3532 <dl compact="compact">
3533 <dt> ‘<samp>none (<em>0</em>)</samp>’</dt>
3536 <dt> ‘<samp>simple (<em>1</em>)</samp>’</dt>
3537 <dd><p>Enable only weighted refs
3539 <dt> ‘<samp>smart (<em>2</em>)</samp>’</dt>
3540 <dd><p>Enable both weighted refs and duplicates
3545 <dt> ‘<samp>ssim (<em>ssim</em>)</samp>’</dt>
3546 <dd><p>Enable calculation and printing SSIM stats after the encoding.
3549 <dt> ‘<samp>intra-refresh (<em>intra-refresh</em>)</samp>’</dt>
3550 <dd><p>Enable the use of Periodic Intra Refresh instead of IDR frames when set
3554 <dt> ‘<samp>bluray-compat (<em>bluray-compat</em>)</samp>’</dt>
3555 <dd><p>Configure the encoder to be compatible with the bluray standard.
3556 It is a shorthand for setting "bluray-compat=1 force-cfr=1".
3559 <dt> ‘<samp>b-bias (<em>b-bias</em>)</samp>’</dt>
3560 <dd><p>Set the influence on how often B-frames are used.
3563 <dt> ‘<samp>b-pyramid (<em>b-pyramid</em>)</samp>’</dt>
3564 <dd><p>Set method for keeping of some B-frames as references. Possible values:
3566 <dl compact="compact">
3567 <dt> ‘<samp>none (<em>none</em>)</samp>’</dt>
3570 <dt> ‘<samp>strict (<em>strict</em>)</samp>’</dt>
3571 <dd><p>Strictly hierarchical pyramid.
3573 <dt> ‘<samp>normal (<em>normal</em>)</samp>’</dt>
3574 <dd><p>Non-strict (not Blu-ray compatible).
3579 <dt> ‘<samp>mixed-refs</samp>’</dt>
3580 <dd><p>Enable the use of one reference per partition, as opposed to one
3581 reference per macroblock when set to 1. When set to 0, it has the
3582 same effect as <code>x264</code>’s ‘<samp>--no-mixed-refs</samp>’ option.
3585 <dt> ‘<samp>8x8dct</samp>’</dt>
3586 <dd><p>Enable adaptive spatial transform (high profile 8x8 transform)
3587 when set to 1. When set to 0, it has the same effect as
3588 <code>x264</code>’s ‘<samp>--no-8x8dct</samp>’ option.
3591 <dt> ‘<samp>fast-pskip</samp>’</dt>
3592 <dd><p>Enable early SKIP detection on P-frames when set to 1. When set
3593 to 0, it has the same effect as <code>x264</code>’s
3594 ‘<samp>--no-fast-pskip</samp>’ option.
3597 <dt> ‘<samp>aud (<em>aud</em>)</samp>’</dt>
3598 <dd><p>Enable use of access unit delimiters when set to 1.
3601 <dt> ‘<samp>mbtree</samp>’</dt>
3602 <dd><p>Enable use macroblock tree ratecontrol when set to 1. When set
3603 to 0, it has the same effect as <code>x264</code>’s
3604 ‘<samp>--no-mbtree</samp>’ option.
3607 <dt> ‘<samp>deblock (<em>deblock</em>)</samp>’</dt>
3608 <dd><p>Set loop filter parameters, in <var>alpha</var>:<var>beta</var> form.
3611 <dt> ‘<samp>cplxblur (<em>cplxblur</em>)</samp>’</dt>
3612 <dd><p>Set fluctuations reduction in QP (before curve compression).
3615 <dt> ‘<samp>partitions (<em>partitions</em>)</samp>’</dt>
3616 <dd><p>Set partitions to consider as a comma-separated list of. Possible
3619 <dl compact="compact">
3620 <dt> ‘<samp>p8x8</samp>’</dt>
3621 <dd><p>8x8 P-frame partition.
3623 <dt> ‘<samp>p4x4</samp>’</dt>
3624 <dd><p>4x4 P-frame partition.
3626 <dt> ‘<samp>b8x8</samp>’</dt>
3627 <dd><p>4x4 B-frame partition.
3629 <dt> ‘<samp>i8x8</samp>’</dt>
3630 <dd><p>8x8 I-frame partition.
3632 <dt> ‘<samp>i4x4</samp>’</dt>
3633 <dd><p>4x4 I-frame partition.
3634 (Enabling ‘<samp>p4x4</samp>’ requires ‘<samp>p8x8</samp>’ to be enabled. Enabling
3635 ‘<samp>i8x8</samp>’ requires adaptive spatial transform (‘<samp>8x8dct</samp>’
3636 option) to be enabled.)
3638 <dt> ‘<samp>none (<em>none</em>)</samp>’</dt>
3639 <dd><p>Do not consider any partitions.
3641 <dt> ‘<samp>all (<em>all</em>)</samp>’</dt>
3642 <dd><p>Consider every partition.
3647 <dt> ‘<samp>direct-pred (<em>direct</em>)</samp>’</dt>
3648 <dd><p>Set direct MV prediction mode. Possible values:
3650 <dl compact="compact">
3651 <dt> ‘<samp>none (<em>none</em>)</samp>’</dt>
3652 <dd><p>Disable MV prediction.
3654 <dt> ‘<samp>spatial (<em>spatial</em>)</samp>’</dt>
3655 <dd><p>Enable spatial predicting.
3657 <dt> ‘<samp>temporal (<em>temporal</em>)</samp>’</dt>
3658 <dd><p>Enable temporal predicting.
3660 <dt> ‘<samp>auto (<em>auto</em>)</samp>’</dt>
3661 <dd><p>Automatically decided.
3666 <dt> ‘<samp>slice-max-size (<em>slice-max-size</em>)</samp>’</dt>
3667 <dd><p>Set the limit of the size of each slice in bytes. If not specified
3668 but RTP payload size (‘<samp>ps</samp>’) is specified, that is used.
3671 <dt> ‘<samp>stats (<em>stats</em>)</samp>’</dt>
3672 <dd><p>Set the file name for multi-pass stats.
3675 <dt> ‘<samp>nal-hrd (<em>nal-hrd</em>)</samp>’</dt>
3676 <dd><p>Set signal HRD information (requires ‘<samp>vbv-bufsize</samp>’ to be set).
3679 <dl compact="compact">
3680 <dt> ‘<samp>none (<em>none</em>)</samp>’</dt>
3681 <dd><p>Disable HRD information signaling.
3683 <dt> ‘<samp>vbr (<em>vbr</em>)</samp>’</dt>
3684 <dd><p>Variable bit rate.
3686 <dt> ‘<samp>cbr (<em>cbr</em>)</samp>’</dt>
3687 <dd><p>Constant bit rate (not allowed in MP4 container).
3692 <dt> ‘<samp>x264opts (N.A.)</samp>’</dt>
3693 <dd><p>Set any x264 option, see <code>x264 --fullhelp</code> for a list.
3695 <p>Argument is a list of <var>key</var>=<var>value</var> couples separated by
3696 ":". In <var>filter</var> and <var>psy-rd</var> options that use ":" as a separator
3697 themselves, use "," instead. They accept it as well since long ago but this
3698 is kept undocumented for some reason.
3700 <p>For example to specify libx264 encoding options with <code>ffmpeg</code>:
3701 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
3702 </pre></td></tr></table>
3705 <dt> ‘<samp>x264-params (N.A.)</samp>’</dt>
3706 <dd><p>Override the x264 configuration using a :-separated list of key=value
3709 <p>This option is functionally the same as the ‘<samp>x264opts</samp>’, but is
3710 duplicated for compability with the Libav fork.
3712 <p>For example to specify libx264 encoding options with <code>ffmpeg</code>:
3713 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
3714 cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
3715 no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
3716 </pre></td></tr></table>
3720 <p>Encoding ffpresets for common usages are provided so they can be used with the
3721 general presets system (e.g. passing the ‘<samp>pre</samp>’ option).
3723 <a name="libxvid"></a>
3724 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libxvid">9.4 libxvid</a></h2>
3726 <p>Xvid MPEG-4 Part 2 encoder wrapper.
3728 <p>This encoder requires the presence of the libxvidcore headers and library
3729 during configuration. You need to explicitly configure the build with
3730 <code>--enable-libxvid --enable-gpl</code>.
3732 <p>The native <code>mpeg4</code> encoder supports the MPEG-4 Part 2 format, so
3733 users can encode to this format without this library.
3735 <a name="Options-2"></a>
3736 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-2">9.4.1 Options</a></h3>
3738 <p>The following options are supported by the libxvid wrapper. Some of
3739 the following options are listed but are not documented, and
3740 correspond to shared codec options. See <a href="#codec_002doptions">the Codec Options chapter</a> for their documentation. The other shared options
3741 which are not listed have no effect for the libxvid encoder.
3743 <dl compact="compact">
3744 <dt> ‘<samp>b</samp>’</dt>
3745 <dt> ‘<samp>g</samp>’</dt>
3746 <dt> ‘<samp>qmin</samp>’</dt>
3747 <dt> ‘<samp>qmax</samp>’</dt>
3748 <dt> ‘<samp>mpeg_quant</samp>’</dt>
3749 <dt> ‘<samp>threads</samp>’</dt>
3750 <dt> ‘<samp>bf</samp>’</dt>
3751 <dt> ‘<samp>b_qfactor</samp>’</dt>
3752 <dt> ‘<samp>b_qoffset</samp>’</dt>
3753 <dt> ‘<samp>flags</samp>’</dt>
3754 <dd><p>Set specific encoding flags. Possible values:
3756 <dl compact="compact">
3757 <dt> ‘<samp>mv4</samp>’</dt>
3758 <dd><p>Use four motion vector by macroblock.
3761 <dt> ‘<samp>aic</samp>’</dt>
3762 <dd><p>Enable high quality AC prediction.
3765 <dt> ‘<samp>gray</samp>’</dt>
3766 <dd><p>Only encode grayscale.
3769 <dt> ‘<samp>gmc</samp>’</dt>
3770 <dd><p>Enable the use of global motion compensation (GMC).
3773 <dt> ‘<samp>qpel</samp>’</dt>
3774 <dd><p>Enable quarter-pixel motion compensation.
3777 <dt> ‘<samp>cgop</samp>’</dt>
3778 <dd><p>Enable closed GOP.
3781 <dt> ‘<samp>global_header</samp>’</dt>
3782 <dd><p>Place global headers in extradata instead of every keyframe.
3788 <dt> ‘<samp>trellis</samp>’</dt>
3789 <dt> ‘<samp>me_method</samp>’</dt>
3790 <dd><p>Set motion estimation method. Possible values in decreasing order of
3791 speed and increasing order of quality:
3793 <dl compact="compact">
3794 <dt> ‘<samp>zero</samp>’</dt>
3795 <dd><p>Use no motion estimation (default).
3798 <dt> ‘<samp>phods</samp>’</dt>
3799 <dt> ‘<samp>x1</samp>’</dt>
3800 <dt> ‘<samp>log</samp>’</dt>
3801 <dd><p>Enable advanced diamond zonal search for 16x16 blocks and half-pixel
3802 refinement for 16x16 blocks. ‘<samp>x1</samp>’ and ‘<samp>log</samp>’ are aliases for
3803 ‘<samp>phods</samp>’.
3806 <dt> ‘<samp>epzs</samp>’</dt>
3807 <dd><p>Enable all of the things described above, plus advanced diamond zonal
3808 search for 8x8 blocks, half-pixel refinement for 8x8 blocks, and motion
3809 estimation on chroma planes.
3812 <dt> ‘<samp>full</samp>’</dt>
3813 <dd><p>Enable all of the things described above, plus extended 16x16 and 8x8
3819 <dt> ‘<samp>mbd</samp>’</dt>
3820 <dd><p>Set macroblock decision algorithm. Possible values in the increasing
3823 <dl compact="compact">
3824 <dt> ‘<samp>simple</samp>’</dt>
3825 <dd><p>Use macroblock comparing function algorithm (default).
3828 <dt> ‘<samp>bits</samp>’</dt>
3829 <dd><p>Enable rate distortion-based half pixel and quarter pixel refinement for
3833 <dt> ‘<samp>rd</samp>’</dt>
3834 <dd><p>Enable all of the things described above, plus rate distortion-based
3835 half pixel and quarter pixel refinement for 8x8 blocks, and rate
3836 distortion-based search using square pattern.
3841 <dt> ‘<samp>lumi_aq</samp>’</dt>
3842 <dd><p>Enable lumi masking adaptive quantization when set to 1. Default is 0
3846 <dt> ‘<samp>variance_aq</samp>’</dt>
3847 <dd><p>Enable variance adaptive quantization when set to 1. Default is 0
3850 <p>When combined with ‘<samp>lumi_aq</samp>’, the resulting quality will not
3851 be better than any of the two specified individually. In other
3852 words, the resulting quality will be the worse one of the two
3856 <dt> ‘<samp>ssim</samp>’</dt>
3857 <dd><p>Set structural similarity (SSIM) displaying method. Possible values:
3859 <dl compact="compact">
3860 <dt> ‘<samp>off</samp>’</dt>
3861 <dd><p>Disable displaying of SSIM information.
3864 <dt> ‘<samp>avg</samp>’</dt>
3865 <dd><p>Output average SSIM at the end of encoding to stdout. The format of
3866 showing the average SSIM is:
3868 <table><tr><td> </td><td><pre class="example">Average SSIM: %f
3869 </pre></td></tr></table>
3871 <p>For users who are not familiar with C, %f means a float number, or
3872 a decimal (e.g. 0.939232).
3875 <dt> ‘<samp>frame</samp>’</dt>
3876 <dd><p>Output both per-frame SSIM data during encoding and average SSIM at
3877 the end of encoding to stdout. The format of per-frame information
3880 <table><tr><td> </td><td><pre class="example"> SSIM: avg: %1.3f min: %1.3f max: %1.3f
3881 </pre></td></tr></table>
3883 <p>For users who are not familiar with C, %1.3f means a float number
3884 rounded to 3 digits after the dot (e.g. 0.932).
3890 <dt> ‘<samp>ssim_acc</samp>’</dt>
3891 <dd><p>Set SSIM accuracy. Valid options are integers within the range of
3892 0-4, while 0 gives the most accurate result and 4 computes the
3899 <h2 class="section"><a href="ffmpeg-codecs.html#toc-png">9.5 png</a></h2>
3901 <p>PNG image encoder.
3903 <a name="Private-options"></a>
3904 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Private-options">9.5.1 Private options</a></h3>
3906 <dl compact="compact">
3907 <dt> ‘<samp>dpi <var>integer</var></samp>’</dt>
3908 <dd><p>Set physical density of pixels, in dots per inch, unset by default
3910 <dt> ‘<samp>dpm <var>integer</var></samp>’</dt>
3911 <dd><p>Set physical density of pixels, in dots per meter, unset by default
3915 <a name="ProRes"></a>
3916 <h2 class="section"><a href="ffmpeg-codecs.html#toc-ProRes">9.6 ProRes</a></h2>
3918 <p>Apple ProRes encoder.
3920 <p>FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
3921 The used encoder can be choosen with the <code>-vcodec</code> option.
3923 <a name="Private-Options-for-prores_002dks"></a>
3924 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Private-Options-for-prores_002dks">9.6.1 Private Options for prores-ks</a></h3>
3926 <dl compact="compact">
3927 <dt> ‘<samp>profile <var>integer</var></samp>’</dt>
3928 <dd><p>Select the ProRes profile to encode
3929 </p><dl compact="compact">
3930 <dt> ‘<samp>proxy</samp>’</dt>
3931 <dt> ‘<samp>lt</samp>’</dt>
3932 <dt> ‘<samp>standard</samp>’</dt>
3933 <dt> ‘<samp>hq</samp>’</dt>
3934 <dt> ‘<samp>4444</samp>’</dt>
3938 <dt> ‘<samp>quant_mat <var>integer</var></samp>’</dt>
3939 <dd><p>Select quantization matrix.
3940 </p><dl compact="compact">
3941 <dt> ‘<samp>auto</samp>’</dt>
3942 <dt> ‘<samp>default</samp>’</dt>
3943 <dt> ‘<samp>proxy</samp>’</dt>
3944 <dt> ‘<samp>lt</samp>’</dt>
3945 <dt> ‘<samp>standard</samp>’</dt>
3946 <dt> ‘<samp>hq</samp>’</dt>
3948 <p>If set to <var>auto</var>, the matrix matching the profile will be picked.
3949 If not set, the matrix providing the highest quality, <var>default</var>, will be
3953 <dt> ‘<samp>bits_per_mb <var>integer</var></samp>’</dt>
3954 <dd><p>How many bits to allot for coding one macroblock. Different profiles use
3955 between 200 and 2400 bits per macroblock, the maximum is 8000.
3958 <dt> ‘<samp>mbs_per_slice <var>integer</var></samp>’</dt>
3959 <dd><p>Number of macroblocks in each slice (1-8); the default value (8)
3960 should be good in almost all situations.
3963 <dt> ‘<samp>vendor <var>string</var></samp>’</dt>
3964 <dd><p>Override the 4-byte vendor ID.
3965 A custom vendor ID like <var>apl0</var> would claim the stream was produced by
3969 <dt> ‘<samp>alpha_bits <var>integer</var></samp>’</dt>
3970 <dd><p>Specify number of bits for alpha component.
3971 Possible values are <var>0</var>, <var>8</var> and <var>16</var>.
3972 Use <var>0</var> to disable alpha plane coding.
3977 <a name="Speed-considerations"></a>
3978 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Speed-considerations">9.6.2 Speed considerations</a></h3>
3980 <p>In the default mode of operation the encoder has to honor frame constraints
3981 (i.e. not produc frames with size bigger than requested) while still making
3982 output picture as good as possible.
3983 A frame containing a lot of small details is harder to compress and the encoder
3984 would spend more time searching for appropriate quantizers for each slice.
3986 <p>Setting a higher ‘<samp>bits_per_mb</samp>’ limit will improve the speed.
3988 <p>For the fastest encoding speed set the ‘<samp>qscale</samp>’ parameter (4 is the
3989 recommended value) and do not set a size constraint.
3992 <a name="See-Also"></a>
3993 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-See-Also">10. See Also</a></h1>
3995 <p><a href="ffmpeg.html">ffmpeg</a>, <a href="ffplay.html">ffplay</a>, <a href="ffprobe.html">ffprobe</a>, <a href="ffserver.html">ffserver</a>,
3996 <a href="libavcodec.html">libavcodec</a>
3999 <a name="Authors"></a>
4000 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Authors">11. Authors</a></h1>
4002 <p>The FFmpeg developers.
4004 <p>For details about the authorship, see the Git history of the project
4005 (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
4006 <code>git log</code> in the FFmpeg source directory, or browsing the
4007 online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>.
4009 <p>Maintainers for the specific components are listed in the file
4010 ‘<tt>MAINTAINERS</tt>’ in the source code tree.
4013 <footer class="footer pagination-right">
4014 <span class="label label-info">This document was generated by <em>Kyle Schwarz</em> on <em>December 14, 2013</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.</span></footer></div></div></body>