3 <!-- Created on June 19, 2014 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-2" href="#Options-2">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-ac3" href="#ac3">5.1 ac3</a>
52 <li><a name="toc-AC_002d3-Decoder-Options" href="#AC_002d3-Decoder-Options">5.1.1 AC-3 Decoder Options</a></li>
54 <li><a name="toc-ffwavesynth" href="#ffwavesynth">5.2 ffwavesynth</a></li>
55 <li><a name="toc-libcelt" href="#libcelt">5.3 libcelt</a></li>
56 <li><a name="toc-libgsm" href="#libgsm">5.4 libgsm</a></li>
57 <li><a name="toc-libilbc" href="#libilbc">5.5 libilbc</a>
59 <li><a name="toc-Options-16" href="#Options-16">5.5.1 Options</a></li>
61 <li><a name="toc-libopencore_002damrnb" href="#libopencore_002damrnb">5.6 libopencore-amrnb</a></li>
62 <li><a name="toc-libopencore_002damrwb" href="#libopencore_002damrwb">5.7 libopencore-amrwb</a></li>
63 <li><a name="toc-libopus-1" href="#libopus-1">5.8 libopus</a></li>
65 <li><a name="toc-Subtitles-Decoders" href="#Subtitles-Decoders">6. Subtitles Decoders</a>
67 <li><a name="toc-dvdsub" href="#dvdsub">6.1 dvdsub</a>
69 <li><a name="toc-Options-14" href="#Options-14">6.1.1 Options</a></li>
71 <li><a name="toc-libzvbi_002dteletext" href="#libzvbi_002dteletext">6.2 libzvbi-teletext</a>
73 <li><a name="toc-Options-18" href="#Options-18">6.2.1 Options</a></li>
77 <li><a name="toc-Encoders" href="#Encoders">7. Encoders</a></li>
78 <li><a name="toc-Audio-Encoders" href="#Audio-Encoders">8. Audio Encoders</a>
80 <li><a name="toc-aac" href="#aac">8.1 aac</a>
82 <li><a name="toc-Options-8" href="#Options-8">8.1.1 Options</a></li>
84 <li><a name="toc-ac3-and-ac3_005ffixed" href="#ac3-and-ac3_005ffixed">8.2 ac3 and ac3_fixed</a>
86 <li><a name="toc-AC_002d3-Metadata" href="#AC_002d3-Metadata">8.2.1 AC-3 Metadata</a>
88 <li><a name="toc-Metadata-Control-Options" href="#Metadata-Control-Options">8.2.1.1 Metadata Control Options</a></li>
89 <li><a name="toc-Downmix-Levels" href="#Downmix-Levels">8.2.1.2 Downmix Levels</a></li>
90 <li><a name="toc-Audio-Production-Information" href="#Audio-Production-Information">8.2.1.3 Audio Production Information</a></li>
91 <li><a name="toc-Other-Metadata-Options" href="#Other-Metadata-Options">8.2.1.4 Other Metadata Options</a></li>
93 <li><a name="toc-Extended-Bitstream-Information" href="#Extended-Bitstream-Information">8.2.2 Extended Bitstream Information</a>
95 <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>
96 <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>
98 <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>
99 <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>
101 <li><a name="toc-libfaac-1" href="#libfaac-1">8.3 libfaac</a>
103 <li><a name="toc-Options-12" href="#Options-12">8.3.1 Options</a></li>
104 <li><a name="toc-Examples-2" href="#Examples-2">8.3.2 Examples</a></li>
106 <li><a name="toc-libfdk_005faac" href="#libfdk_005faac">8.4 libfdk_aac</a>
108 <li><a name="toc-Options-13" href="#Options-13">8.4.1 Options</a></li>
109 <li><a name="toc-Examples-1" href="#Examples-1">8.4.2 Examples</a></li>
111 <li><a name="toc-libmp3lame-1" href="#libmp3lame-1">8.5 libmp3lame</a>
113 <li><a name="toc-Options-5" href="#Options-5">8.5.1 Options</a></li>
115 <li><a name="toc-libopencore_002damrnb-1" href="#libopencore_002damrnb-1">8.6 libopencore-amrnb</a>
117 <li><a name="toc-Options" href="#Options">8.6.1 Options</a></li>
119 <li><a name="toc-libshine-1" href="#libshine-1">8.7 libshine</a>
121 <li><a name="toc-Options-4" href="#Options-4">8.7.1 Options</a></li>
123 <li><a name="toc-libtwolame" href="#libtwolame">8.8 libtwolame</a>
125 <li><a name="toc-Options-6" href="#Options-6">8.8.1 Options</a></li>
127 <li><a name="toc-libvo_002daacenc-1" href="#libvo_002daacenc-1">8.9 libvo-aacenc</a>
129 <li><a name="toc-Options-17" href="#Options-17">8.9.1 Options</a></li>
131 <li><a name="toc-libvo_002damrwbenc" href="#libvo_002damrwbenc">8.10 libvo-amrwbenc</a>
133 <li><a name="toc-Options-3" href="#Options-3">8.10.1 Options</a></li>
135 <li><a name="toc-libopus" href="#libopus">8.11 libopus</a>
137 <li><a name="toc-Option-Mapping" href="#Option-Mapping">8.11.1 Option Mapping</a></li>
139 <li><a name="toc-libvorbis" href="#libvorbis">8.12 libvorbis</a>
141 <li><a name="toc-Options-10" href="#Options-10">8.12.1 Options</a></li>
143 <li><a name="toc-libwavpack-1" href="#libwavpack-1">8.13 libwavpack</a>
145 <li><a name="toc-Options-15" href="#Options-15">8.13.1 Options</a></li>
147 <li><a name="toc-wavpack" href="#wavpack">8.14 wavpack</a>
149 <li><a name="toc-Options-11" href="#Options-11">8.14.1 Options</a>
151 <li><a name="toc-Shared-options" href="#Shared-options">8.14.1.1 Shared options</a></li>
152 <li><a name="toc-Private-options" href="#Private-options">8.14.1.2 Private options</a></li>
158 <li><a name="toc-Video-Encoders" href="#Video-Encoders">9. Video Encoders</a>
160 <li><a name="toc-libtheora" href="#libtheora">9.1 libtheora</a>
162 <li><a name="toc-Options-1" href="#Options-1">9.1.1 Options</a></li>
163 <li><a name="toc-Examples" href="#Examples">9.1.2 Examples</a></li>
165 <li><a name="toc-libvpx" href="#libvpx">9.2 libvpx</a>
167 <li><a name="toc-Options-20" href="#Options-20">9.2.1 Options</a></li>
169 <li><a name="toc-libwebp" href="#libwebp">9.3 libwebp</a>
171 <li><a name="toc-Pixel-Format" href="#Pixel-Format">9.3.1 Pixel Format</a></li>
172 <li><a name="toc-Options-7" href="#Options-7">9.3.2 Options</a></li>
174 <li><a name="toc-libx264_002c-libx264rgb" href="#libx264_002c-libx264rgb">9.4 libx264, libx264rgb</a>
176 <li><a name="toc-Supported-Pixel-Formats" href="#Supported-Pixel-Formats">9.4.1 Supported Pixel Formats</a></li>
177 <li><a name="toc-Options-19" href="#Options-19">9.4.2 Options</a></li>
179 <li><a name="toc-libxvid" href="#libxvid">9.5 libxvid</a>
181 <li><a name="toc-Options-9" href="#Options-9">9.5.1 Options</a></li>
183 <li><a name="toc-png" href="#png">9.6 png</a>
185 <li><a name="toc-Private-options-1" href="#Private-options-1">9.6.1 Private options</a></li>
187 <li><a name="toc-ProRes" href="#ProRes">9.7 ProRes</a>
189 <li><a name="toc-Private-Options-for-prores_002dks" href="#Private-Options-for-prores_002dks">9.7.1 Private Options for prores-ks</a></li>
190 <li><a name="toc-Speed-considerations" href="#Speed-considerations">9.7.2 Speed considerations</a></li>
194 <li><a name="toc-See-Also" href="#See-Also">10. See Also</a></li>
195 <li><a name="toc-Authors" href="#Authors">11. Authors</a></li>
199 <a name="Description"></a>
200 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Description">1. Description</a></h1>
202 <p>This document describes the codecs (decoders and encoders) provided by
203 the libavcodec library.
206 <p><a name="codec_002doptions"></a>
207 </p><a name="Codec-Options"></a>
208 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Codec-Options">2. Codec Options</a></h1>
210 <p>libavcodec provides some generic global options, which can be set on
211 all the encoders and decoders. In addition each codec may support
212 so-called private options, which are specific for a given codec.
214 <p>Sometimes, a global option may only affect a specific kind of codec,
215 and may be unsensical or ignored by another, so you need to be aware
216 of the meaning of the specified options. Also some options are
217 meant only for decoding or encoding.
219 <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
220 FFmpeg tools, or by setting the value explicitly in the
221 <code>AVCodecContext</code> options or using the ‘<tt>libavutil/opt.h</tt>’ API
222 for programmatic use.
224 <p>The list of supported options follow:
226 <dl compact="compact">
227 <dt> ‘<samp>b <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
228 <dd><p>Set bitrate in bits/s. Default value is 200K.
231 <dt> ‘<samp>ab <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
232 <dd><p>Set audio bitrate (in bits/s). Default value is 128K.
235 <dt> ‘<samp>bt <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
236 <dd><p>Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate
237 tolerance specifies how far ratecontrol is willing to deviate from the
238 target average bitrate value. This is not related to min/max
239 bitrate. Lowering tolerance too much has an adverse effect on quality.
242 <dt> ‘<samp>flags <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp>’</dt>
243 <dd><p>Set generic flags.
246 </p><dl compact="compact">
247 <dt> ‘<samp>mv4</samp>’</dt>
248 <dd><p>Use four motion vector by macroblock (mpeg4).
250 <dt> ‘<samp>qpel</samp>’</dt>
251 <dd><p>Use 1/4 pel motion compensation.
253 <dt> ‘<samp>loop</samp>’</dt>
254 <dd><p>Use loop filter.
256 <dt> ‘<samp>qscale</samp>’</dt>
257 <dd><p>Use fixed qscale.
259 <dt> ‘<samp>gmc</samp>’</dt>
262 <dt> ‘<samp>mv0</samp>’</dt>
263 <dd><p>Always try a mb with mv=<0,0>.
265 <dt> ‘<samp>input_preserved</samp>’</dt>
266 <dt> ‘<samp>pass1</samp>’</dt>
267 <dd><p>Use internal 2pass ratecontrol in first pass mode.
269 <dt> ‘<samp>pass2</samp>’</dt>
270 <dd><p>Use internal 2pass ratecontrol in second pass mode.
272 <dt> ‘<samp>gray</samp>’</dt>
273 <dd><p>Only decode/encode grayscale.
275 <dt> ‘<samp>emu_edge</samp>’</dt>
276 <dd><p>Do not draw edges.
278 <dt> ‘<samp>psnr</samp>’</dt>
279 <dd><p>Set error[?] variables during encoding.
281 <dt> ‘<samp>truncated</samp>’</dt>
282 <dt> ‘<samp>naq</samp>’</dt>
283 <dd><p>Normalize adaptive quantization.
285 <dt> ‘<samp>ildct</samp>’</dt>
286 <dd><p>Use interlaced DCT.
288 <dt> ‘<samp>low_delay</samp>’</dt>
289 <dd><p>Force low delay.
291 <dt> ‘<samp>global_header</samp>’</dt>
292 <dd><p>Place global headers in extradata instead of every keyframe.
294 <dt> ‘<samp>bitexact</samp>’</dt>
295 <dd><p>Use only bitexact stuff (except (I)DCT).
297 <dt> ‘<samp>aic</samp>’</dt>
298 <dd><p>Apply H263 advanced intra coding / mpeg4 ac prediction.
300 <dt> ‘<samp>cbp</samp>’</dt>
301 <dd><p>Deprecated, use mpegvideo private options instead.
303 <dt> ‘<samp>qprd</samp>’</dt>
304 <dd><p>Deprecated, use mpegvideo private options instead.
306 <dt> ‘<samp>ilme</samp>’</dt>
307 <dd><p>Apply interlaced motion estimation.
309 <dt> ‘<samp>cgop</samp>’</dt>
310 <dd><p>Use closed gop.
315 <dt> ‘<samp>me_method <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
316 <dd><p>Set motion estimation method.
319 </p><dl compact="compact">
320 <dt> ‘<samp>zero</samp>’</dt>
321 <dd><p>zero motion estimation (fastest)
323 <dt> ‘<samp>full</samp>’</dt>
324 <dd><p>full motion estimation (slowest)
326 <dt> ‘<samp>epzs</samp>’</dt>
327 <dd><p>EPZS motion estimation (default)
329 <dt> ‘<samp>esa</samp>’</dt>
330 <dd><p>esa motion estimation (alias for full)
332 <dt> ‘<samp>tesa</samp>’</dt>
333 <dd><p>tesa motion estimation
335 <dt> ‘<samp>dia</samp>’</dt>
336 <dd><p>dia motion estimation (alias for epzs)
338 <dt> ‘<samp>log</samp>’</dt>
339 <dd><p>log motion estimation
341 <dt> ‘<samp>phods</samp>’</dt>
342 <dd><p>phods motion estimation
344 <dt> ‘<samp>x1</samp>’</dt>
345 <dd><p>X1 motion estimation
347 <dt> ‘<samp>hex</samp>’</dt>
348 <dd><p>hex motion estimation
350 <dt> ‘<samp>umh</samp>’</dt>
351 <dd><p>umh motion estimation
353 <dt> ‘<samp>iter</samp>’</dt>
354 <dd><p>iter motion estimation
359 <dt> ‘<samp>extradata_size <var>integer</var></samp>’</dt>
360 <dd><p>Set extradata size.
363 <dt> ‘<samp>time_base <var>rational number</var></samp>’</dt>
364 <dd><p>Set codec time base.
366 <p>It is the fundamental unit of time (in seconds) in terms of which
367 frame timestamps are represented. For fixed-fps content, timebase
368 should be <code>1 / frame_rate</code> and timestamp increments should be
372 <dt> ‘<samp>g <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
373 <dd><p>Set the group of picture size. Default value is 12.
376 <dt> ‘<samp>ar <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>’</dt>
377 <dd><p>Set audio sampling rate (in Hz).
380 <dt> ‘<samp>ac <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>’</dt>
381 <dd><p>Set number of audio channels.
384 <dt> ‘<samp>cutoff <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
385 <dd><p>Set cutoff bandwidth.
388 <dt> ‘<samp>frame_size <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
389 <dd><p>Set audio frame size.
391 <p>Each submitted frame except the last must contain exactly frame_size
392 samples per channel. May be 0 when the codec has
393 CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is not
394 restricted. It is set by some decoders to indicate constant frame
398 <dt> ‘<samp>frame_number <var>integer</var></samp>’</dt>
399 <dd><p>Set the frame number.
402 <dt> ‘<samp>delay <var>integer</var></samp>’</dt>
403 <dt> ‘<samp>qcomp <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
404 <dd><p>Set video quantizer scale compression (VBR). It is used as a constant
405 in the ratecontrol equation. Recommended range for default rc_eq:
409 <dt> ‘<samp>qblur <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
410 <dd><p>Set video quantizer scale blur (VBR).
413 <dt> ‘<samp>qmin <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
414 <dd><p>Set min video quantizer scale (VBR). Must be included between -1 and
415 69, default value is 2.
418 <dt> ‘<samp>qmax <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
419 <dd><p>Set max video quantizer scale (VBR). Must be included between -1 and
420 1024, default value is 31.
423 <dt> ‘<samp>qdiff <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
424 <dd><p>Set max difference between the quantizer scale (VBR).
427 <dt> ‘<samp>bf <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
428 <dd><p>Set max number of B frames between non-B-frames.
430 <p>Must be an integer between -1 and 16. 0 means that B-frames are
431 disabled. If a value of -1 is used, it will choose an automatic value
432 depending on the encoder.
434 <p>Default value is 0.
437 <dt> ‘<samp>b_qfactor <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
438 <dd><p>Set qp factor between P and B frames.
441 <dt> ‘<samp>rc_strategy <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
442 <dd><p>Set ratecontrol method.
445 <dt> ‘<samp>b_strategy <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
446 <dd><p>Set strategy to choose between I/P/B-frames.
449 <dt> ‘<samp>ps <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
450 <dd><p>Set RTP payload size in bytes.
453 <dt> ‘<samp>mv_bits <var>integer</var></samp>’</dt>
454 <dt> ‘<samp>header_bits <var>integer</var></samp>’</dt>
455 <dt> ‘<samp>i_tex_bits <var>integer</var></samp>’</dt>
456 <dt> ‘<samp>p_tex_bits <var>integer</var></samp>’</dt>
457 <dt> ‘<samp>i_count <var>integer</var></samp>’</dt>
458 <dt> ‘<samp>p_count <var>integer</var></samp>’</dt>
459 <dt> ‘<samp>skip_count <var>integer</var></samp>’</dt>
460 <dt> ‘<samp>misc_bits <var>integer</var></samp>’</dt>
461 <dt> ‘<samp>frame_bits <var>integer</var></samp>’</dt>
462 <dt> ‘<samp>codec_tag <var>integer</var></samp>’</dt>
463 <dt> ‘<samp>bug <var>flags</var> (<em>decoding,video</em>)</samp>’</dt>
464 <dd><p>Workaround not auto detected encoder bugs.
467 </p><dl compact="compact">
468 <dt> ‘<samp>autodetect</samp>’</dt>
469 <dt> ‘<samp>old_msmpeg4</samp>’</dt>
470 <dd><p>some old lavc generated msmpeg4v3 files (no autodetection)
472 <dt> ‘<samp>xvid_ilace</samp>’</dt>
473 <dd><p>Xvid interlacing bug (autodetected if fourcc==XVIX)
475 <dt> ‘<samp>ump4</samp>’</dt>
476 <dd><p>(autodetected if fourcc==UMP4)
478 <dt> ‘<samp>no_padding</samp>’</dt>
479 <dd><p>padding bug (autodetected)
481 <dt> ‘<samp>amv</samp>’</dt>
482 <dt> ‘<samp>ac_vlc</samp>’</dt>
483 <dd><p>illegal vlc bug (autodetected per fourcc)
485 <dt> ‘<samp>qpel_chroma</samp>’</dt>
486 <dt> ‘<samp>std_qpel</samp>’</dt>
487 <dd><p>old standard qpel (autodetected per fourcc/version)
489 <dt> ‘<samp>qpel_chroma2</samp>’</dt>
490 <dt> ‘<samp>direct_blocksize</samp>’</dt>
491 <dd><p>direct-qpel-blocksize bug (autodetected per fourcc/version)
493 <dt> ‘<samp>edge</samp>’</dt>
494 <dd><p>edge padding bug (autodetected per fourcc/version)
496 <dt> ‘<samp>hpel_chroma</samp>’</dt>
497 <dt> ‘<samp>dc_clip</samp>’</dt>
498 <dt> ‘<samp>ms</samp>’</dt>
499 <dd><p>Workaround various bugs in microsoft broken decoders.
501 <dt> ‘<samp>trunc</samp>’</dt>
502 <dd><p>trancated frames
507 <dt> ‘<samp>lelim <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
508 <dd><p>Set single coefficient elimination threshold for luminance (negative
509 values also consider DC coefficient).
512 <dt> ‘<samp>celim <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
513 <dd><p>Set single coefficient elimination threshold for chrominance (negative
514 values also consider dc coefficient)
517 <dt> ‘<samp>strict <var>integer</var> (<em>decoding/encoding,audio,video</em>)</samp>’</dt>
518 <dd><p>Specify how strictly to follow the standards.
521 </p><dl compact="compact">
522 <dt> ‘<samp>very</samp>’</dt>
523 <dd><p>strictly conform to a older more strict version of the spec or reference software
525 <dt> ‘<samp>strict</samp>’</dt>
526 <dd><p>strictly conform to all the things in the spec no matter what consequences
528 <dt> ‘<samp>normal</samp>’</dt>
529 <dt> ‘<samp>unofficial</samp>’</dt>
530 <dd><p>allow unofficial extensions
532 <dt> ‘<samp>experimental</samp>’</dt>
533 <dd><p>allow non standardized experimental things, experimental
534 (unfinished/work in progress/not well tested) decoders and encoders.
535 Note: experimental decoders can pose a security risk, do not use this for
536 decoding untrusted input.
541 <dt> ‘<samp>b_qoffset <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
542 <dd><p>Set QP offset between P and B frames.
545 <dt> ‘<samp>err_detect <var>flags</var> (<em>decoding,audio,video</em>)</samp>’</dt>
546 <dd><p>Set error detection flags.
549 </p><dl compact="compact">
550 <dt> ‘<samp>crccheck</samp>’</dt>
551 <dd><p>verify embedded CRCs
553 <dt> ‘<samp>bitstream</samp>’</dt>
554 <dd><p>detect bitstream specification deviations
556 <dt> ‘<samp>buffer</samp>’</dt>
557 <dd><p>detect improper bitstream length
559 <dt> ‘<samp>explode</samp>’</dt>
560 <dd><p>abort decoding on minor error detection
562 <dt> ‘<samp>careful</samp>’</dt>
563 <dd><p>consider things that violate the spec and have not been seen in the wild as errors
565 <dt> ‘<samp>compliant</samp>’</dt>
566 <dd><p>consider all spec non compliancies as errors
568 <dt> ‘<samp>aggressive</samp>’</dt>
569 <dd><p>consider things that a sane encoder should not do as an error
574 <dt> ‘<samp>has_b_frames <var>integer</var></samp>’</dt>
575 <dt> ‘<samp>block_align <var>integer</var></samp>’</dt>
576 <dt> ‘<samp>mpeg_quant <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
577 <dd><p>Use MPEG quantizers instead of H.263.
580 <dt> ‘<samp>qsquish <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
581 <dd><p>How to keep quantizer between qmin and qmax (0 = clip, 1 = use
582 differentiable function).
585 <dt> ‘<samp>rc_qmod_amp <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
586 <dd><p>Set experimental quantizer modulation.
589 <dt> ‘<samp>rc_qmod_freq <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
590 <dd><p>Set experimental quantizer modulation.
593 <dt> ‘<samp>rc_override_count <var>integer</var></samp>’</dt>
594 <dt> ‘<samp>rc_eq <var>string</var> (<em>encoding,video</em>)</samp>’</dt>
595 <dd><p>Set rate control equation. When computing the expression, besides the
596 standard functions defined in the section ’Expression Evaluation’, the
597 following functions are available: bits2qp(bits), qp2bits(qp). Also
598 the following constants are available: iTex pTex tex mv fCode iCount
599 mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex
603 <dt> ‘<samp>maxrate <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
604 <dd><p>Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
607 <dt> ‘<samp>minrate <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
608 <dd><p>Set min bitrate tolerance (in bits/s). Most useful in setting up a CBR
609 encode. It is of little use elsewise.
612 <dt> ‘<samp>bufsize <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
613 <dd><p>Set ratecontrol buffer size (in bits).
616 <dt> ‘<samp>rc_buf_aggressivity <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
617 <dd><p>Currently useless.
620 <dt> ‘<samp>i_qfactor <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
621 <dd><p>Set QP factor between P and I frames.
624 <dt> ‘<samp>i_qoffset <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
625 <dd><p>Set QP offset between P and I frames.
628 <dt> ‘<samp>rc_init_cplx <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
629 <dd><p>Set initial complexity for 1-pass encoding.
632 <dt> ‘<samp>dct <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
633 <dd><p>Set DCT algorithm.
636 </p><dl compact="compact">
637 <dt> ‘<samp>auto</samp>’</dt>
638 <dd><p>autoselect a good one (default)
640 <dt> ‘<samp>fastint</samp>’</dt>
643 <dt> ‘<samp>int</samp>’</dt>
644 <dd><p>accurate integer
646 <dt> ‘<samp>mmx</samp>’</dt>
647 <dt> ‘<samp>altivec</samp>’</dt>
648 <dt> ‘<samp>faan</samp>’</dt>
649 <dd><p>floating point AAN DCT
654 <dt> ‘<samp>lumi_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
655 <dd><p>Compress bright areas stronger than medium ones.
658 <dt> ‘<samp>tcplx_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
659 <dd><p>Set temporal complexity masking.
662 <dt> ‘<samp>scplx_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
663 <dd><p>Set spatial complexity masking.
666 <dt> ‘<samp>p_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
667 <dd><p>Set inter masking.
670 <dt> ‘<samp>dark_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
671 <dd><p>Compress dark areas stronger than medium ones.
674 <dt> ‘<samp>idct <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
675 <dd><p>Select IDCT implementation.
678 </p><dl compact="compact">
679 <dt> ‘<samp>auto</samp>’</dt>
680 <dt> ‘<samp>int</samp>’</dt>
681 <dt> ‘<samp>simple</samp>’</dt>
682 <dt> ‘<samp>simplemmx</samp>’</dt>
683 <dt> ‘<samp>arm</samp>’</dt>
684 <dt> ‘<samp>altivec</samp>’</dt>
685 <dt> ‘<samp>sh4</samp>’</dt>
686 <dt> ‘<samp>simplearm</samp>’</dt>
687 <dt> ‘<samp>simplearmv5te</samp>’</dt>
688 <dt> ‘<samp>simplearmv6</samp>’</dt>
689 <dt> ‘<samp>simpleneon</samp>’</dt>
690 <dt> ‘<samp>simplealpha</samp>’</dt>
691 <dt> ‘<samp>ipp</samp>’</dt>
692 <dt> ‘<samp>xvidmmx</samp>’</dt>
693 <dt> ‘<samp>faani</samp>’</dt>
694 <dd><p>floating point AAN IDCT
699 <dt> ‘<samp>slice_count <var>integer</var></samp>’</dt>
700 <dt> ‘<samp>ec <var>flags</var> (<em>decoding,video</em>)</samp>’</dt>
701 <dd><p>Set error concealment strategy.
704 </p><dl compact="compact">
705 <dt> ‘<samp>guess_mvs</samp>’</dt>
706 <dd><p>iterative motion vector (MV) search (slow)
708 <dt> ‘<samp>deblock</samp>’</dt>
709 <dd><p>use strong deblock filter for damaged MBs
714 <dt> ‘<samp>bits_per_coded_sample <var>integer</var></samp>’</dt>
715 <dt> ‘<samp>pred <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
716 <dd><p>Set prediction method.
719 </p><dl compact="compact">
720 <dt> ‘<samp>left</samp>’</dt>
721 <dt> ‘<samp>plane</samp>’</dt>
722 <dt> ‘<samp>median</samp>’</dt>
726 <dt> ‘<samp>aspect <var>rational number</var> (<em>encoding,video</em>)</samp>’</dt>
727 <dd><p>Set sample aspect ratio.
730 <dt> ‘<samp>debug <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp>’</dt>
731 <dd><p>Print specific debug info.
734 </p><dl compact="compact">
735 <dt> ‘<samp>pict</samp>’</dt>
738 <dt> ‘<samp>rc</samp>’</dt>
741 <dt> ‘<samp>bitstream</samp>’</dt>
742 <dt> ‘<samp>mb_type</samp>’</dt>
743 <dd><p>macroblock (MB) type
745 <dt> ‘<samp>qp</samp>’</dt>
746 <dd><p>per-block quantization parameter (QP)
748 <dt> ‘<samp>mv</samp>’</dt>
751 <dt> ‘<samp>dct_coeff</samp>’</dt>
752 <dt> ‘<samp>skip</samp>’</dt>
753 <dt> ‘<samp>startcode</samp>’</dt>
754 <dt> ‘<samp>pts</samp>’</dt>
755 <dt> ‘<samp>er</samp>’</dt>
756 <dd><p>error recognition
758 <dt> ‘<samp>mmco</samp>’</dt>
759 <dd><p>memory management control operations (H.264)
761 <dt> ‘<samp>bugs</samp>’</dt>
762 <dt> ‘<samp>vis_qp</samp>’</dt>
763 <dd><p>visualize quantization parameter (QP), lower QP are tinted greener
765 <dt> ‘<samp>vis_mb_type</samp>’</dt>
766 <dd><p>visualize block types
768 <dt> ‘<samp>buffers</samp>’</dt>
769 <dd><p>picture buffer allocations
771 <dt> ‘<samp>thread_ops</samp>’</dt>
772 <dd><p>threading operations
777 <dt> ‘<samp>vismv <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
778 <dd><p>Visualize motion vectors (MVs).
781 </p><dl compact="compact">
782 <dt> ‘<samp>pf</samp>’</dt>
783 <dd><p>forward predicted MVs of P-frames
785 <dt> ‘<samp>bf</samp>’</dt>
786 <dd><p>forward predicted MVs of B-frames
788 <dt> ‘<samp>bb</samp>’</dt>
789 <dd><p>backward predicted MVs of B-frames
794 <dt> ‘<samp>cmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
795 <dd><p>Set full pel me compare function.
798 </p><dl compact="compact">
799 <dt> ‘<samp>sad</samp>’</dt>
800 <dd><p>sum of absolute differences, fast (default)
802 <dt> ‘<samp>sse</samp>’</dt>
803 <dd><p>sum of squared errors
805 <dt> ‘<samp>satd</samp>’</dt>
806 <dd><p>sum of absolute Hadamard transformed differences
808 <dt> ‘<samp>dct</samp>’</dt>
809 <dd><p>sum of absolute DCT transformed differences
811 <dt> ‘<samp>psnr</samp>’</dt>
812 <dd><p>sum of squared quantization errors (avoid, low quality)
814 <dt> ‘<samp>bit</samp>’</dt>
815 <dd><p>number of bits needed for the block
817 <dt> ‘<samp>rd</samp>’</dt>
818 <dd><p>rate distortion optimal, slow
820 <dt> ‘<samp>zero</samp>’</dt>
823 <dt> ‘<samp>vsad</samp>’</dt>
824 <dd><p>sum of absolute vertical differences
826 <dt> ‘<samp>vsse</samp>’</dt>
827 <dd><p>sum of squared vertical differences
829 <dt> ‘<samp>nsse</samp>’</dt>
830 <dd><p>noise preserving sum of squared differences
832 <dt> ‘<samp>w53</samp>’</dt>
833 <dd><p>5/3 wavelet, only used in snow
835 <dt> ‘<samp>w97</samp>’</dt>
836 <dd><p>9/7 wavelet, only used in snow
838 <dt> ‘<samp>dctmax</samp>’</dt>
839 <dt> ‘<samp>chroma</samp>’</dt>
843 <dt> ‘<samp>subcmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
844 <dd><p>Set sub pel me compare function.
847 </p><dl compact="compact">
848 <dt> ‘<samp>sad</samp>’</dt>
849 <dd><p>sum of absolute differences, fast (default)
851 <dt> ‘<samp>sse</samp>’</dt>
852 <dd><p>sum of squared errors
854 <dt> ‘<samp>satd</samp>’</dt>
855 <dd><p>sum of absolute Hadamard transformed differences
857 <dt> ‘<samp>dct</samp>’</dt>
858 <dd><p>sum of absolute DCT transformed differences
860 <dt> ‘<samp>psnr</samp>’</dt>
861 <dd><p>sum of squared quantization errors (avoid, low quality)
863 <dt> ‘<samp>bit</samp>’</dt>
864 <dd><p>number of bits needed for the block
866 <dt> ‘<samp>rd</samp>’</dt>
867 <dd><p>rate distortion optimal, slow
869 <dt> ‘<samp>zero</samp>’</dt>
872 <dt> ‘<samp>vsad</samp>’</dt>
873 <dd><p>sum of absolute vertical differences
875 <dt> ‘<samp>vsse</samp>’</dt>
876 <dd><p>sum of squared vertical differences
878 <dt> ‘<samp>nsse</samp>’</dt>
879 <dd><p>noise preserving sum of squared differences
881 <dt> ‘<samp>w53</samp>’</dt>
882 <dd><p>5/3 wavelet, only used in snow
884 <dt> ‘<samp>w97</samp>’</dt>
885 <dd><p>9/7 wavelet, only used in snow
887 <dt> ‘<samp>dctmax</samp>’</dt>
888 <dt> ‘<samp>chroma</samp>’</dt>
892 <dt> ‘<samp>mbcmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
893 <dd><p>Set macroblock compare function.
896 </p><dl compact="compact">
897 <dt> ‘<samp>sad</samp>’</dt>
898 <dd><p>sum of absolute differences, fast (default)
900 <dt> ‘<samp>sse</samp>’</dt>
901 <dd><p>sum of squared errors
903 <dt> ‘<samp>satd</samp>’</dt>
904 <dd><p>sum of absolute Hadamard transformed differences
906 <dt> ‘<samp>dct</samp>’</dt>
907 <dd><p>sum of absolute DCT transformed differences
909 <dt> ‘<samp>psnr</samp>’</dt>
910 <dd><p>sum of squared quantization errors (avoid, low quality)
912 <dt> ‘<samp>bit</samp>’</dt>
913 <dd><p>number of bits needed for the block
915 <dt> ‘<samp>rd</samp>’</dt>
916 <dd><p>rate distortion optimal, slow
918 <dt> ‘<samp>zero</samp>’</dt>
921 <dt> ‘<samp>vsad</samp>’</dt>
922 <dd><p>sum of absolute vertical differences
924 <dt> ‘<samp>vsse</samp>’</dt>
925 <dd><p>sum of squared vertical differences
927 <dt> ‘<samp>nsse</samp>’</dt>
928 <dd><p>noise preserving sum of squared differences
930 <dt> ‘<samp>w53</samp>’</dt>
931 <dd><p>5/3 wavelet, only used in snow
933 <dt> ‘<samp>w97</samp>’</dt>
934 <dd><p>9/7 wavelet, only used in snow
936 <dt> ‘<samp>dctmax</samp>’</dt>
937 <dt> ‘<samp>chroma</samp>’</dt>
941 <dt> ‘<samp>ildctcmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
942 <dd><p>Set interlaced dct compare function.
945 </p><dl compact="compact">
946 <dt> ‘<samp>sad</samp>’</dt>
947 <dd><p>sum of absolute differences, fast (default)
949 <dt> ‘<samp>sse</samp>’</dt>
950 <dd><p>sum of squared errors
952 <dt> ‘<samp>satd</samp>’</dt>
953 <dd><p>sum of absolute Hadamard transformed differences
955 <dt> ‘<samp>dct</samp>’</dt>
956 <dd><p>sum of absolute DCT transformed differences
958 <dt> ‘<samp>psnr</samp>’</dt>
959 <dd><p>sum of squared quantization errors (avoid, low quality)
961 <dt> ‘<samp>bit</samp>’</dt>
962 <dd><p>number of bits needed for the block
964 <dt> ‘<samp>rd</samp>’</dt>
965 <dd><p>rate distortion optimal, slow
967 <dt> ‘<samp>zero</samp>’</dt>
970 <dt> ‘<samp>vsad</samp>’</dt>
971 <dd><p>sum of absolute vertical differences
973 <dt> ‘<samp>vsse</samp>’</dt>
974 <dd><p>sum of squared vertical differences
976 <dt> ‘<samp>nsse</samp>’</dt>
977 <dd><p>noise preserving sum of squared differences
979 <dt> ‘<samp>w53</samp>’</dt>
980 <dd><p>5/3 wavelet, only used in snow
982 <dt> ‘<samp>w97</samp>’</dt>
983 <dd><p>9/7 wavelet, only used in snow
985 <dt> ‘<samp>dctmax</samp>’</dt>
986 <dt> ‘<samp>chroma</samp>’</dt>
990 <dt> ‘<samp>dia_size <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
991 <dd><p>Set diamond type & size for motion estimation.
994 <dt> ‘<samp>last_pred <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
995 <dd><p>Set amount of motion predictors from the previous frame.
998 <dt> ‘<samp>preme <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
999 <dd><p>Set pre motion estimation.
1002 <dt> ‘<samp>precmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1003 <dd><p>Set pre motion estimation compare function.
1006 </p><dl compact="compact">
1007 <dt> ‘<samp>sad</samp>’</dt>
1008 <dd><p>sum of absolute differences, fast (default)
1010 <dt> ‘<samp>sse</samp>’</dt>
1011 <dd><p>sum of squared errors
1013 <dt> ‘<samp>satd</samp>’</dt>
1014 <dd><p>sum of absolute Hadamard transformed differences
1016 <dt> ‘<samp>dct</samp>’</dt>
1017 <dd><p>sum of absolute DCT transformed differences
1019 <dt> ‘<samp>psnr</samp>’</dt>
1020 <dd><p>sum of squared quantization errors (avoid, low quality)
1022 <dt> ‘<samp>bit</samp>’</dt>
1023 <dd><p>number of bits needed for the block
1025 <dt> ‘<samp>rd</samp>’</dt>
1026 <dd><p>rate distortion optimal, slow
1028 <dt> ‘<samp>zero</samp>’</dt>
1031 <dt> ‘<samp>vsad</samp>’</dt>
1032 <dd><p>sum of absolute vertical differences
1034 <dt> ‘<samp>vsse</samp>’</dt>
1035 <dd><p>sum of squared vertical differences
1037 <dt> ‘<samp>nsse</samp>’</dt>
1038 <dd><p>noise preserving sum of squared differences
1040 <dt> ‘<samp>w53</samp>’</dt>
1041 <dd><p>5/3 wavelet, only used in snow
1043 <dt> ‘<samp>w97</samp>’</dt>
1044 <dd><p>9/7 wavelet, only used in snow
1046 <dt> ‘<samp>dctmax</samp>’</dt>
1047 <dt> ‘<samp>chroma</samp>’</dt>
1051 <dt> ‘<samp>pre_dia_size <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1052 <dd><p>Set diamond type & size for motion estimation pre-pass.
1055 <dt> ‘<samp>subq <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1056 <dd><p>Set sub pel motion estimation quality.
1059 <dt> ‘<samp>dtg_active_format <var>integer</var></samp>’</dt>
1060 <dt> ‘<samp>me_range <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1061 <dd><p>Set limit motion vectors range (1023 for DivX player).
1064 <dt> ‘<samp>ibias <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1065 <dd><p>Set intra quant bias.
1068 <dt> ‘<samp>pbias <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1069 <dd><p>Set inter quant bias.
1072 <dt> ‘<samp>color_table_id <var>integer</var></samp>’</dt>
1073 <dt> ‘<samp>global_quality <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
1074 <dt> ‘<samp>coder <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1077 </p><dl compact="compact">
1078 <dt> ‘<samp>vlc</samp>’</dt>
1079 <dd><p>variable length coder / huffman coder
1081 <dt> ‘<samp>ac</samp>’</dt>
1082 <dd><p>arithmetic coder
1084 <dt> ‘<samp>raw</samp>’</dt>
1085 <dd><p>raw (no encoding)
1087 <dt> ‘<samp>rle</samp>’</dt>
1088 <dd><p>run-length coder
1090 <dt> ‘<samp>deflate</samp>’</dt>
1091 <dd><p>deflate-based coder
1096 <dt> ‘<samp>context <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1097 <dd><p>Set context model.
1100 <dt> ‘<samp>slice_flags <var>integer</var></samp>’</dt>
1101 <dt> ‘<samp>xvmc_acceleration <var>integer</var></samp>’</dt>
1102 <dt> ‘<samp>mbd <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1103 <dd><p>Set macroblock decision algorithm (high quality mode).
1106 </p><dl compact="compact">
1107 <dt> ‘<samp>simple</samp>’</dt>
1108 <dd><p>use mbcmp (default)
1110 <dt> ‘<samp>bits</samp>’</dt>
1111 <dd><p>use fewest bits
1113 <dt> ‘<samp>rd</samp>’</dt>
1114 <dd><p>use best rate distortion
1119 <dt> ‘<samp>stream_codec_tag <var>integer</var></samp>’</dt>
1120 <dt> ‘<samp>sc_threshold <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1121 <dd><p>Set scene change threshold.
1124 <dt> ‘<samp>lmin <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1125 <dd><p>Set min lagrange factor (VBR).
1128 <dt> ‘<samp>lmax <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1129 <dd><p>Set max lagrange factor (VBR).
1132 <dt> ‘<samp>nr <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1133 <dd><p>Set noise reduction.
1136 <dt> ‘<samp>rc_init_occupancy <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1137 <dd><p>Set number of bits which should be loaded into the rc buffer before
1141 <dt> ‘<samp>flags2 <var>flags</var> (<em>decoding/encoding,audio,video</em>)</samp>’</dt>
1144 </p><dl compact="compact">
1145 <dt> ‘<samp>fast</samp>’</dt>
1146 <dd><p>Allow non spec compliant speedup tricks.
1148 <dt> ‘<samp>sgop</samp>’</dt>
1149 <dd><p>Deprecated, use mpegvideo private options instead.
1151 <dt> ‘<samp>noout</samp>’</dt>
1152 <dd><p>Skip bitstream encoding.
1154 <dt> ‘<samp>ignorecrop</samp>’</dt>
1155 <dd><p>Ignore cropping information from sps.
1157 <dt> ‘<samp>local_header</samp>’</dt>
1158 <dd><p>Place global headers at every keyframe instead of in extradata.
1160 <dt> ‘<samp>chunks</samp>’</dt>
1161 <dd><p>Frame data might be split into multiple chunks.
1163 <dt> ‘<samp>showall</samp>’</dt>
1164 <dd><p>Show all frames before the first keyframe.
1166 <dt> ‘<samp>skiprd</samp>’</dt>
1167 <dd><p>Deprecated, use mpegvideo private options instead.
1172 <dt> ‘<samp>error <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1173 <dt> ‘<samp>qns <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1174 <dd><p>Deprecated, use mpegvideo private options instead.
1177 <dt> ‘<samp>threads <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1180 </p><dl compact="compact">
1181 <dt> ‘<samp>auto</samp>’</dt>
1182 <dd><p>detect a good number of threads
1187 <dt> ‘<samp>me_threshold <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1188 <dd><p>Set motion estimation threshold.
1191 <dt> ‘<samp>mb_threshold <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1192 <dd><p>Set macroblock threshold.
1195 <dt> ‘<samp>dc <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1196 <dd><p>Set intra_dc_precision.
1199 <dt> ‘<samp>nssew <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1200 <dd><p>Set nsse weight.
1203 <dt> ‘<samp>skip_top <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1204 <dd><p>Set number of macroblock rows at the top which are skipped.
1207 <dt> ‘<samp>skip_bottom <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1208 <dd><p>Set number of macroblock rows at the bottom which are skipped.
1211 <dt> ‘<samp>profile <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
1214 </p><dl compact="compact">
1215 <dt> ‘<samp>unknown</samp>’</dt>
1216 <dt> ‘<samp>aac_main</samp>’</dt>
1217 <dt> ‘<samp>aac_low</samp>’</dt>
1218 <dt> ‘<samp>aac_ssr</samp>’</dt>
1219 <dt> ‘<samp>aac_ltp</samp>’</dt>
1220 <dt> ‘<samp>aac_he</samp>’</dt>
1221 <dt> ‘<samp>aac_he_v2</samp>’</dt>
1222 <dt> ‘<samp>aac_ld</samp>’</dt>
1223 <dt> ‘<samp>aac_eld</samp>’</dt>
1224 <dt> ‘<samp>mpeg2_aac_low</samp>’</dt>
1225 <dt> ‘<samp>mpeg2_aac_he</samp>’</dt>
1226 <dt> ‘<samp>dts</samp>’</dt>
1227 <dt> ‘<samp>dts_es</samp>’</dt>
1228 <dt> ‘<samp>dts_96_24</samp>’</dt>
1229 <dt> ‘<samp>dts_hd_hra</samp>’</dt>
1230 <dt> ‘<samp>dts_hd_ma</samp>’</dt>
1234 <dt> ‘<samp>level <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
1237 </p><dl compact="compact">
1238 <dt> ‘<samp>unknown</samp>’</dt>
1242 <dt> ‘<samp>lowres <var>integer</var> (<em>decoding,audio,video</em>)</samp>’</dt>
1243 <dd><p>Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
1246 <dt> ‘<samp>skip_threshold <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1247 <dd><p>Set frame skip threshold.
1250 <dt> ‘<samp>skip_factor <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1251 <dd><p>Set frame skip factor.
1254 <dt> ‘<samp>skip_exp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1255 <dd><p>Set frame skip exponent.
1256 Negative values behave identical to the corresponding positive ones, except
1257 that the score is normalized.
1258 Positive values exist primarly for compatibility reasons and are not so useful.
1261 <dt> ‘<samp>skipcmp <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1262 <dd><p>Set frame skip compare function.
1265 </p><dl compact="compact">
1266 <dt> ‘<samp>sad</samp>’</dt>
1267 <dd><p>sum of absolute differences, fast (default)
1269 <dt> ‘<samp>sse</samp>’</dt>
1270 <dd><p>sum of squared errors
1272 <dt> ‘<samp>satd</samp>’</dt>
1273 <dd><p>sum of absolute Hadamard transformed differences
1275 <dt> ‘<samp>dct</samp>’</dt>
1276 <dd><p>sum of absolute DCT transformed differences
1278 <dt> ‘<samp>psnr</samp>’</dt>
1279 <dd><p>sum of squared quantization errors (avoid, low quality)
1281 <dt> ‘<samp>bit</samp>’</dt>
1282 <dd><p>number of bits needed for the block
1284 <dt> ‘<samp>rd</samp>’</dt>
1285 <dd><p>rate distortion optimal, slow
1287 <dt> ‘<samp>zero</samp>’</dt>
1290 <dt> ‘<samp>vsad</samp>’</dt>
1291 <dd><p>sum of absolute vertical differences
1293 <dt> ‘<samp>vsse</samp>’</dt>
1294 <dd><p>sum of squared vertical differences
1296 <dt> ‘<samp>nsse</samp>’</dt>
1297 <dd><p>noise preserving sum of squared differences
1299 <dt> ‘<samp>w53</samp>’</dt>
1300 <dd><p>5/3 wavelet, only used in snow
1302 <dt> ‘<samp>w97</samp>’</dt>
1303 <dd><p>9/7 wavelet, only used in snow
1305 <dt> ‘<samp>dctmax</samp>’</dt>
1306 <dt> ‘<samp>chroma</samp>’</dt>
1310 <dt> ‘<samp>border_mask <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
1311 <dd><p>Increase the quantizer for macroblocks close to borders.
1314 <dt> ‘<samp>mblmin <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1315 <dd><p>Set min macroblock lagrange factor (VBR).
1318 <dt> ‘<samp>mblmax <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1319 <dd><p>Set max macroblock lagrange factor (VBR).
1322 <dt> ‘<samp>mepc <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1323 <dd><p>Set motion estimation bitrate penalty compensation (1.0 = 256).
1326 <dt> ‘<samp>skip_loop_filter <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1327 <dt> ‘<samp>skip_idct <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1328 <dt> ‘<samp>skip_frame <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1330 <p>Make decoder discard processing depending on the frame type selected
1331 by the option value.
1333 <p>‘<samp>skip_loop_filter</samp>’ skips frame loop filtering, ‘<samp>skip_idct</samp>’
1334 skips frame IDCT/dequantization, ‘<samp>skip_frame</samp>’ skips decoding.
1337 </p><dl compact="compact">
1338 <dt> ‘<samp>none</samp>’</dt>
1339 <dd><p>Discard no frame.
1342 <dt> ‘<samp>default</samp>’</dt>
1343 <dd><p>Discard useless frames like 0-sized frames.
1346 <dt> ‘<samp>noref</samp>’</dt>
1347 <dd><p>Discard all non-reference frames.
1350 <dt> ‘<samp>bidir</samp>’</dt>
1351 <dd><p>Discard all bidirectional frames.
1354 <dt> ‘<samp>nokey</samp>’</dt>
1355 <dd><p>Discard all frames excepts keyframes.
1358 <dt> ‘<samp>all</samp>’</dt>
1359 <dd><p>Discard all frames.
1363 <p>Default value is ‘<samp>default</samp>’.
1366 <dt> ‘<samp>bidir_refine <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1367 <dd><p>Refine the two motion vectors used in bidirectional macroblocks.
1370 <dt> ‘<samp>brd_scale <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1371 <dd><p>Downscale frames for dynamic B-frame decision.
1374 <dt> ‘<samp>keyint_min <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1375 <dd><p>Set minimum interval between IDR-frames.
1378 <dt> ‘<samp>refs <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1379 <dd><p>Set reference frames to consider for motion compensation.
1382 <dt> ‘<samp>chromaoffset <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1383 <dd><p>Set chroma qp offset from luma.
1386 <dt> ‘<samp>trellis <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
1387 <dd><p>Set rate-distortion optimal quantization.
1390 <dt> ‘<samp>sc_factor <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1391 <dd><p>Set value multiplied by qscale for each frame and added to
1395 <dt> ‘<samp>mv0_threshold <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1396 <dt> ‘<samp>b_sensitivity <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1397 <dd><p>Adjust sensitivity of b_frame_strategy 1.
1400 <dt> ‘<samp>compression_level <var>integer</var> (<em>encoding,audio,video</em>)</samp>’</dt>
1401 <dt> ‘<samp>min_prediction_order <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
1402 <dt> ‘<samp>max_prediction_order <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
1403 <dt> ‘<samp>timecode_frame_start <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1404 <dd><p>Set GOP timecode frame start number, in non drop frame format.
1407 <dt> ‘<samp>request_channels <var>integer</var> (<em>decoding,audio</em>)</samp>’</dt>
1408 <dd><p>Set desired number of audio channels.
1411 <dt> ‘<samp>bits_per_raw_sample <var>integer</var></samp>’</dt>
1412 <dt> ‘<samp>channel_layout <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>’</dt>
1416 <dt> ‘<samp>request_channel_layout <var>integer</var> (<em>decoding,audio</em>)</samp>’</dt>
1420 <dt> ‘<samp>rc_max_vbv_use <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
1421 <dt> ‘<samp>rc_min_vbv_use <var>float</var> (<em>encoding,video</em>)</samp>’</dt>
1422 <dt> ‘<samp>ticks_per_frame <var>integer</var> (<em>decoding/encoding,audio,video</em>)</samp>’</dt>
1423 <dt> ‘<samp>color_primaries <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1424 <dt> ‘<samp>color_trc <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1425 <dt> ‘<samp>colorspace <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1426 <dt> ‘<samp>color_range <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1427 <dt> ‘<samp>chroma_sample_location <var>integer</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1428 <dt> ‘<samp>log_level_offset <var>integer</var></samp>’</dt>
1429 <dd><p>Set the log level offset.
1432 <dt> ‘<samp>slices <var>integer</var> (<em>encoding,video</em>)</samp>’</dt>
1433 <dd><p>Number of slices, used in parallelized encoding.
1436 <dt> ‘<samp>thread_type <var>flags</var> (<em>decoding/encoding,video</em>)</samp>’</dt>
1437 <dd><p>Select multithreading type.
1440 </p><dl compact="compact">
1441 <dt> ‘<samp>slice</samp>’</dt>
1442 <dt> ‘<samp>frame</samp>’</dt>
1445 <dt> ‘<samp>audio_service_type <var>integer</var> (<em>encoding,audio</em>)</samp>’</dt>
1446 <dd><p>Set audio service type.
1449 </p><dl compact="compact">
1450 <dt> ‘<samp>ma</samp>’</dt>
1451 <dd><p>Main Audio Service
1453 <dt> ‘<samp>ef</samp>’</dt>
1456 <dt> ‘<samp>vi</samp>’</dt>
1457 <dd><p>Visually Impaired
1459 <dt> ‘<samp>hi</samp>’</dt>
1460 <dd><p>Hearing Impaired
1462 <dt> ‘<samp>di</samp>’</dt>
1465 <dt> ‘<samp>co</samp>’</dt>
1468 <dt> ‘<samp>em</samp>’</dt>
1471 <dt> ‘<samp>vo</samp>’</dt>
1474 <dt> ‘<samp>ka</samp>’</dt>
1480 <dt> ‘<samp>request_sample_fmt <var>sample_fmt</var> (<em>decoding,audio</em>)</samp>’</dt>
1481 <dd><p>Set sample format audio decoders should prefer. Default value is
1485 <dt> ‘<samp>pkt_timebase <var>rational number</var></samp>’</dt>
1486 <dt> ‘<samp>sub_charenc <var>encoding</var> (<em>decoding,subtitles</em>)</samp>’</dt>
1487 <dd><p>Set the input subtitles character encoding.
1490 <dt> ‘<samp>field_order <var>field_order</var> (<em>video</em>)</samp>’</dt>
1491 <dd><p>Set/override the field order of the video.
1493 </p><dl compact="compact">
1494 <dt> ‘<samp>progressive</samp>’</dt>
1495 <dd><p>Progressive video
1497 <dt> ‘<samp>tt</samp>’</dt>
1498 <dd><p>Interlaced video, top field coded and displayed first
1500 <dt> ‘<samp>bb</samp>’</dt>
1501 <dd><p>Interlaced video, bottom field coded and displayed first
1503 <dt> ‘<samp>tb</samp>’</dt>
1504 <dd><p>Interlaced video, top coded first, bottom displayed first
1506 <dt> ‘<samp>bt</samp>’</dt>
1507 <dd><p>Interlaced video, bottom coded first, top displayed first
1512 <dt> ‘<samp>skip_alpha <var>integer</var> (<em>decoding,video</em>)</samp>’</dt>
1513 <dd><p>Set to 1 to disable processing alpha (transparency). This works like the
1514 ‘<samp>gray</samp>’ flag in the ‘<samp>flags</samp>’ option which skips chroma information
1515 instead of alpha. Default is 0.
1520 <a name="Decoders"></a>
1521 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Decoders">3. Decoders</a></h1>
1523 <p>Decoders are configured elements in FFmpeg which allow the decoding of
1526 <p>When you configure your FFmpeg build, all the supported native decoders
1527 are enabled by default. Decoders requiring an external library must be enabled
1528 manually via the corresponding <code>--enable-lib</code> option. You can list all
1529 available decoders using the configure option <code>--list-decoders</code>.
1531 <p>You can disable all the decoders with the configure option
1532 <code>--disable-decoders</code> and selectively enable / disable single decoders
1533 with the options <code>--enable-decoder=<var>DECODER</var></code> /
1534 <code>--disable-decoder=<var>DECODER</var></code>.
1536 <p>The option <code>-decoders</code> of the ff* tools will display the list of
1540 <a name="Video-Decoders"></a>
1541 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Video-Decoders">4. Video Decoders</a></h1>
1543 <p>A description of some of the currently available video decoders
1546 <a name="rawvideo"></a>
1547 <h2 class="section"><a href="ffmpeg-codecs.html#toc-rawvideo">4.1 rawvideo</a></h2>
1549 <p>Raw video decoder.
1551 <p>This decoder decodes rawvideo streams.
1553 <a name="Options-2"></a>
1554 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-2">4.1.1 Options</a></h3>
1556 <dl compact="compact">
1557 <dt> ‘<samp>top <var>top_field_first</var></samp>’</dt>
1558 <dd><p>Specify the assumed field type of the input video.
1559 </p><dl compact="compact">
1560 <dt> ‘<samp>-1</samp>’</dt>
1561 <dd><p>the video is assumed to be progressive (default)
1563 <dt> ‘<samp>0</samp>’</dt>
1564 <dd><p>bottom-field-first is assumed
1566 <dt> ‘<samp>1</samp>’</dt>
1567 <dd><p>top-field-first is assumed
1575 <a name="Audio-Decoders"></a>
1576 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Audio-Decoders">5. Audio Decoders</a></h1>
1578 <p>A description of some of the currently available audio decoders
1582 <h2 class="section"><a href="ffmpeg-codecs.html#toc-ac3">5.1 ac3</a></h2>
1584 <p>AC-3 audio decoder.
1586 <p>This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as well as
1587 the undocumented RealAudio 3 (a.k.a. dnet).
1589 <a name="AC_002d3-Decoder-Options"></a>
1590 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-AC_002d3-Decoder-Options">5.1.1 AC-3 Decoder Options</a></h3>
1592 <dl compact="compact">
1593 <dt> ‘<samp>-drc_scale <var>value</var></samp>’</dt>
1594 <dd><p>Dynamic Range Scale Factor. The factor to apply to dynamic range values
1595 from the AC-3 stream. This factor is applied exponentially.
1596 There are 3 notable scale factor ranges:
1597 </p><dl compact="compact">
1598 <dt> ‘<samp>drc_scale == 0</samp>’</dt>
1599 <dd><p>DRC disabled. Produces full range audio.
1601 <dt> ‘<samp>0 < drc_scale <= 1</samp>’</dt>
1602 <dd><p>DRC enabled. Applies a fraction of the stream DRC value.
1603 Audio reproduction is between full range and full compression.
1605 <dt> ‘<samp>drc_scale > 1</samp>’</dt>
1606 <dd><p>DRC enabled. Applies drc_scale asymmetrically.
1607 Loud sounds are fully compressed. Soft sounds are enhanced.
1614 <a name="ffwavesynth"></a>
1615 <h2 class="section"><a href="ffmpeg-codecs.html#toc-ffwavesynth">5.2 ffwavesynth</a></h2>
1617 <p>Internal wave synthetizer.
1619 <p>This decoder generates wave patterns according to predefined sequences. Its
1620 use is purely internal and the format of the data it accepts is not publicly
1623 <a name="libcelt"></a>
1624 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libcelt">5.3 libcelt</a></h2>
1626 <p>libcelt decoder wrapper.
1628 <p>libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
1629 Requires the presence of the libcelt headers and library during configuration.
1630 You need to explicitly configure the build with <code>--enable-libcelt</code>.
1632 <a name="libgsm"></a>
1633 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libgsm">5.4 libgsm</a></h2>
1635 <p>libgsm decoder wrapper.
1637 <p>libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
1638 the presence of the libgsm headers and library during configuration. You need
1639 to explicitly configure the build with <code>--enable-libgsm</code>.
1641 <p>This decoder supports both the ordinary GSM and the Microsoft variant.
1643 <a name="libilbc"></a>
1644 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libilbc">5.5 libilbc</a></h2>
1646 <p>libilbc decoder wrapper.
1648 <p>libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
1649 audio codec. Requires the presence of the libilbc headers and library during
1650 configuration. You need to explicitly configure the build with
1651 <code>--enable-libilbc</code>.
1653 <a name="Options-16"></a>
1654 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-16">5.5.1 Options</a></h3>
1656 <p>The following option is supported by the libilbc wrapper.
1658 <dl compact="compact">
1659 <dt> ‘<samp>enhance</samp>’</dt>
1661 <p>Enable the enhancement of the decoded audio when set to 1. The default
1662 value is 0 (disabled).
1667 <a name="libopencore_002damrnb"></a>
1668 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopencore_002damrnb">5.6 libopencore-amrnb</a></h2>
1670 <p>libopencore-amrnb decoder wrapper.
1672 <p>libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
1673 Narrowband audio codec. Using it requires the presence of the
1674 libopencore-amrnb headers and library during configuration. You need to
1675 explicitly configure the build with <code>--enable-libopencore-amrnb</code>.
1677 <p>An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
1678 without this library.
1680 <a name="libopencore_002damrwb"></a>
1681 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopencore_002damrwb">5.7 libopencore-amrwb</a></h2>
1683 <p>libopencore-amrwb decoder wrapper.
1685 <p>libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
1686 Wideband audio codec. Using it requires the presence of the
1687 libopencore-amrwb headers and library during configuration. You need to
1688 explicitly configure the build with <code>--enable-libopencore-amrwb</code>.
1690 <p>An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
1691 without this library.
1693 <a name="libopus-1"></a>
1694 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopus-1">5.8 libopus</a></h2>
1696 <p>libopus decoder wrapper.
1698 <p>libopus allows libavcodec to decode the Opus Interactive Audio Codec.
1699 Requires the presence of the libopus headers and library during
1700 configuration. You need to explicitly configure the build with
1701 <code>--enable-libopus</code>.
1704 <a name="Subtitles-Decoders"></a>
1705 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Subtitles-Decoders">6. Subtitles Decoders</a></h1>
1707 <a name="dvdsub"></a>
1708 <h2 class="section"><a href="ffmpeg-codecs.html#toc-dvdsub">6.1 dvdsub</a></h2>
1710 <p>This codec decodes the bitmap subtitles used in DVDs; the same subtitles can
1711 also be found in VobSub file pairs and in some Matroska files.
1713 <a name="Options-14"></a>
1714 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-14">6.1.1 Options</a></h3>
1716 <dl compact="compact">
1717 <dt> ‘<samp>palette</samp>’</dt>
1718 <dd><p>Specify the global palette used by the bitmaps. When stored in VobSub, the
1719 palette is normally specified in the index file; in Matroska, the palette is
1720 stored in the codec extra-data in the same format as in VobSub. In DVDs, the
1721 palette is stored in the IFO file, and therefore not available when reading
1722 from dumped VOB files.
1724 <p>The format for this option is a string containing 16 24-bits hexadecimal
1725 numbers (without 0x prefix) separated by comas, for example <code>0d00ee,
1726 ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
1727 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b</code>.
1731 <a name="libzvbi_002dteletext"></a>
1732 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libzvbi_002dteletext">6.2 libzvbi-teletext</a></h2>
1734 <p>Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
1735 subtitles. Requires the presence of the libzvbi headers and library during
1736 configuration. You need to explicitly configure the build with
1737 <code>--enable-libzvbi</code>.
1739 <a name="Options-18"></a>
1740 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-18">6.2.1 Options</a></h3>
1742 <dl compact="compact">
1743 <dt> ‘<samp>txt_page</samp>’</dt>
1744 <dd><p>List of teletext page numbers to decode. You may use the special * string to
1745 match all pages. Pages that do not match the specified list are dropped.
1748 <dt> ‘<samp>txt_chop_top</samp>’</dt>
1749 <dd><p>Discards the top teletext line. Default value is 1.
1751 <dt> ‘<samp>txt_format</samp>’</dt>
1752 <dd><p>Specifies the format of the decoded subtitles. The teletext decoder is capable
1753 of decoding the teletext pages to bitmaps or to simple text, you should use
1754 "bitmap" for teletext pages, because certain graphics and colors cannot be
1755 expressed in simple text. You might use "text" for teletext based subtitles if
1756 your application can handle simple text based subtitles. Default value is
1759 <dt> ‘<samp>txt_left</samp>’</dt>
1760 <dd><p>X offset of generated bitmaps, default is 0.
1762 <dt> ‘<samp>txt_top</samp>’</dt>
1763 <dd><p>Y offset of generated bitmaps, default is 0.
1765 <dt> ‘<samp>txt_chop_spaces</samp>’</dt>
1766 <dd><p>Chops leading and trailing spaces and removes empty lines from the generated
1767 text. This option is useful for teletext based subtitles where empty spaces may
1768 be present at the start or at the end of the lines or empty lines may be
1769 present between the subtitle lines because of double-sized teletext charactes.
1772 <dt> ‘<samp>txt_duration</samp>’</dt>
1773 <dd><p>Sets the display duration of the decoded teletext pages or subtitles in
1774 miliseconds. Default value is 30000 which is 30 seconds.
1776 <dt> ‘<samp>txt_transparent</samp>’</dt>
1777 <dd><p>Force transparent background of the generated teletext bitmaps. Default value
1778 is 0 which means an opaque (black) background.
1782 <a name="Encoders"></a>
1783 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Encoders">7. Encoders</a></h1>
1785 <p>Encoders are configured elements in FFmpeg which allow the encoding of
1788 <p>When you configure your FFmpeg build, all the supported native encoders
1789 are enabled by default. Encoders requiring an external library must be enabled
1790 manually via the corresponding <code>--enable-lib</code> option. You can list all
1791 available encoders using the configure option <code>--list-encoders</code>.
1793 <p>You can disable all the encoders with the configure option
1794 <code>--disable-encoders</code> and selectively enable / disable single encoders
1795 with the options <code>--enable-encoder=<var>ENCODER</var></code> /
1796 <code>--disable-encoder=<var>ENCODER</var></code>.
1798 <p>The option <code>-encoders</code> of the ff* tools will display the list of
1802 <a name="Audio-Encoders"></a>
1803 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Audio-Encoders">8. Audio Encoders</a></h1>
1805 <p>A description of some of the currently available audio encoders
1808 <p><a name="aacenc"></a>
1809 </p><a name="aac"></a>
1810 <h2 class="section"><a href="ffmpeg-codecs.html#toc-aac">8.1 aac</a></h2>
1812 <p>Advanced Audio Coding (AAC) encoder.
1814 <p>This encoder is an experimental FFmpeg-native AAC encoder. Currently only the
1815 low complexity (AAC-LC) profile is supported. To use this encoder, you must set
1816 ‘<samp>strict</samp>’ option to ‘<samp>experimental</samp>’ or lower.
1818 <p>As this encoder is experimental, unexpected behavior may exist from time to
1819 time. For a more stable AAC encoder, see <a href="#libvo_002daacenc">libvo-aacenc</a>. However, be warned
1820 that it has a worse quality reported by some users.
1822 <p>See also <a href="#libfdk_002daac_002denc">libfdk_aac</a> and <a href="#libfaac">libfaac</a>.
1824 <a name="Options-8"></a>
1825 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-8">8.1.1 Options</a></h3>
1827 <dl compact="compact">
1828 <dt> ‘<samp>b</samp>’</dt>
1829 <dd><p>Set bit rate in bits/s. Setting this automatically activates constant bit rate
1833 <dt> ‘<samp>q</samp>’</dt>
1834 <dd><p>Set quality for variable bit rate (VBR) mode. This option is valid only using
1835 the <code>ffmpeg</code> command-line tool. For library interface users, use
1836 ‘<samp>global_quality</samp>’.
1839 <dt> ‘<samp>stereo_mode</samp>’</dt>
1840 <dd><p>Set stereo encoding mode. Possible values:
1842 <dl compact="compact">
1843 <dt> ‘<samp>auto</samp>’</dt>
1844 <dd><p>Automatically selected by the encoder.
1847 <dt> ‘<samp>ms_off</samp>’</dt>
1848 <dd><p>Disable middle/side encoding. This is the default.
1851 <dt> ‘<samp>ms_force</samp>’</dt>
1852 <dd><p>Force middle/side encoding.
1857 <dt> ‘<samp>aac_coder</samp>’</dt>
1858 <dd><p>Set AAC encoder coding method. Possible values:
1860 <dl compact="compact">
1861 <dt> ‘<samp>faac</samp>’</dt>
1862 <dd><p>FAAC-inspired method.
1864 <p>This method is a simplified reimplementation of the method used in FAAC, which
1865 sets thresholds proportional to the band energies, and then decreases all the
1866 thresholds with quantizer steps to find the appropriate quantization with
1867 distortion below threshold band by band.
1869 <p>The quality of this method is comparable to the two loop searching method
1870 descibed below, but somewhat a little better and slower.
1873 <dt> ‘<samp>anmr</samp>’</dt>
1874 <dd><p>Average noise to mask ratio (ANMR) trellis-based solution.
1876 <p>This has a theoretic best quality out of all the coding methods, but at the
1877 cost of the slowest speed.
1880 <dt> ‘<samp>twoloop</samp>’</dt>
1881 <dd><p>Two loop searching (TLS) method.
1883 <p>This method first sets quantizers depending on band thresholds and then tries
1884 to find an optimal combination by adding or subtracting a specific value from
1885 all quantizers and adjusting some individual quantizer a little.
1887 <p>This method produces similar quality with the FAAC method and is the default.
1890 <dt> ‘<samp>fast</samp>’</dt>
1891 <dd><p>Constant quantizer method.
1893 <p>This method sets a constant quantizer for all bands. This is the fastest of all
1894 the methods, yet produces the worst quality.
1902 <a name="ac3-and-ac3_005ffixed"></a>
1903 <h2 class="section"><a href="ffmpeg-codecs.html#toc-ac3-and-ac3_005ffixed">8.2 ac3 and ac3_fixed</a></h2>
1905 <p>AC-3 audio encoders.
1907 <p>These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as
1908 the undocumented RealAudio 3 (a.k.a. dnet).
1910 <p>The <var>ac3</var> encoder uses floating-point math, while the <var>ac3_fixed</var>
1911 encoder only uses fixed-point integer math. This does not mean that one is
1912 always faster, just that one or the other may be better suited to a
1913 particular system. The floating-point encoder will generally produce better
1914 quality audio for a given bitrate. The <var>ac3_fixed</var> encoder is not the
1915 default codec for any of the output formats, so it must be specified explicitly
1916 using the option <code>-acodec ac3_fixed</code> in order to use it.
1918 <a name="AC_002d3-Metadata"></a>
1919 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-AC_002d3-Metadata">8.2.1 AC-3 Metadata</a></h3>
1921 <p>The AC-3 metadata options are used to set parameters that describe the audio,
1922 but in most cases do not affect the audio encoding itself. Some of the options
1923 do directly affect or influence the decoding and playback of the resulting
1924 bitstream, while others are just for informational purposes. A few of the
1925 options will add bits to the output stream that could otherwise be used for
1926 audio data, and will thus affect the quality of the output. Those will be
1927 indicated accordingly with a note in the option list below.
1929 <p>These parameters are described in detail in several publicly-available
1932 <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>
1933 </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>
1934 </li><li> <a href="http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf">Dolby Metadata Guide</a>
1935 </li><li> <a href="http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf">Dolby Digital Professional Encoding Guidelines</a>
1938 <a name="Metadata-Control-Options"></a>
1939 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Metadata-Control-Options">8.2.1.1 Metadata Control Options</a></h4>
1941 <dl compact="compact">
1942 <dt> ‘<samp>-per_frame_metadata <var>boolean</var></samp>’</dt>
1943 <dd><p>Allow Per-Frame Metadata. Specifies if the encoder should check for changing
1944 metadata for each frame.
1945 </p><dl compact="compact">
1946 <dt> ‘<samp>0</samp>’</dt>
1947 <dd><p>The metadata values set at initialization will be used for every frame in the
1950 <dt> ‘<samp>1</samp>’</dt>
1951 <dd><p>Metadata values can be changed before encoding each frame.
1958 <a name="Downmix-Levels"></a>
1959 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Downmix-Levels">8.2.1.2 Downmix Levels</a></h4>
1961 <dl compact="compact">
1962 <dt> ‘<samp>-center_mixlev <var>level</var></samp>’</dt>
1963 <dd><p>Center Mix Level. The amount of gain the decoder should apply to the center
1964 channel when downmixing to stereo. This field will only be written to the
1965 bitstream if a center channel is present. The value is specified as a scale
1966 factor. There are 3 valid values:
1967 </p><dl compact="compact">
1968 <dt> ‘<samp>0.707</samp>’</dt>
1969 <dd><p>Apply -3dB gain
1971 <dt> ‘<samp>0.595</samp>’</dt>
1972 <dd><p>Apply -4.5dB gain (default)
1974 <dt> ‘<samp>0.500</samp>’</dt>
1975 <dd><p>Apply -6dB gain
1980 <dt> ‘<samp>-surround_mixlev <var>level</var></samp>’</dt>
1981 <dd><p>Surround Mix Level. The amount of gain the decoder should apply to the surround
1982 channel(s) when downmixing to stereo. This field will only be written to the
1983 bitstream if one or more surround channels are present. The value is specified
1984 as a scale factor. There are 3 valid values:
1985 </p><dl compact="compact">
1986 <dt> ‘<samp>0.707</samp>’</dt>
1987 <dd><p>Apply -3dB gain
1989 <dt> ‘<samp>0.500</samp>’</dt>
1990 <dd><p>Apply -6dB gain (default)
1992 <dt> ‘<samp>0.000</samp>’</dt>
1993 <dd><p>Silence Surround Channel(s)
2000 <a name="Audio-Production-Information"></a>
2001 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Audio-Production-Information">8.2.1.3 Audio Production Information</a></h4>
2002 <p>Audio Production Information is optional information describing the mixing
2003 environment. Either none or both of the fields are written to the bitstream.
2005 <dl compact="compact">
2006 <dt> ‘<samp>-mixing_level <var>number</var></samp>’</dt>
2007 <dd><p>Mixing Level. Specifies peak sound pressure level (SPL) in the production
2008 environment when the mix was mastered. Valid values are 80 to 111, or -1 for
2009 unknown or not indicated. The default value is -1, but that value cannot be
2010 used if the Audio Production Information is written to the bitstream. Therefore,
2011 if the <code>room_type</code> option is not the default value, the <code>mixing_level</code>
2012 option must not be -1.
2015 <dt> ‘<samp>-room_type <var>type</var></samp>’</dt>
2016 <dd><p>Room Type. Describes the equalization used during the final mixing session at
2017 the studio or on the dubbing stage. A large room is a dubbing stage with the
2018 industry standard X-curve equalization; a small room has flat equalization.
2019 This field will not be written to the bitstream if both the <code>mixing_level</code>
2020 option and the <code>room_type</code> option have the default values.
2021 </p><dl compact="compact">
2022 <dt> ‘<samp>0</samp>’</dt>
2023 <dt> ‘<samp>notindicated</samp>’</dt>
2024 <dd><p>Not Indicated (default)
2026 <dt> ‘<samp>1</samp>’</dt>
2027 <dt> ‘<samp>large</samp>’</dt>
2030 <dt> ‘<samp>2</samp>’</dt>
2031 <dt> ‘<samp>small</samp>’</dt>
2039 <a name="Other-Metadata-Options"></a>
2040 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Other-Metadata-Options">8.2.1.4 Other Metadata Options</a></h4>
2042 <dl compact="compact">
2043 <dt> ‘<samp>-copyright <var>boolean</var></samp>’</dt>
2044 <dd><p>Copyright Indicator. Specifies whether a copyright exists for this audio.
2045 </p><dl compact="compact">
2046 <dt> ‘<samp>0</samp>’</dt>
2047 <dt> ‘<samp>off</samp>’</dt>
2048 <dd><p>No Copyright Exists (default)
2050 <dt> ‘<samp>1</samp>’</dt>
2051 <dt> ‘<samp>on</samp>’</dt>
2052 <dd><p>Copyright Exists
2057 <dt> ‘<samp>-dialnorm <var>value</var></samp>’</dt>
2058 <dd><p>Dialogue Normalization. Indicates how far the average dialogue level of the
2059 program is below digital 100% full scale (0 dBFS). This parameter determines a
2060 level shift during audio reproduction that sets the average volume of the
2061 dialogue to a preset level. The goal is to match volume level between program
2062 sources. A value of -31dB will result in no volume level change, relative to
2063 the source volume, during audio reproduction. Valid values are whole numbers in
2064 the range -31 to -1, with -31 being the default.
2067 <dt> ‘<samp>-dsur_mode <var>mode</var></samp>’</dt>
2068 <dd><p>Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround
2069 (Pro Logic). This field will only be written to the bitstream if the audio
2070 stream is stereo. Using this option does <b>NOT</b> mean the encoder will actually
2071 apply Dolby Surround processing.
2072 </p><dl compact="compact">
2073 <dt> ‘<samp>0</samp>’</dt>
2074 <dt> ‘<samp>notindicated</samp>’</dt>
2075 <dd><p>Not Indicated (default)
2077 <dt> ‘<samp>1</samp>’</dt>
2078 <dt> ‘<samp>off</samp>’</dt>
2079 <dd><p>Not Dolby Surround Encoded
2081 <dt> ‘<samp>2</samp>’</dt>
2082 <dt> ‘<samp>on</samp>’</dt>
2083 <dd><p>Dolby Surround Encoded
2088 <dt> ‘<samp>-original <var>boolean</var></samp>’</dt>
2089 <dd><p>Original Bit Stream Indicator. Specifies whether this audio is from the
2090 original source and not a copy.
2091 </p><dl compact="compact">
2092 <dt> ‘<samp>0</samp>’</dt>
2093 <dt> ‘<samp>off</samp>’</dt>
2094 <dd><p>Not Original Source
2096 <dt> ‘<samp>1</samp>’</dt>
2097 <dt> ‘<samp>on</samp>’</dt>
2098 <dd><p>Original Source (default)
2105 <a name="Extended-Bitstream-Information"></a>
2106 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Extended-Bitstream-Information">8.2.2 Extended Bitstream Information</a></h3>
2107 <p>The extended bitstream options are part of the Alternate Bit Stream Syntax as
2108 specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.
2109 If any one parameter in a group is specified, all values in that group will be
2110 written to the bitstream. Default values are used for those that are written
2111 but have not been specified. If the mixing levels are written, the decoder
2112 will use these values instead of the ones specified in the <code>center_mixlev</code>
2113 and <code>surround_mixlev</code> options if it supports the Alternate Bit Stream
2116 <a name="Extended-Bitstream-Information-_002d-Part-1"></a>
2117 <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>
2119 <dl compact="compact">
2120 <dt> ‘<samp>-dmix_mode <var>mode</var></samp>’</dt>
2121 <dd><p>Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt
2122 (Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.
2123 </p><dl compact="compact">
2124 <dt> ‘<samp>0</samp>’</dt>
2125 <dt> ‘<samp>notindicated</samp>’</dt>
2126 <dd><p>Not Indicated (default)
2128 <dt> ‘<samp>1</samp>’</dt>
2129 <dt> ‘<samp>ltrt</samp>’</dt>
2130 <dd><p>Lt/Rt Downmix Preferred
2132 <dt> ‘<samp>2</samp>’</dt>
2133 <dt> ‘<samp>loro</samp>’</dt>
2134 <dd><p>Lo/Ro Downmix Preferred
2139 <dt> ‘<samp>-ltrt_cmixlev <var>level</var></samp>’</dt>
2140 <dd><p>Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the
2141 center channel when downmixing to stereo in Lt/Rt mode.
2142 </p><dl compact="compact">
2143 <dt> ‘<samp>1.414</samp>’</dt>
2144 <dd><p>Apply +3dB gain
2146 <dt> ‘<samp>1.189</samp>’</dt>
2147 <dd><p>Apply +1.5dB gain
2149 <dt> ‘<samp>1.000</samp>’</dt>
2150 <dd><p>Apply 0dB gain
2152 <dt> ‘<samp>0.841</samp>’</dt>
2153 <dd><p>Apply -1.5dB gain
2155 <dt> ‘<samp>0.707</samp>’</dt>
2156 <dd><p>Apply -3.0dB gain
2158 <dt> ‘<samp>0.595</samp>’</dt>
2159 <dd><p>Apply -4.5dB gain (default)
2161 <dt> ‘<samp>0.500</samp>’</dt>
2162 <dd><p>Apply -6.0dB gain
2164 <dt> ‘<samp>0.000</samp>’</dt>
2165 <dd><p>Silence Center Channel
2170 <dt> ‘<samp>-ltrt_surmixlev <var>level</var></samp>’</dt>
2171 <dd><p>Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the
2172 surround channel(s) when downmixing to stereo in Lt/Rt mode.
2173 </p><dl compact="compact">
2174 <dt> ‘<samp>0.841</samp>’</dt>
2175 <dd><p>Apply -1.5dB gain
2177 <dt> ‘<samp>0.707</samp>’</dt>
2178 <dd><p>Apply -3.0dB gain
2180 <dt> ‘<samp>0.595</samp>’</dt>
2181 <dd><p>Apply -4.5dB gain
2183 <dt> ‘<samp>0.500</samp>’</dt>
2184 <dd><p>Apply -6.0dB gain (default)
2186 <dt> ‘<samp>0.000</samp>’</dt>
2187 <dd><p>Silence Surround Channel(s)
2192 <dt> ‘<samp>-loro_cmixlev <var>level</var></samp>’</dt>
2193 <dd><p>Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the
2194 center channel when downmixing to stereo in Lo/Ro mode.
2195 </p><dl compact="compact">
2196 <dt> ‘<samp>1.414</samp>’</dt>
2197 <dd><p>Apply +3dB gain
2199 <dt> ‘<samp>1.189</samp>’</dt>
2200 <dd><p>Apply +1.5dB gain
2202 <dt> ‘<samp>1.000</samp>’</dt>
2203 <dd><p>Apply 0dB gain
2205 <dt> ‘<samp>0.841</samp>’</dt>
2206 <dd><p>Apply -1.5dB gain
2208 <dt> ‘<samp>0.707</samp>’</dt>
2209 <dd><p>Apply -3.0dB gain
2211 <dt> ‘<samp>0.595</samp>’</dt>
2212 <dd><p>Apply -4.5dB gain (default)
2214 <dt> ‘<samp>0.500</samp>’</dt>
2215 <dd><p>Apply -6.0dB gain
2217 <dt> ‘<samp>0.000</samp>’</dt>
2218 <dd><p>Silence Center Channel
2223 <dt> ‘<samp>-loro_surmixlev <var>level</var></samp>’</dt>
2224 <dd><p>Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the
2225 surround channel(s) when downmixing to stereo in Lo/Ro mode.
2226 </p><dl compact="compact">
2227 <dt> ‘<samp>0.841</samp>’</dt>
2228 <dd><p>Apply -1.5dB gain
2230 <dt> ‘<samp>0.707</samp>’</dt>
2231 <dd><p>Apply -3.0dB gain
2233 <dt> ‘<samp>0.595</samp>’</dt>
2234 <dd><p>Apply -4.5dB gain
2236 <dt> ‘<samp>0.500</samp>’</dt>
2237 <dd><p>Apply -6.0dB gain (default)
2239 <dt> ‘<samp>0.000</samp>’</dt>
2240 <dd><p>Silence Surround Channel(s)
2247 <a name="Extended-Bitstream-Information-_002d-Part-2"></a>
2248 <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>
2250 <dl compact="compact">
2251 <dt> ‘<samp>-dsurex_mode <var>mode</var></samp>’</dt>
2252 <dd><p>Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX
2253 (7.1 matrixed to 5.1). Using this option does <b>NOT</b> mean the encoder will actually
2254 apply Dolby Surround EX processing.
2255 </p><dl compact="compact">
2256 <dt> ‘<samp>0</samp>’</dt>
2257 <dt> ‘<samp>notindicated</samp>’</dt>
2258 <dd><p>Not Indicated (default)
2260 <dt> ‘<samp>1</samp>’</dt>
2261 <dt> ‘<samp>on</samp>’</dt>
2262 <dd><p>Dolby Surround EX Off
2264 <dt> ‘<samp>2</samp>’</dt>
2265 <dt> ‘<samp>off</samp>’</dt>
2266 <dd><p>Dolby Surround EX On
2271 <dt> ‘<samp>-dheadphone_mode <var>mode</var></samp>’</dt>
2272 <dd><p>Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone
2273 encoding (multi-channel matrixed to 2.0 for use with headphones). Using this
2274 option does <b>NOT</b> mean the encoder will actually apply Dolby Headphone
2276 </p><dl compact="compact">
2277 <dt> ‘<samp>0</samp>’</dt>
2278 <dt> ‘<samp>notindicated</samp>’</dt>
2279 <dd><p>Not Indicated (default)
2281 <dt> ‘<samp>1</samp>’</dt>
2282 <dt> ‘<samp>on</samp>’</dt>
2283 <dd><p>Dolby Headphone Off
2285 <dt> ‘<samp>2</samp>’</dt>
2286 <dt> ‘<samp>off</samp>’</dt>
2287 <dd><p>Dolby Headphone On
2292 <dt> ‘<samp>-ad_conv_type <var>type</var></samp>’</dt>
2293 <dd><p>A/D Converter Type. Indicates whether the audio has passed through HDCD A/D
2295 </p><dl compact="compact">
2296 <dt> ‘<samp>0</samp>’</dt>
2297 <dt> ‘<samp>standard</samp>’</dt>
2298 <dd><p>Standard A/D Converter (default)
2300 <dt> ‘<samp>1</samp>’</dt>
2301 <dt> ‘<samp>hdcd</samp>’</dt>
2302 <dd><p>HDCD A/D Converter
2309 <a name="Other-AC_002d3-Encoding-Options"></a>
2310 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Other-AC_002d3-Encoding-Options">8.2.3 Other AC-3 Encoding Options</a></h3>
2312 <dl compact="compact">
2313 <dt> ‘<samp>-stereo_rematrixing <var>boolean</var></samp>’</dt>
2314 <dd><p>Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
2315 is an optional AC-3 feature that increases quality by selectively encoding
2316 the left/right channels as mid/side. This option is enabled by default, and it
2317 is highly recommended that it be left as enabled except for testing purposes.
2322 <a name="Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options"></a>
2323 <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>
2325 <p>These options are only valid for the floating-point encoder and do not exist
2326 for the fixed-point encoder due to the corresponding features not being
2327 implemented in fixed-point.
2329 <dl compact="compact">
2330 <dt> ‘<samp>-channel_coupling <var>boolean</var></samp>’</dt>
2331 <dd><p>Enables/Disables use of channel coupling, which is an optional AC-3 feature
2332 that increases quality by combining high frequency information from multiple
2333 channels into a single channel. The per-channel high frequency information is
2334 sent with less accuracy in both the frequency and time domains. This allows
2335 more bits to be used for lower frequencies while preserving enough information
2336 to reconstruct the high frequencies. This option is enabled by default for the
2337 floating-point encoder and should generally be left as enabled except for
2338 testing purposes or to increase encoding speed.
2339 </p><dl compact="compact">
2340 <dt> ‘<samp>-1</samp>’</dt>
2341 <dt> ‘<samp>auto</samp>’</dt>
2342 <dd><p>Selected by Encoder (default)
2344 <dt> ‘<samp>0</samp>’</dt>
2345 <dt> ‘<samp>off</samp>’</dt>
2346 <dd><p>Disable Channel Coupling
2348 <dt> ‘<samp>1</samp>’</dt>
2349 <dt> ‘<samp>on</samp>’</dt>
2350 <dd><p>Enable Channel Coupling
2355 <dt> ‘<samp>-cpl_start_band <var>number</var></samp>’</dt>
2356 <dd><p>Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a
2357 value higher than the bandwidth is used, it will be reduced to 1 less than the
2358 coupling end band. If <var>auto</var> is used, the start band will be determined by
2359 the encoder based on the bit rate, sample rate, and channel layout. This option
2360 has no effect if channel coupling is disabled.
2361 </p><dl compact="compact">
2362 <dt> ‘<samp>-1</samp>’</dt>
2363 <dt> ‘<samp>auto</samp>’</dt>
2364 <dd><p>Selected by Encoder (default)
2371 <p><a name="libfaac"></a>
2372 </p><a name="libfaac-1"></a>
2373 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libfaac-1">8.3 libfaac</a></h2>
2375 <p>libfaac AAC (Advanced Audio Coding) encoder wrapper.
2377 <p>Requires the presence of the libfaac headers and library during
2378 configuration. You need to explicitly configure the build with
2379 <code>--enable-libfaac --enable-nonfree</code>.
2381 <p>This encoder is considered to be of higher quality with respect to the
2382 <a href="#aacenc">the native experimental FFmpeg AAC encoder</a>.
2384 <p>For more information see the libfaac project at
2385 <a href="http://www.audiocoding.com/faac.html/">http://www.audiocoding.com/faac.html/</a>.
2387 <a name="Options-12"></a>
2388 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-12">8.3.1 Options</a></h3>
2390 <p>The following shared FFmpeg codec options are recognized.
2392 <p>The following options are supported by the libfaac wrapper. The
2393 <code>faac</code>-equivalent of the options are listed in parentheses.
2395 <dl compact="compact">
2396 <dt> ‘<samp>b (<em>-b</em>)</samp>’</dt>
2397 <dd><p>Set bit rate in bits/s for ABR (Average Bit Rate) mode. If the bit rate
2398 is not explicitly specified, it is automatically set to a suitable
2399 value depending on the selected profile. <code>faac</code> bitrate is
2400 expressed in kilobits/s.
2402 <p>Note that libfaac does not support CBR (Constant Bit Rate) but only
2403 ABR (Average Bit Rate).
2405 <p>If VBR mode is enabled this option is ignored.
2408 <dt> ‘<samp>ar (<em>-R</em>)</samp>’</dt>
2409 <dd><p>Set audio sampling rate (in Hz).
2412 <dt> ‘<samp>ac (<em>-c</em>)</samp>’</dt>
2413 <dd><p>Set the number of audio channels.
2416 <dt> ‘<samp>cutoff (<em>-C</em>)</samp>’</dt>
2417 <dd><p>Set cutoff frequency. If not specified (or explicitly set to 0) it
2418 will use a value automatically computed by the library. Default value
2422 <dt> ‘<samp>profile</samp>’</dt>
2423 <dd><p>Set audio profile.
2425 <p>The following profiles are recognized:
2426 </p><dl compact="compact">
2427 <dt> ‘<samp>aac_main</samp>’</dt>
2428 <dd><p>Main AAC (Main)
2431 <dt> ‘<samp>aac_low</samp>’</dt>
2432 <dd><p>Low Complexity AAC (LC)
2435 <dt> ‘<samp>aac_ssr</samp>’</dt>
2436 <dd><p>Scalable Sample Rate (SSR)
2439 <dt> ‘<samp>aac_ltp</samp>’</dt>
2440 <dd><p>Long Term Prediction (LTP)
2444 <p>If not specified it is set to ‘<samp>aac_low</samp>’.
2447 <dt> ‘<samp>flags +qscale</samp>’</dt>
2448 <dd><p>Set constant quality VBR (Variable Bit Rate) mode.
2451 <dt> ‘<samp>global_quality</samp>’</dt>
2452 <dd><p>Set quality in VBR mode as an integer number of lambda units.
2454 <p>Only relevant when VBR mode is enabled with <code>flags +qscale</code>. The
2455 value is converted to QP units by dividing it by <code>FF_QP2LAMBDA</code>,
2456 and used to set the quality value used by libfaac. A reasonable range
2457 for the option value in QP units is [10-500], the higher the value the
2461 <dt> ‘<samp>q (<em>-q</em>)</samp>’</dt>
2462 <dd><p>Enable VBR mode when set to a non-negative value, and set constant
2463 quality value as a double floating point value in QP units.
2465 <p>The value sets the quality value used by libfaac. A reasonable range
2466 for the option value is [10-500], the higher the value the higher the
2469 <p>This option is valid only using the <code>ffmpeg</code> command-line
2470 tool. For library interface users, use ‘<samp>global_quality</samp>’.
2474 <a name="Examples-2"></a>
2475 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Examples-2">8.3.2 Examples</a></h3>
2479 Use <code>ffmpeg</code> to convert an audio file to ABR 128 kbps AAC in an M4A (MP4)
2481 <table><tr><td> </td><td><pre class="example">ffmpeg -i input.wav -codec:a libfaac -b:a 128k -output.m4a
2482 </pre></td></tr></table>
2485 Use <code>ffmpeg</code> to convert an audio file to VBR AAC, using the
2487 <table><tr><td> </td><td><pre class="example">ffmpeg -i input.wav -c:a libfaac -profile:a aac_ltp -q:a 100 output.m4a
2488 </pre></td></tr></table>
2491 <p><a name="libfdk_002daac_002denc"></a>
2492 </p><a name="libfdk_005faac"></a>
2493 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libfdk_005faac">8.4 libfdk_aac</a></h2>
2495 <p>libfdk-aac AAC (Advanced Audio Coding) encoder wrapper.
2497 <p>The libfdk-aac library is based on the Fraunhofer FDK AAC code from
2498 the Android project.
2500 <p>Requires the presence of the libfdk-aac headers and library during
2501 configuration. You need to explicitly configure the build with
2502 <code>--enable-libfdk-aac</code>. The library is also incompatible with GPL,
2503 so if you allow the use of GPL, you should configure with
2504 <code>--enable-gpl --enable-nonfree --enable-libfdk-aac</code>.
2506 <p>This encoder is considered to be of higher quality with respect to
2507 both <a href="#aacenc">the native experimental FFmpeg AAC encoder</a> and
2508 <a href="#libfaac">libfaac</a>.
2510 <p>VBR encoding, enabled through the ‘<samp>vbr</samp>’ or ‘<samp>flags
2511 +qscale</samp>’ options, is experimental and only works with some
2512 combinations of parameters.
2514 <p>Support for encoding 7.1 audio is only available with libfdk-aac 0.1.3 or
2517 <p>For more information see the fdk-aac project at
2518 <a href="http://sourceforge.net/p/opencore-amr/fdk-aac/">http://sourceforge.net/p/opencore-amr/fdk-aac/</a>.
2520 <a name="Options-13"></a>
2521 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-13">8.4.1 Options</a></h3>
2523 <p>The following options are mapped on the shared FFmpeg codec options.
2525 <dl compact="compact">
2526 <dt> ‘<samp>b</samp>’</dt>
2527 <dd><p>Set bit rate in bits/s. If the bitrate is not explicitly specified, it
2528 is automatically set to a suitable value depending on the selected
2531 <p>In case VBR mode is enabled the option is ignored.
2534 <dt> ‘<samp>ar</samp>’</dt>
2535 <dd><p>Set audio sampling rate (in Hz).
2538 <dt> ‘<samp>channels</samp>’</dt>
2539 <dd><p>Set the number of audio channels.
2542 <dt> ‘<samp>flags +qscale</samp>’</dt>
2543 <dd><p>Enable fixed quality, VBR (Variable Bit Rate) mode.
2544 Note that VBR is implicitly enabled when the ‘<samp>vbr</samp>’ value is
2548 <dt> ‘<samp>cutoff</samp>’</dt>
2549 <dd><p>Set cutoff frequency. If not specified (or explicitly set to 0) it
2550 will use a value automatically computed by the library. Default value
2554 <dt> ‘<samp>profile</samp>’</dt>
2555 <dd><p>Set audio profile.
2557 <p>The following profiles are recognized:
2558 </p><dl compact="compact">
2559 <dt> ‘<samp>aac_low</samp>’</dt>
2560 <dd><p>Low Complexity AAC (LC)
2563 <dt> ‘<samp>aac_he</samp>’</dt>
2564 <dd><p>High Efficiency AAC (HE-AAC)
2567 <dt> ‘<samp>aac_he_v2</samp>’</dt>
2568 <dd><p>High Efficiency AAC version 2 (HE-AACv2)
2571 <dt> ‘<samp>aac_ld</samp>’</dt>
2572 <dd><p>Low Delay AAC (LD)
2575 <dt> ‘<samp>aac_eld</samp>’</dt>
2576 <dd><p>Enhanced Low Delay AAC (ELD)
2580 <p>If not specified it is set to ‘<samp>aac_low</samp>’.
2584 <p>The following are private options of the libfdk_aac encoder.
2586 <dl compact="compact">
2587 <dt> ‘<samp>afterburner</samp>’</dt>
2588 <dd><p>Enable afterburner feature if set to 1, disabled if set to 0. This
2589 improves the quality but also the required processing power.
2591 <p>Default value is 1.
2594 <dt> ‘<samp>eld_sbr</samp>’</dt>
2595 <dd><p>Enable SBR (Spectral Band Replication) for ELD if set to 1, disabled
2598 <p>Default value is 0.
2601 <dt> ‘<samp>signaling</samp>’</dt>
2602 <dd><p>Set SBR/PS signaling style.
2604 <p>It can assume one of the following values:
2605 </p><dl compact="compact">
2606 <dt> ‘<samp>default</samp>’</dt>
2607 <dd><p>choose signaling implicitly (explicit hierarchical by default,
2608 implicit if global header is disabled)
2611 <dt> ‘<samp>implicit</samp>’</dt>
2612 <dd><p>implicit backwards compatible signaling
2615 <dt> ‘<samp>explicit_sbr</samp>’</dt>
2616 <dd><p>explicit SBR, implicit PS signaling
2619 <dt> ‘<samp>explicit_hierarchical</samp>’</dt>
2620 <dd><p>explicit hierarchical signaling
2624 <p>Default value is ‘<samp>default</samp>’.
2627 <dt> ‘<samp>latm</samp>’</dt>
2628 <dd><p>Output LATM/LOAS encapsulated data if set to 1, disabled if set to 0.
2630 <p>Default value is 0.
2633 <dt> ‘<samp>header_period</samp>’</dt>
2634 <dd><p>Set StreamMuxConfig and PCE repetition period (in frames) for sending
2635 in-band configuration buffers within LATM/LOAS transport layer.
2637 <p>Must be a 16-bits non-negative integer.
2639 <p>Default value is 0.
2642 <dt> ‘<samp>vbr</samp>’</dt>
2643 <dd><p>Set VBR mode, from 1 to 5. 1 is lowest quality (though still pretty
2644 good) and 5 is highest quality. A value of 0 will disable VBR, and CBR
2645 (Constant Bit Rate) is enabled.
2647 <p>Currently only the ‘<samp>aac_low</samp>’ profile supports VBR encoding.
2649 <p>VBR modes 1-5 correspond to roughly the following average bit rates:
2651 <dl compact="compact">
2652 <dt> ‘<samp>1</samp>’</dt>
2653 <dd><p>32 kbps/channel
2655 <dt> ‘<samp>2</samp>’</dt>
2656 <dd><p>40 kbps/channel
2658 <dt> ‘<samp>3</samp>’</dt>
2659 <dd><p>48-56 kbps/channel
2661 <dt> ‘<samp>4</samp>’</dt>
2662 <dd><p>64 kbps/channel
2664 <dt> ‘<samp>5</samp>’</dt>
2665 <dd><p>about 80-96 kbps/channel
2669 <p>Default value is 0.
2673 <a name="Examples-1"></a>
2674 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Examples-1">8.4.2 Examples</a></h3>
2678 Use <code>ffmpeg</code> to convert an audio file to VBR AAC in an M4A (MP4)
2680 <table><tr><td> </td><td><pre class="example">ffmpeg -i input.wav -codec:a libfdk_aac -vbr 3 output.m4a
2681 </pre></td></tr></table>
2684 Use <code>ffmpeg</code> to convert an audio file to CBR 64k kbps AAC, using the
2685 High-Efficiency AAC profile:
2686 <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
2687 </pre></td></tr></table>
2690 <p><a name="libmp3lame"></a>
2691 </p><a name="libmp3lame-1"></a>
2692 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libmp3lame-1">8.5 libmp3lame</a></h2>
2694 <p>LAME (Lame Ain’t an MP3 Encoder) MP3 encoder wrapper.
2696 <p>Requires the presence of the libmp3lame headers and library during
2697 configuration. You need to explicitly configure the build with
2698 <code>--enable-libmp3lame</code>.
2700 <p>See <a href="#libshine">libshine</a> for a fixed-point MP3 encoder, although with a
2703 <a name="Options-5"></a>
2704 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-5">8.5.1 Options</a></h3>
2706 <p>The following options are supported by the libmp3lame wrapper. The
2707 <code>lame</code>-equivalent of the options are listed in parentheses.
2709 <dl compact="compact">
2710 <dt> ‘<samp>b (<em>-b</em>)</samp>’</dt>
2711 <dd><p>Set bitrate expressed in bits/s for CBR or ABR. LAME <code>bitrate</code> is
2712 expressed in kilobits/s.
2715 <dt> ‘<samp>q (<em>-V</em>)</samp>’</dt>
2716 <dd><p>Set constant quality setting for VBR. This option is valid only
2717 using the <code>ffmpeg</code> command-line tool. For library interface
2718 users, use ‘<samp>global_quality</samp>’.
2721 <dt> ‘<samp>compression_level (<em>-q</em>)</samp>’</dt>
2722 <dd><p>Set algorithm quality. Valid arguments are integers in the 0-9 range,
2723 with 0 meaning highest quality but slowest, and 9 meaning fastest
2724 while producing the worst quality.
2727 <dt> ‘<samp>reservoir</samp>’</dt>
2728 <dd><p>Enable use of bit reservoir when set to 1. Default value is 1. LAME
2729 has this enabled by default, but can be overridden by use
2730 ‘<samp>--nores</samp>’ option.
2733 <dt> ‘<samp>joint_stereo (<em>-m j</em>)</samp>’</dt>
2734 <dd><p>Enable the encoder to use (on a frame by frame basis) either L/R
2735 stereo or mid/side stereo. Default value is 1.
2738 <dt> ‘<samp>abr (<em>--abr</em>)</samp>’</dt>
2739 <dd><p>Enable the encoder to use ABR when set to 1. The <code>lame</code>
2740 ‘<samp>--abr</samp>’ sets the target bitrate, while this options only
2741 tells FFmpeg to use ABR still relies on ‘<samp>b</samp>’ to set bitrate.
2746 <a name="libopencore_002damrnb-1"></a>
2747 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopencore_002damrnb-1">8.6 libopencore-amrnb</a></h2>
2749 <p>OpenCORE Adaptive Multi-Rate Narrowband encoder.
2751 <p>Requires the presence of the libopencore-amrnb headers and library during
2752 configuration. You need to explicitly configure the build with
2753 <code>--enable-libopencore-amrnb --enable-version3</code>.
2755 <p>This is a mono-only encoder. Officially it only supports 8000Hz sample rate,
2756 but you can override it by setting ‘<samp>strict</samp>’ to ‘<samp>unofficial</samp>’ or
2759 <a name="Options"></a>
2760 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options">8.6.1 Options</a></h3>
2762 <dl compact="compact">
2763 <dt> ‘<samp>b</samp>’</dt>
2764 <dd><p>Set bitrate in bits per second. Only the following bitrates are supported,
2765 otherwise libavcodec will round to the nearest valid bitrate.
2767 <dl compact="compact">
2768 <dt> ‘<samp>4750</samp>’</dt>
2769 <dt> ‘<samp>5150</samp>’</dt>
2770 <dt> ‘<samp>5900</samp>’</dt>
2771 <dt> ‘<samp>6700</samp>’</dt>
2772 <dt> ‘<samp>7400</samp>’</dt>
2773 <dt> ‘<samp>7950</samp>’</dt>
2774 <dt> ‘<samp>10200</samp>’</dt>
2775 <dt> ‘<samp>12200</samp>’</dt>
2779 <dt> ‘<samp>dtx</samp>’</dt>
2780 <dd><p>Allow discontinuous transmission (generate comfort noise) when set to 1. The
2781 default value is 0 (disabled).
2786 <p><a name="libshine"></a>
2787 </p><a name="libshine-1"></a>
2788 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libshine-1">8.7 libshine</a></h2>
2790 <p>Shine Fixed-Point MP3 encoder wrapper.
2792 <p>Shine is a fixed-point MP3 encoder. It has a far better performance on
2793 platforms without an FPU, e.g. armel CPUs, and some phones and tablets.
2794 However, as it is more targeted on performance than quality, it is not on par
2795 with LAME and other production-grade encoders quality-wise. Also, according to
2796 the project’s homepage, this encoder may not be free of bugs as the code was
2797 written a long time ago and the project was dead for at least 5 years.
2799 <p>This encoder only supports stereo and mono input. This is also CBR-only.
2801 <p>The original project (last updated in early 2007) is at
2802 <a href="http://sourceforge.net/projects/libshine-fxp/">http://sourceforge.net/projects/libshine-fxp/</a>. We only support the
2803 updated fork by the Savonet/Liquidsoap project at <a href="https://github.com/savonet/shine">https://github.com/savonet/shine</a>.
2805 <p>Requires the presence of the libshine headers and library during
2806 configuration. You need to explicitly configure the build with
2807 <code>--enable-libshine</code>.
2809 <p>See also <a href="#libmp3lame">libmp3lame</a>.
2811 <a name="Options-4"></a>
2812 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-4">8.7.1 Options</a></h3>
2814 <p>The following options are supported by the libshine wrapper. The
2815 <code>shineenc</code>-equivalent of the options are listed in parentheses.
2817 <dl compact="compact">
2818 <dt> ‘<samp>b (<em>-b</em>)</samp>’</dt>
2819 <dd><p>Set bitrate expressed in bits/s for CBR. <code>shineenc</code> ‘<samp>-b</samp>’ option
2820 is expressed in kilobits/s.
2825 <a name="libtwolame"></a>
2826 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libtwolame">8.8 libtwolame</a></h2>
2828 <p>TwoLAME MP2 encoder wrapper.
2830 <p>Requires the presence of the libtwolame headers and library during
2831 configuration. You need to explicitly configure the build with
2832 <code>--enable-libtwolame</code>.
2834 <a name="Options-6"></a>
2835 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-6">8.8.1 Options</a></h3>
2837 <p>The following options are supported by the libtwolame wrapper. The
2838 <code>twolame</code>-equivalent options follow the FFmpeg ones and are in
2841 <dl compact="compact">
2842 <dt> ‘<samp>b (<em>-b</em>)</samp>’</dt>
2843 <dd><p>Set bitrate expressed in bits/s for CBR. <code>twolame</code> ‘<samp>b</samp>’
2844 option is expressed in kilobits/s. Default value is 128k.
2847 <dt> ‘<samp>q (<em>-V</em>)</samp>’</dt>
2848 <dd><p>Set quality for experimental VBR support. Maximum value range is
2849 from -50 to 50, useful range is from -10 to 10. The higher the
2850 value, the better the quality. This option is valid only using the
2851 <code>ffmpeg</code> command-line tool. For library interface users,
2852 use ‘<samp>global_quality</samp>’.
2855 <dt> ‘<samp>mode (<em>--mode</em>)</samp>’</dt>
2856 <dd><p>Set the mode of the resulting audio. Possible values:
2858 <dl compact="compact">
2859 <dt> ‘<samp>auto</samp>’</dt>
2860 <dd><p>Choose mode automatically based on the input. This is the default.
2862 <dt> ‘<samp>stereo</samp>’</dt>
2865 <dt> ‘<samp>joint_stereo</samp>’</dt>
2868 <dt> ‘<samp>dual_channel</samp>’</dt>
2871 <dt> ‘<samp>mono</samp>’</dt>
2877 <dt> ‘<samp>psymodel (<em>--psyc-mode</em>)</samp>’</dt>
2878 <dd><p>Set psychoacoustic model to use in encoding. The argument must be
2879 an integer between -1 and 4, inclusive. The higher the value, the
2880 better the quality. The default value is 3.
2883 <dt> ‘<samp>energy_levels (<em>--energy</em>)</samp>’</dt>
2884 <dd><p>Enable energy levels extensions when set to 1. The default value is
2888 <dt> ‘<samp>error_protection (<em>--protect</em>)</samp>’</dt>
2889 <dd><p>Enable CRC error protection when set to 1. The default value is 0
2893 <dt> ‘<samp>copyright (<em>--copyright</em>)</samp>’</dt>
2894 <dd><p>Set MPEG audio copyright flag when set to 1. The default value is 0
2898 <dt> ‘<samp>original (<em>--original</em>)</samp>’</dt>
2899 <dd><p>Set MPEG audio original flag when set to 1. The default value is 0
2905 <p><a name="libvo_002daacenc"></a>
2906 </p><a name="libvo_002daacenc-1"></a>
2907 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvo_002daacenc-1">8.9 libvo-aacenc</a></h2>
2909 <p>VisualOn AAC encoder.
2911 <p>Requires the presence of the libvo-aacenc headers and library during
2912 configuration. You need to explicitly configure the build with
2913 <code>--enable-libvo-aacenc --enable-version3</code>.
2915 <p>This encoder is considered to be worse than the
2916 <a href="#aacenc">native experimental FFmpeg AAC encoder</a>, according to
2919 <a name="Options-17"></a>
2920 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-17">8.9.1 Options</a></h3>
2922 <p>The VisualOn AAC encoder only support encoding AAC-LC and up to 2
2923 channels. It is also CBR-only.
2925 <dl compact="compact">
2926 <dt> ‘<samp>b</samp>’</dt>
2927 <dd><p>Set bit rate in bits/s.
2932 <a name="libvo_002damrwbenc"></a>
2933 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvo_002damrwbenc">8.10 libvo-amrwbenc</a></h2>
2935 <p>VisualOn Adaptive Multi-Rate Wideband encoder.
2937 <p>Requires the presence of the libvo-amrwbenc headers and library during
2938 configuration. You need to explicitly configure the build with
2939 <code>--enable-libvo-amrwbenc --enable-version3</code>.
2941 <p>This is a mono-only encoder. Officially it only supports 16000Hz sample
2942 rate, but you can override it by setting ‘<samp>strict</samp>’ to
2943 ‘<samp>unofficial</samp>’ or lower.
2945 <a name="Options-3"></a>
2946 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-3">8.10.1 Options</a></h3>
2948 <dl compact="compact">
2949 <dt> ‘<samp>b</samp>’</dt>
2950 <dd><p>Set bitrate in bits/s. Only the following bitrates are supported, otherwise
2951 libavcodec will round to the nearest valid bitrate.
2953 <dl compact="compact">
2954 <dt> ‘<samp>6600</samp>’</dt>
2955 <dt> ‘<samp>8850</samp>’</dt>
2956 <dt> ‘<samp>12650</samp>’</dt>
2957 <dt> ‘<samp>14250</samp>’</dt>
2958 <dt> ‘<samp>15850</samp>’</dt>
2959 <dt> ‘<samp>18250</samp>’</dt>
2960 <dt> ‘<samp>19850</samp>’</dt>
2961 <dt> ‘<samp>23050</samp>’</dt>
2962 <dt> ‘<samp>23850</samp>’</dt>
2966 <dt> ‘<samp>dtx</samp>’</dt>
2967 <dd><p>Allow discontinuous transmission (generate comfort noise) when set to 1. The
2968 default value is 0 (disabled).
2973 <a name="libopus"></a>
2974 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopus">8.11 libopus</a></h2>
2976 <p>libopus Opus Interactive Audio Codec encoder wrapper.
2978 <p>Requires the presence of the libopus headers and library during
2979 configuration. You need to explicitly configure the build with
2980 <code>--enable-libopus</code>.
2982 <a name="Option-Mapping"></a>
2983 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Option-Mapping">8.11.1 Option Mapping</a></h3>
2985 <p>Most libopus options are modeled after the <code>opusenc</code> utility from
2986 opus-tools. The following is an option mapping chart describing options
2987 supported by the libopus wrapper, and their <code>opusenc</code>-equivalent
2990 <dl compact="compact">
2991 <dt> ‘<samp>b (<em>bitrate</em>)</samp>’</dt>
2992 <dd><p>Set the bit rate in bits/s. FFmpeg’s ‘<samp>b</samp>’ option is
2993 expressed in bits/s, while <code>opusenc</code>’s ‘<samp>bitrate</samp>’ in
2997 <dt> ‘<samp>vbr (<em>vbr</em>, <em>hard-cbr</em>, and <em>cvbr</em>)</samp>’</dt>
2998 <dd><p>Set VBR mode. The FFmpeg ‘<samp>vbr</samp>’ option has the following
2999 valid arguments, with the their <code>opusenc</code> equivalent options
3002 <dl compact="compact">
3003 <dt> ‘<samp>off (<em>hard-cbr</em>)</samp>’</dt>
3004 <dd><p>Use constant bit rate encoding.
3007 <dt> ‘<samp>on (<em>vbr</em>)</samp>’</dt>
3008 <dd><p>Use variable bit rate encoding (the default).
3011 <dt> ‘<samp>constrained (<em>cvbr</em>)</samp>’</dt>
3012 <dd><p>Use constrained variable bit rate encoding.
3017 <dt> ‘<samp>compression_level (<em>comp</em>)</samp>’</dt>
3018 <dd><p>Set encoding algorithm complexity. Valid options are integers in
3019 the 0-10 range. 0 gives the fastest encodes but lower quality, while 10
3020 gives the highest quality but slowest encoding. The default is 10.
3023 <dt> ‘<samp>frame_duration (<em>framesize</em>)</samp>’</dt>
3024 <dd><p>Set maximum frame size, or duration of a frame in milliseconds. The
3025 argument must be exactly the following: 2.5, 5, 10, 20, 40, 60. Smaller
3026 frame sizes achieve lower latency but less quality at a given bitrate.
3027 Sizes greater than 20ms are only interesting at fairly low bitrates.
3028 The default is 20ms.
3031 <dt> ‘<samp>packet_loss (<em>expect-loss</em>)</samp>’</dt>
3032 <dd><p>Set expected packet loss percentage. The default is 0.
3035 <dt> ‘<samp>application (N.A.)</samp>’</dt>
3036 <dd><p>Set intended application type. Valid options are listed below:
3038 <dl compact="compact">
3039 <dt> ‘<samp>voip</samp>’</dt>
3040 <dd><p>Favor improved speech intelligibility.
3042 <dt> ‘<samp>audio</samp>’</dt>
3043 <dd><p>Favor faithfulness to the input (the default).
3045 <dt> ‘<samp>lowdelay</samp>’</dt>
3046 <dd><p>Restrict to only the lowest delay modes.
3051 <dt> ‘<samp>cutoff (N.A.)</samp>’</dt>
3052 <dd><p>Set cutoff bandwidth in Hz. The argument must be exactly one of the
3053 following: 4000, 6000, 8000, 12000, or 20000, corresponding to
3054 narrowband, mediumband, wideband, super wideband, and fullband
3055 respectively. The default is 0 (cutoff disabled).
3060 <a name="libvorbis"></a>
3061 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvorbis">8.12 libvorbis</a></h2>
3063 <p>libvorbis encoder wrapper.
3065 <p>Requires the presence of the libvorbisenc headers and library during
3066 configuration. You need to explicitly configure the build with
3067 <code>--enable-libvorbis</code>.
3069 <a name="Options-10"></a>
3070 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-10">8.12.1 Options</a></h3>
3072 <p>The following options are supported by the libvorbis wrapper. The
3073 <code>oggenc</code>-equivalent of the options are listed in parentheses.
3075 <p>To get a more accurate and extensive documentation of the libvorbis
3076 options, consult the libvorbisenc’s and <code>oggenc</code>’s documentations.
3077 See <a href="http://xiph.org/vorbis/">http://xiph.org/vorbis/</a>,
3078 <a href="http://wiki.xiph.org/Vorbis-tools">http://wiki.xiph.org/Vorbis-tools</a>, and oggenc(1).
3080 <dl compact="compact">
3081 <dt> ‘<samp>b (<em>-b</em>)</samp>’</dt>
3082 <dd><p>Set bitrate expressed in bits/s for ABR. <code>oggenc</code> ‘<samp>-b</samp>’ is
3083 expressed in kilobits/s.
3086 <dt> ‘<samp>q (<em>-q</em>)</samp>’</dt>
3087 <dd><p>Set constant quality setting for VBR. The value should be a float
3088 number in the range of -1.0 to 10.0. The higher the value, the better
3089 the quality. The default value is ‘<samp>3.0</samp>’.
3091 <p>This option is valid only using the <code>ffmpeg</code> command-line tool.
3092 For library interface users, use ‘<samp>global_quality</samp>’.
3095 <dt> ‘<samp>cutoff (<em>--advanced-encode-option lowpass_frequency=N</em>)</samp>’</dt>
3096 <dd><p>Set cutoff bandwidth in Hz, a value of 0 disables cutoff. <code>oggenc</code>’s
3097 related option is expressed in kHz. The default value is ‘<samp>0</samp>’ (cutoff
3101 <dt> ‘<samp>minrate (<em>-m</em>)</samp>’</dt>
3102 <dd><p>Set minimum bitrate expressed in bits/s. <code>oggenc</code> ‘<samp>-m</samp>’ is
3103 expressed in kilobits/s.
3106 <dt> ‘<samp>maxrate (<em>-M</em>)</samp>’</dt>
3107 <dd><p>Set maximum bitrate expressed in bits/s. <code>oggenc</code> ‘<samp>-M</samp>’ is
3108 expressed in kilobits/s. This only has effect on ABR mode.
3111 <dt> ‘<samp>iblock (<em>--advanced-encode-option impulse_noisetune=N</em>)</samp>’</dt>
3112 <dd><p>Set noise floor bias for impulse blocks. The value is a float number from
3113 -15.0 to 0.0. A negative bias instructs the encoder to pay special attention
3114 to the crispness of transients in the encoded audio. The tradeoff for better
3115 transient response is a higher bitrate.
3120 <p><a name="libwavpack"></a>
3121 </p><a name="libwavpack-1"></a>
3122 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libwavpack-1">8.13 libwavpack</a></h2>
3124 <p>A wrapper providing WavPack encoding through libwavpack.
3126 <p>Only lossless mode using 32-bit integer samples is supported currently.
3128 <p>Requires the presence of the libwavpack headers and library during
3129 configuration. You need to explicitly configure the build with
3130 <code>--enable-libwavpack</code>.
3132 <p>Note that a libavcodec-native encoder for the WavPack codec exists so users can
3133 encode audios with this codec without using this encoder. See <a href="#wavpackenc">wavpackenc</a>.
3135 <a name="Options-15"></a>
3136 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-15">8.13.1 Options</a></h3>
3138 <p><code>wavpack</code> command line utility’s corresponding options are listed in
3139 parentheses, if any.
3141 <dl compact="compact">
3142 <dt> ‘<samp>frame_size (<em>--blocksize</em>)</samp>’</dt>
3143 <dd><p>Default is 32768.
3146 <dt> ‘<samp>compression_level</samp>’</dt>
3147 <dd><p>Set speed vs. compression tradeoff. Acceptable arguments are listed below:
3149 <dl compact="compact">
3150 <dt> ‘<samp>0 (<em>-f</em>)</samp>’</dt>
3154 <dt> ‘<samp>1</samp>’</dt>
3155 <dd><p>Normal (default) settings.
3158 <dt> ‘<samp>2 (<em>-h</em>)</samp>’</dt>
3159 <dd><p>High quality.
3162 <dt> ‘<samp>3 (<em>-hh</em>)</samp>’</dt>
3163 <dd><p>Very high quality.
3166 <dt> ‘<samp>4-8 (<em>-hh -x</em><var>EXTRAPROC</var>)</samp>’</dt>
3167 <dd><p>Same as ‘<samp>3</samp>’, but with extra processing enabled.
3169 <p>‘<samp>4</samp>’ is the same as ‘<samp>-x2</samp>’ and ‘<samp>8</samp>’ is the same as ‘<samp>-x6</samp>’.
3176 <p><a name="wavpackenc"></a>
3177 </p><a name="wavpack"></a>
3178 <h2 class="section"><a href="ffmpeg-codecs.html#toc-wavpack">8.14 wavpack</a></h2>
3180 <p>WavPack lossless audio encoder.
3182 <p>This is a libavcodec-native WavPack encoder. There is also an encoder based on
3183 libwavpack, but there is virtually no reason to use that encoder.
3185 <p>See also <a href="#libwavpack">libwavpack</a>.
3187 <a name="Options-11"></a>
3188 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-11">8.14.1 Options</a></h3>
3190 <p>The equivalent options for <code>wavpack</code> command line utility are listed in
3193 <a name="Shared-options"></a>
3194 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Shared-options">8.14.1.1 Shared options</a></h4>
3196 <p>The following shared options are effective for this encoder. Only special notes
3197 about this particular encoder will be documented here. For the general meaning
3198 of the options, see <a href="#codec_002doptions">the Codec Options chapter</a>.
3200 <dl compact="compact">
3201 <dt> ‘<samp>frame_size (<em>--blocksize</em>)</samp>’</dt>
3202 <dd><p>For this encoder, the range for this option is between 128 and 131072. Default
3203 is automatically decided based on sample rate and number of channel.
3205 <p>For the complete formula of calculating default, see
3206 ‘<tt>libavcodec/wavpackenc.c</tt>’.
3209 <dt> ‘<samp>compression_level (<em>-f</em>, <em>-h</em>, <em>-hh</em>, and <em>-x</em>)</samp>’</dt>
3210 <dd><p>This option’s syntax is consistent with <a href="#libwavpack">libwavpack</a>’s.
3214 <a name="Private-options"></a>
3215 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Private-options">8.14.1.2 Private options</a></h4>
3217 <dl compact="compact">
3218 <dt> ‘<samp>joint_stereo (<em>-j</em>)</samp>’</dt>
3219 <dd><p>Set whether to enable joint stereo. Valid values are:
3221 <dl compact="compact">
3222 <dt> ‘<samp>on (<em>1</em>)</samp>’</dt>
3223 <dd><p>Force mid/side audio encoding.
3225 <dt> ‘<samp>off (<em>0</em>)</samp>’</dt>
3226 <dd><p>Force left/right audio encoding.
3228 <dt> ‘<samp>auto</samp>’</dt>
3229 <dd><p>Let the encoder decide automatically.
3234 <dt> ‘<samp>optimize_mono</samp>’</dt>
3235 <dd><p>Set whether to enable optimization for mono. This option is only effective for
3236 non-mono streams. Available values:
3238 <dl compact="compact">
3239 <dt> ‘<samp>on</samp>’</dt>
3242 <dt> ‘<samp>off</samp>’</dt>
3251 <a name="Video-Encoders"></a>
3252 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Video-Encoders">9. Video Encoders</a></h1>
3254 <p>A description of some of the currently available video encoders
3257 <a name="libtheora"></a>
3258 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libtheora">9.1 libtheora</a></h2>
3260 <p>libtheora Theora encoder wrapper.
3262 <p>Requires the presence of the libtheora headers and library during
3263 configuration. You need to explicitly configure the build with
3264 <code>--enable-libtheora</code>.
3266 <p>For more information about the libtheora project see
3267 <a href="http://www.theora.org/">http://www.theora.org/</a>.
3269 <a name="Options-1"></a>
3270 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-1">9.1.1 Options</a></h3>
3272 <p>The following global options are mapped to internal libtheora options
3273 which affect the quality and the bitrate of the encoded stream.
3275 <dl compact="compact">
3276 <dt> ‘<samp>b</samp>’</dt>
3277 <dd><p>Set the video bitrate in bit/s for CBR (Constant Bit Rate) mode. In
3278 case VBR (Variable Bit Rate) mode is enabled this option is ignored.
3281 <dt> ‘<samp>flags</samp>’</dt>
3282 <dd><p>Used to enable constant quality mode (VBR) encoding through the
3283 ‘<samp>qscale</samp>’ flag, and to enable the <code>pass1</code> and <code>pass2</code>
3287 <dt> ‘<samp>g</samp>’</dt>
3288 <dd><p>Set the GOP size.
3291 <dt> ‘<samp>global_quality</samp>’</dt>
3292 <dd><p>Set the global quality as an integer in lambda units.
3294 <p>Only relevant when VBR mode is enabled with <code>flags +qscale</code>. The
3295 value is converted to QP units by dividing it by <code>FF_QP2LAMBDA</code>,
3296 clipped in the [0 - 10] range, and then multiplied by 6.3 to get a
3297 value in the native libtheora range [0-63]. A higher value corresponds
3298 to a higher quality.
3301 <dt> ‘<samp>q</samp>’</dt>
3302 <dd><p>Enable VBR mode when set to a non-negative value, and set constant
3303 quality value as a double floating point value in QP units.
3305 <p>The value is clipped in the [0-10] range, and then multiplied by 6.3
3306 to get a value in the native libtheora range [0-63].
3308 <p>This option is valid only using the <code>ffmpeg</code> command-line
3309 tool. For library interface users, use ‘<samp>global_quality</samp>’.
3313 <a name="Examples"></a>
3314 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Examples">9.1.2 Examples</a></h3>
3318 Set maximum constant quality (VBR) encoding with <code>ffmpeg</code>:
3319 <table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -codec:v libtheora -q:v 10 OUTPUT.ogg
3320 </pre></td></tr></table>
3323 Use <code>ffmpeg</code> to convert a CBR 1000 kbps Theora video stream:
3324 <table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -codec:v libtheora -b:v 1000k OUTPUT.ogg
3325 </pre></td></tr></table>
3328 <a name="libvpx"></a>
3329 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvpx">9.2 libvpx</a></h2>
3331 <p>VP8 format supported through libvpx.
3333 <p>Requires the presence of the libvpx headers and library during configuration.
3334 You need to explicitly configure the build with <code>--enable-libvpx</code>.
3336 <a name="Options-20"></a>
3337 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-20">9.2.1 Options</a></h3>
3339 <p>Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
3341 <dl compact="compact">
3342 <dt> ‘<samp>threads</samp>’</dt>
3346 <dt> ‘<samp>profile</samp>’</dt>
3350 <dt> ‘<samp>vb</samp>’</dt>
3351 <dd><p>rc_target_bitrate
3354 <dt> ‘<samp>g</samp>’</dt>
3358 <dt> ‘<samp>keyint_min</samp>’</dt>
3362 <dt> ‘<samp>qmin</samp>’</dt>
3363 <dd><p>rc_min_quantizer
3366 <dt> ‘<samp>qmax</samp>’</dt>
3367 <dd><p>rc_max_quantizer
3370 <dt> ‘<samp>bufsize, vb</samp>’</dt>
3372 <code>(bufsize * 1000 / vb)</code>
3374 <p>rc_buf_optimal_sz
3375 <code>(bufsize * 1000 / vb * 5 / 6)</code>
3378 <dt> ‘<samp>rc_init_occupancy, vb</samp>’</dt>
3379 <dd><p>rc_buf_initial_sz
3380 <code>(rc_init_occupancy * 1000 / vb)</code>
3383 <dt> ‘<samp>rc_buffer_aggressivity</samp>’</dt>
3384 <dd><p>rc_undershoot_pct
3387 <dt> ‘<samp>skip_threshold</samp>’</dt>
3388 <dd><p>rc_dropframe_thresh
3391 <dt> ‘<samp>qcomp</samp>’</dt>
3392 <dd><p>rc_2pass_vbr_bias_pct
3395 <dt> ‘<samp>maxrate, vb</samp>’</dt>
3396 <dd><p>rc_2pass_vbr_maxsection_pct
3397 <code>(maxrate * 100 / vb)</code>
3400 <dt> ‘<samp>minrate, vb</samp>’</dt>
3401 <dd><p>rc_2pass_vbr_minsection_pct
3402 <code>(minrate * 100 / vb)</code>
3405 <dt> ‘<samp>minrate, maxrate, vb</samp>’</dt>
3406 <dd><p><code>VPX_CBR</code>
3407 <code>(minrate == maxrate == vb)</code>
3410 <dt> ‘<samp>crf</samp>’</dt>
3411 <dd><p><code>VPX_CQ</code>, <code>VP8E_SET_CQ_LEVEL</code>
3414 <dt> ‘<samp>quality</samp>’</dt>
3415 <dd><dl compact="compact">
3416 <dt> ‘<samp><var>best</var></samp>’</dt>
3417 <dd><p><code>VPX_DL_BEST_QUALITY</code>
3419 <dt> ‘<samp><var>good</var></samp>’</dt>
3420 <dd><p><code>VPX_DL_GOOD_QUALITY</code>
3422 <dt> ‘<samp><var>realtime</var></samp>’</dt>
3423 <dd><p><code>VPX_DL_REALTIME</code>
3428 <dt> ‘<samp>speed</samp>’</dt>
3429 <dd><p><code>VP8E_SET_CPUUSED</code>
3432 <dt> ‘<samp>nr</samp>’</dt>
3433 <dd><p><code>VP8E_SET_NOISE_SENSITIVITY</code>
3436 <dt> ‘<samp>mb_threshold</samp>’</dt>
3437 <dd><p><code>VP8E_SET_STATIC_THRESHOLD</code>
3440 <dt> ‘<samp>slices</samp>’</dt>
3441 <dd><p><code>VP8E_SET_TOKEN_PARTITIONS</code>
3444 <dt> ‘<samp>max-intra-rate</samp>’</dt>
3445 <dd><p><code>VP8E_SET_MAX_INTRA_BITRATE_PCT</code>
3448 <dt> ‘<samp>force_key_frames</samp>’</dt>
3449 <dd><p><code>VPX_EFLAG_FORCE_KF</code>
3452 <dt> ‘<samp>Alternate reference frame related</samp>’</dt>
3453 <dd><dl compact="compact">
3454 <dt> ‘<samp>vp8flags altref</samp>’</dt>
3455 <dd><p><code>VP8E_SET_ENABLEAUTOALTREF</code>
3457 <dt> ‘<samp><var>arnr_max_frames</var></samp>’</dt>
3458 <dd><p><code>VP8E_SET_ARNR_MAXFRAMES</code>
3460 <dt> ‘<samp><var>arnr_type</var></samp>’</dt>
3461 <dd><p><code>VP8E_SET_ARNR_TYPE</code>
3463 <dt> ‘<samp><var>arnr_strength</var></samp>’</dt>
3464 <dd><p><code>VP8E_SET_ARNR_STRENGTH</code>
3466 <dt> ‘<samp><var>rc_lookahead</var></samp>’</dt>
3467 <dd><p>g_lag_in_frames
3472 <dt> ‘<samp>vp8flags error_resilient</samp>’</dt>
3473 <dd><p>g_error_resilient
3478 <p>For more information about libvpx see:
3479 <a href="http://www.webmproject.org/">http://www.webmproject.org/</a>
3482 <a name="libwebp"></a>
3483 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libwebp">9.3 libwebp</a></h2>
3485 <p>libwebp WebP Image encoder wrapper
3487 <p>libwebp is Google’s official encoder for WebP images. It can encode in either
3488 lossy or lossless mode. Lossy images are essentially a wrapper around a VP8
3489 frame. Lossless images are a separate codec developed by Google.
3491 <a name="Pixel-Format"></a>
3492 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Pixel-Format">9.3.1 Pixel Format</a></h3>
3494 <p>Currently, libwebp only supports YUV420 for lossy and RGB for lossless due
3495 to limitations of the format and libwebp. Alpha is supported for either mode.
3496 Because of API limitations, if RGB is passed in when encoding lossy or YUV is
3497 passed in for encoding lossless, the pixel format will automatically be
3498 converted using functions from libwebp. This is not ideal and is done only for
3501 <a name="Options-7"></a>
3502 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-7">9.3.2 Options</a></h3>
3504 <dl compact="compact">
3505 <dt> ‘<samp>-lossless <var>boolean</var></samp>’</dt>
3506 <dd><p>Enables/Disables use of lossless mode. Default is 0.
3509 <dt> ‘<samp>-compression_level <var>integer</var></samp>’</dt>
3510 <dd><p>For lossy, this is a quality/speed tradeoff. Higher values give better quality
3511 for a given size at the cost of increased encoding time. For lossless, this is
3512 a size/speed tradeoff. Higher values give smaller size at the cost of increased
3513 encoding time. More specifically, it controls the number of extra algorithms
3514 and compression tools used, and varies the combination of these tools. This
3515 maps to the <var>method</var> option in libwebp. The valid range is 0 to 6.
3519 <dt> ‘<samp>-qscale <var>float</var></samp>’</dt>
3520 <dd><p>For lossy encoding, this controls image quality, 0 to 100. For lossless
3521 encoding, this controls the effort and time spent at compressing more. The
3522 default value is 75. Note that for usage via libavcodec, this option is called
3523 <var>global_quality</var> and must be multiplied by <var>FF_QP2LAMBDA</var>.
3526 <dt> ‘<samp>-preset <var>type</var></samp>’</dt>
3527 <dd><p>Configuration preset. This does some automatic settings based on the general
3529 </p><dl compact="compact">
3530 <dt> ‘<samp>none</samp>’</dt>
3531 <dd><p>Do not use a preset.
3533 <dt> ‘<samp>default</samp>’</dt>
3534 <dd><p>Use the encoder default.
3536 <dt> ‘<samp>picture</samp>’</dt>
3537 <dd><p>Digital picture, like portrait, inner shot
3539 <dt> ‘<samp>photo</samp>’</dt>
3540 <dd><p>Outdoor photograph, with natural lighting
3542 <dt> ‘<samp>drawing</samp>’</dt>
3543 <dd><p>Hand or line drawing, with high-contrast details
3545 <dt> ‘<samp>icon</samp>’</dt>
3546 <dd><p>Small-sized colorful images
3548 <dt> ‘<samp>text</samp>’</dt>
3556 <a name="libx264_002c-libx264rgb"></a>
3557 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libx264_002c-libx264rgb">9.4 libx264, libx264rgb</a></h2>
3559 <p>x264 H.264/MPEG-4 AVC encoder wrapper.
3561 <p>This encoder requires the presence of the libx264 headers and library
3562 during configuration. You need to explicitly configure the build with
3563 <code>--enable-libx264</code>.
3565 <p>libx264 supports an impressive number of features, including 8x8 and
3566 4x4 adaptive spatial transform, adaptive B-frame placement, CAVLC/CABAC
3567 entropy coding, interlacing (MBAFF), lossless mode, psy optimizations
3568 for detail retention (adaptive quantization, psy-RD, psy-trellis).
3570 <p>Many libx264 encoder options are mapped to FFmpeg global codec
3571 options, while unique encoder options are provided through private
3572 options. Additionally the ‘<samp>x264opts</samp>’ and ‘<samp>x264-params</samp>’
3573 private options allows one to pass a list of key=value tuples as accepted
3574 by the libx264 <code>x264_param_parse</code> function.
3576 <p>The x264 project website is at
3577 <a href="http://www.videolan.org/developers/x264.html">http://www.videolan.org/developers/x264.html</a>.
3579 <p>The libx264rgb encoder is the same as libx264, except it accepts packed RGB
3580 pixel formats as input instead of YUV.
3582 <a name="Supported-Pixel-Formats"></a>
3583 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Supported-Pixel-Formats">9.4.1 Supported Pixel Formats</a></h3>
3585 <p>x264 supports 8- to 10-bit color spaces. The exact bit depth is controlled at
3586 x264’s configure time. FFmpeg only supports one bit depth in one particular
3587 build. In other words, it is not possible to build one FFmpeg with multiple
3588 versions of x264 with different bit depths.
3590 <a name="Options-19"></a>
3591 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-19">9.4.2 Options</a></h3>
3593 <p>The following options are supported by the libx264 wrapper. The
3594 <code>x264</code>-equivalent options or values are listed in parentheses
3597 <p>To reduce the duplication of documentation, only the private options
3598 and some others requiring special attention are documented here. For
3599 the documentation of the undocumented generic options, see
3600 <a href="#codec_002doptions">the Codec Options chapter</a>.
3602 <p>To get a more accurate and extensive documentation of the libx264
3603 options, invoke the command <code>x264 --full-help</code> or consult
3604 the libx264 documentation.
3606 <dl compact="compact">
3607 <dt> ‘<samp>b (<em>bitrate</em>)</samp>’</dt>
3608 <dd><p>Set bitrate in bits/s. Note that FFmpeg’s ‘<samp>b</samp>’ option is
3609 expressed in bits/s, while <code>x264</code>’s ‘<samp>bitrate</samp>’ is in
3613 <dt> ‘<samp>bf (<em>bframes</em>)</samp>’</dt>
3614 <dt> ‘<samp>g (<em>keyint</em>)</samp>’</dt>
3615 <dt> ‘<samp>qmax (<em>qpmax</em>)</samp>’</dt>
3616 <dt> ‘<samp>qmin (<em>qpmin</em>)</samp>’</dt>
3617 <dt> ‘<samp>qdiff (<em>qpstep</em>)</samp>’</dt>
3618 <dt> ‘<samp>qblur (<em>qblur</em>)</samp>’</dt>
3619 <dt> ‘<samp>qcomp (<em>qcomp</em>)</samp>’</dt>
3620 <dt> ‘<samp>refs (<em>ref</em>)</samp>’</dt>
3621 <dt> ‘<samp>sc_threshold (<em>scenecut</em>)</samp>’</dt>
3622 <dt> ‘<samp>trellis (<em>trellis</em>)</samp>’</dt>
3623 <dt> ‘<samp>nr (<em>nr</em>)</samp>’</dt>
3624 <dt> ‘<samp>me_range (<em>merange</em>)</samp>’</dt>
3625 <dt> ‘<samp>me_method (<em>me</em>)</samp>’</dt>
3626 <dd><p>Set motion estimation method. Possible values in the decreasing order
3629 <dl compact="compact">
3630 <dt> ‘<samp>dia (<em>dia</em>)</samp>’</dt>
3631 <dt> ‘<samp>epzs (<em>dia</em>)</samp>’</dt>
3632 <dd><p>Diamond search with radius 1 (fastest). ‘<samp>epzs</samp>’ is an alias for
3633 ‘<samp>dia</samp>’.
3635 <dt> ‘<samp>hex (<em>hex</em>)</samp>’</dt>
3636 <dd><p>Hexagonal search with radius 2.
3638 <dt> ‘<samp>umh (<em>umh</em>)</samp>’</dt>
3639 <dd><p>Uneven multi-hexagon search.
3641 <dt> ‘<samp>esa (<em>esa</em>)</samp>’</dt>
3642 <dd><p>Exhaustive search.
3644 <dt> ‘<samp>tesa (<em>tesa</em>)</samp>’</dt>
3645 <dd><p>Hadamard exhaustive search (slowest).
3650 <dt> ‘<samp>subq (<em>subme</em>)</samp>’</dt>
3651 <dt> ‘<samp>b_strategy (<em>b-adapt</em>)</samp>’</dt>
3652 <dt> ‘<samp>keyint_min (<em>min-keyint</em>)</samp>’</dt>
3653 <dt> ‘<samp>coder</samp>’</dt>
3654 <dd><p>Set entropy encoder. Possible values:
3656 <dl compact="compact">
3657 <dt> ‘<samp>ac</samp>’</dt>
3658 <dd><p>Enable CABAC.
3661 <dt> ‘<samp>vlc</samp>’</dt>
3662 <dd><p>Enable CAVLC and disable CABAC. It generates the same effect as
3663 <code>x264</code>’s ‘<samp>--no-cabac</samp>’ option.
3668 <dt> ‘<samp>cmp</samp>’</dt>
3669 <dd><p>Set full pixel motion estimation comparation algorithm. Possible values:
3671 <dl compact="compact">
3672 <dt> ‘<samp>chroma</samp>’</dt>
3673 <dd><p>Enable chroma in motion estimation.
3676 <dt> ‘<samp>sad</samp>’</dt>
3677 <dd><p>Ignore chroma in motion estimation. It generates the same effect as
3678 <code>x264</code>’s ‘<samp>--no-chroma-me</samp>’ option.
3683 <dt> ‘<samp>threads (<em>threads</em>)</samp>’</dt>
3684 <dt> ‘<samp>thread_type</samp>’</dt>
3685 <dd><p>Set multithreading technique. Possible values:
3687 <dl compact="compact">
3688 <dt> ‘<samp>slice</samp>’</dt>
3689 <dd><p>Slice-based multithreading. It generates the same effect as
3690 <code>x264</code>’s ‘<samp>--sliced-threads</samp>’ option.
3692 <dt> ‘<samp>frame</samp>’</dt>
3693 <dd><p>Frame-based multithreading.
3698 <dt> ‘<samp>flags</samp>’</dt>
3699 <dd><p>Set encoding flags. It can be used to disable closed GOP and enable
3700 open GOP by setting it to <code>-cgop</code>. The result is similar to
3701 the behavior of <code>x264</code>’s ‘<samp>--open-gop</samp>’ option.
3704 <dt> ‘<samp>rc_init_occupancy (<em>vbv-init</em>)</samp>’</dt>
3705 <dt> ‘<samp>preset (<em>preset</em>)</samp>’</dt>
3706 <dd><p>Set the encoding preset.
3709 <dt> ‘<samp>tune (<em>tune</em>)</samp>’</dt>
3710 <dd><p>Set tuning of the encoding params.
3713 <dt> ‘<samp>profile (<em>profile</em>)</samp>’</dt>
3714 <dd><p>Set profile restrictions.
3717 <dt> ‘<samp>fastfirstpass</samp>’</dt>
3718 <dd><p>Enable fast settings when encoding first pass, when set to 1. When set
3719 to 0, it has the same effect of <code>x264</code>’s
3720 ‘<samp>--slow-firstpass</samp>’ option.
3723 <dt> ‘<samp>crf (<em>crf</em>)</samp>’</dt>
3724 <dd><p>Set the quality for constant quality mode.
3727 <dt> ‘<samp>crf_max (<em>crf-max</em>)</samp>’</dt>
3728 <dd><p>In CRF mode, prevents VBV from lowering quality beyond this point.
3731 <dt> ‘<samp>qp (<em>qp</em>)</samp>’</dt>
3732 <dd><p>Set constant quantization rate control method parameter.
3735 <dt> ‘<samp>aq-mode (<em>aq-mode</em>)</samp>’</dt>
3736 <dd><p>Set AQ method. Possible values:
3738 <dl compact="compact">
3739 <dt> ‘<samp>none (<em>0</em>)</samp>’</dt>
3743 <dt> ‘<samp>variance (<em>1</em>)</samp>’</dt>
3744 <dd><p>Variance AQ (complexity mask).
3747 <dt> ‘<samp>autovariance (<em>2</em>)</samp>’</dt>
3748 <dd><p>Auto-variance AQ (experimental).
3753 <dt> ‘<samp>aq-strength (<em>aq-strength</em>)</samp>’</dt>
3754 <dd><p>Set AQ strength, reduce blocking and blurring in flat and textured areas.
3757 <dt> ‘<samp>psy</samp>’</dt>
3758 <dd><p>Use psychovisual optimizations when set to 1. When set to 0, it has the
3759 same effect as <code>x264</code>’s ‘<samp>--no-psy</samp>’ option.
3762 <dt> ‘<samp>psy-rd (<em>psy-rd</em>)</samp>’</dt>
3763 <dd><p>Set strength of psychovisual optimization, in
3764 <var>psy-rd</var>:<var>psy-trellis</var> format.
3767 <dt> ‘<samp>rc-lookahead (<em>rc-lookahead</em>)</samp>’</dt>
3768 <dd><p>Set number of frames to look ahead for frametype and ratecontrol.
3771 <dt> ‘<samp>weightb</samp>’</dt>
3772 <dd><p>Enable weighted prediction for B-frames when set to 1. When set to 0,
3773 it has the same effect as <code>x264</code>’s ‘<samp>--no-weightb</samp>’ option.
3776 <dt> ‘<samp>weightp (<em>weightp</em>)</samp>’</dt>
3777 <dd><p>Set weighted prediction method for P-frames. Possible values:
3779 <dl compact="compact">
3780 <dt> ‘<samp>none (<em>0</em>)</samp>’</dt>
3783 <dt> ‘<samp>simple (<em>1</em>)</samp>’</dt>
3784 <dd><p>Enable only weighted refs
3786 <dt> ‘<samp>smart (<em>2</em>)</samp>’</dt>
3787 <dd><p>Enable both weighted refs and duplicates
3792 <dt> ‘<samp>ssim (<em>ssim</em>)</samp>’</dt>
3793 <dd><p>Enable calculation and printing SSIM stats after the encoding.
3796 <dt> ‘<samp>intra-refresh (<em>intra-refresh</em>)</samp>’</dt>
3797 <dd><p>Enable the use of Periodic Intra Refresh instead of IDR frames when set
3801 <dt> ‘<samp>bluray-compat (<em>bluray-compat</em>)</samp>’</dt>
3802 <dd><p>Configure the encoder to be compatible with the bluray standard.
3803 It is a shorthand for setting "bluray-compat=1 force-cfr=1".
3806 <dt> ‘<samp>b-bias (<em>b-bias</em>)</samp>’</dt>
3807 <dd><p>Set the influence on how often B-frames are used.
3810 <dt> ‘<samp>b-pyramid (<em>b-pyramid</em>)</samp>’</dt>
3811 <dd><p>Set method for keeping of some B-frames as references. Possible values:
3813 <dl compact="compact">
3814 <dt> ‘<samp>none (<em>none</em>)</samp>’</dt>
3817 <dt> ‘<samp>strict (<em>strict</em>)</samp>’</dt>
3818 <dd><p>Strictly hierarchical pyramid.
3820 <dt> ‘<samp>normal (<em>normal</em>)</samp>’</dt>
3821 <dd><p>Non-strict (not Blu-ray compatible).
3826 <dt> ‘<samp>mixed-refs</samp>’</dt>
3827 <dd><p>Enable the use of one reference per partition, as opposed to one
3828 reference per macroblock when set to 1. When set to 0, it has the
3829 same effect as <code>x264</code>’s ‘<samp>--no-mixed-refs</samp>’ option.
3832 <dt> ‘<samp>8x8dct</samp>’</dt>
3833 <dd><p>Enable adaptive spatial transform (high profile 8x8 transform)
3834 when set to 1. When set to 0, it has the same effect as
3835 <code>x264</code>’s ‘<samp>--no-8x8dct</samp>’ option.
3838 <dt> ‘<samp>fast-pskip</samp>’</dt>
3839 <dd><p>Enable early SKIP detection on P-frames when set to 1. When set
3840 to 0, it has the same effect as <code>x264</code>’s
3841 ‘<samp>--no-fast-pskip</samp>’ option.
3844 <dt> ‘<samp>aud (<em>aud</em>)</samp>’</dt>
3845 <dd><p>Enable use of access unit delimiters when set to 1.
3848 <dt> ‘<samp>mbtree</samp>’</dt>
3849 <dd><p>Enable use macroblock tree ratecontrol when set to 1. When set
3850 to 0, it has the same effect as <code>x264</code>’s
3851 ‘<samp>--no-mbtree</samp>’ option.
3854 <dt> ‘<samp>deblock (<em>deblock</em>)</samp>’</dt>
3855 <dd><p>Set loop filter parameters, in <var>alpha</var>:<var>beta</var> form.
3858 <dt> ‘<samp>cplxblur (<em>cplxblur</em>)</samp>’</dt>
3859 <dd><p>Set fluctuations reduction in QP (before curve compression).
3862 <dt> ‘<samp>partitions (<em>partitions</em>)</samp>’</dt>
3863 <dd><p>Set partitions to consider as a comma-separated list of. Possible
3866 <dl compact="compact">
3867 <dt> ‘<samp>p8x8</samp>’</dt>
3868 <dd><p>8x8 P-frame partition.
3870 <dt> ‘<samp>p4x4</samp>’</dt>
3871 <dd><p>4x4 P-frame partition.
3873 <dt> ‘<samp>b8x8</samp>’</dt>
3874 <dd><p>4x4 B-frame partition.
3876 <dt> ‘<samp>i8x8</samp>’</dt>
3877 <dd><p>8x8 I-frame partition.
3879 <dt> ‘<samp>i4x4</samp>’</dt>
3880 <dd><p>4x4 I-frame partition.
3881 (Enabling ‘<samp>p4x4</samp>’ requires ‘<samp>p8x8</samp>’ to be enabled. Enabling
3882 ‘<samp>i8x8</samp>’ requires adaptive spatial transform (‘<samp>8x8dct</samp>’
3883 option) to be enabled.)
3885 <dt> ‘<samp>none (<em>none</em>)</samp>’</dt>
3886 <dd><p>Do not consider any partitions.
3888 <dt> ‘<samp>all (<em>all</em>)</samp>’</dt>
3889 <dd><p>Consider every partition.
3894 <dt> ‘<samp>direct-pred (<em>direct</em>)</samp>’</dt>
3895 <dd><p>Set direct MV prediction mode. Possible values:
3897 <dl compact="compact">
3898 <dt> ‘<samp>none (<em>none</em>)</samp>’</dt>
3899 <dd><p>Disable MV prediction.
3901 <dt> ‘<samp>spatial (<em>spatial</em>)</samp>’</dt>
3902 <dd><p>Enable spatial predicting.
3904 <dt> ‘<samp>temporal (<em>temporal</em>)</samp>’</dt>
3905 <dd><p>Enable temporal predicting.
3907 <dt> ‘<samp>auto (<em>auto</em>)</samp>’</dt>
3908 <dd><p>Automatically decided.
3913 <dt> ‘<samp>slice-max-size (<em>slice-max-size</em>)</samp>’</dt>
3914 <dd><p>Set the limit of the size of each slice in bytes. If not specified
3915 but RTP payload size (‘<samp>ps</samp>’) is specified, that is used.
3918 <dt> ‘<samp>stats (<em>stats</em>)</samp>’</dt>
3919 <dd><p>Set the file name for multi-pass stats.
3922 <dt> ‘<samp>nal-hrd (<em>nal-hrd</em>)</samp>’</dt>
3923 <dd><p>Set signal HRD information (requires ‘<samp>vbv-bufsize</samp>’ to be set).
3926 <dl compact="compact">
3927 <dt> ‘<samp>none (<em>none</em>)</samp>’</dt>
3928 <dd><p>Disable HRD information signaling.
3930 <dt> ‘<samp>vbr (<em>vbr</em>)</samp>’</dt>
3931 <dd><p>Variable bit rate.
3933 <dt> ‘<samp>cbr (<em>cbr</em>)</samp>’</dt>
3934 <dd><p>Constant bit rate (not allowed in MP4 container).
3939 <dt> ‘<samp>x264opts (N.A.)</samp>’</dt>
3940 <dd><p>Set any x264 option, see <code>x264 --fullhelp</code> for a list.
3942 <p>Argument is a list of <var>key</var>=<var>value</var> couples separated by
3943 ":". In <var>filter</var> and <var>psy-rd</var> options that use ":" as a separator
3944 themselves, use "," instead. They accept it as well since long ago but this
3945 is kept undocumented for some reason.
3947 <p>For example to specify libx264 encoding options with <code>ffmpeg</code>:
3948 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
3949 </pre></td></tr></table>
3952 <dt> ‘<samp>x264-params (N.A.)</samp>’</dt>
3953 <dd><p>Override the x264 configuration using a :-separated list of key=value
3956 <p>This option is functionally the same as the ‘<samp>x264opts</samp>’, but is
3957 duplicated for compatibility with the Libav fork.
3959 <p>For example to specify libx264 encoding options with <code>ffmpeg</code>:
3960 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
3961 cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
3962 no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
3963 </pre></td></tr></table>
3967 <p>Encoding ffpresets for common usages are provided so they can be used with the
3968 general presets system (e.g. passing the ‘<samp>pre</samp>’ option).
3970 <a name="libxvid"></a>
3971 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libxvid">9.5 libxvid</a></h2>
3973 <p>Xvid MPEG-4 Part 2 encoder wrapper.
3975 <p>This encoder requires the presence of the libxvidcore headers and library
3976 during configuration. You need to explicitly configure the build with
3977 <code>--enable-libxvid --enable-gpl</code>.
3979 <p>The native <code>mpeg4</code> encoder supports the MPEG-4 Part 2 format, so
3980 users can encode to this format without this library.
3982 <a name="Options-9"></a>
3983 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-9">9.5.1 Options</a></h3>
3985 <p>The following options are supported by the libxvid wrapper. Some of
3986 the following options are listed but are not documented, and
3987 correspond to shared codec options. See <a href="#codec_002doptions">the Codec Options chapter</a> for their documentation. The other shared options
3988 which are not listed have no effect for the libxvid encoder.
3990 <dl compact="compact">
3991 <dt> ‘<samp>b</samp>’</dt>
3992 <dt> ‘<samp>g</samp>’</dt>
3993 <dt> ‘<samp>qmin</samp>’</dt>
3994 <dt> ‘<samp>qmax</samp>’</dt>
3995 <dt> ‘<samp>mpeg_quant</samp>’</dt>
3996 <dt> ‘<samp>threads</samp>’</dt>
3997 <dt> ‘<samp>bf</samp>’</dt>
3998 <dt> ‘<samp>b_qfactor</samp>’</dt>
3999 <dt> ‘<samp>b_qoffset</samp>’</dt>
4000 <dt> ‘<samp>flags</samp>’</dt>
4001 <dd><p>Set specific encoding flags. Possible values:
4003 <dl compact="compact">
4004 <dt> ‘<samp>mv4</samp>’</dt>
4005 <dd><p>Use four motion vector by macroblock.
4008 <dt> ‘<samp>aic</samp>’</dt>
4009 <dd><p>Enable high quality AC prediction.
4012 <dt> ‘<samp>gray</samp>’</dt>
4013 <dd><p>Only encode grayscale.
4016 <dt> ‘<samp>gmc</samp>’</dt>
4017 <dd><p>Enable the use of global motion compensation (GMC).
4020 <dt> ‘<samp>qpel</samp>’</dt>
4021 <dd><p>Enable quarter-pixel motion compensation.
4024 <dt> ‘<samp>cgop</samp>’</dt>
4025 <dd><p>Enable closed GOP.
4028 <dt> ‘<samp>global_header</samp>’</dt>
4029 <dd><p>Place global headers in extradata instead of every keyframe.
4035 <dt> ‘<samp>trellis</samp>’</dt>
4036 <dt> ‘<samp>me_method</samp>’</dt>
4037 <dd><p>Set motion estimation method. Possible values in decreasing order of
4038 speed and increasing order of quality:
4040 <dl compact="compact">
4041 <dt> ‘<samp>zero</samp>’</dt>
4042 <dd><p>Use no motion estimation (default).
4045 <dt> ‘<samp>phods</samp>’</dt>
4046 <dt> ‘<samp>x1</samp>’</dt>
4047 <dt> ‘<samp>log</samp>’</dt>
4048 <dd><p>Enable advanced diamond zonal search for 16x16 blocks and half-pixel
4049 refinement for 16x16 blocks. ‘<samp>x1</samp>’ and ‘<samp>log</samp>’ are aliases for
4050 ‘<samp>phods</samp>’.
4053 <dt> ‘<samp>epzs</samp>’</dt>
4054 <dd><p>Enable all of the things described above, plus advanced diamond zonal
4055 search for 8x8 blocks, half-pixel refinement for 8x8 blocks, and motion
4056 estimation on chroma planes.
4059 <dt> ‘<samp>full</samp>’</dt>
4060 <dd><p>Enable all of the things described above, plus extended 16x16 and 8x8
4066 <dt> ‘<samp>mbd</samp>’</dt>
4067 <dd><p>Set macroblock decision algorithm. Possible values in the increasing
4070 <dl compact="compact">
4071 <dt> ‘<samp>simple</samp>’</dt>
4072 <dd><p>Use macroblock comparing function algorithm (default).
4075 <dt> ‘<samp>bits</samp>’</dt>
4076 <dd><p>Enable rate distortion-based half pixel and quarter pixel refinement for
4080 <dt> ‘<samp>rd</samp>’</dt>
4081 <dd><p>Enable all of the things described above, plus rate distortion-based
4082 half pixel and quarter pixel refinement for 8x8 blocks, and rate
4083 distortion-based search using square pattern.
4088 <dt> ‘<samp>lumi_aq</samp>’</dt>
4089 <dd><p>Enable lumi masking adaptive quantization when set to 1. Default is 0
4093 <dt> ‘<samp>variance_aq</samp>’</dt>
4094 <dd><p>Enable variance adaptive quantization when set to 1. Default is 0
4097 <p>When combined with ‘<samp>lumi_aq</samp>’, the resulting quality will not
4098 be better than any of the two specified individually. In other
4099 words, the resulting quality will be the worse one of the two
4103 <dt> ‘<samp>ssim</samp>’</dt>
4104 <dd><p>Set structural similarity (SSIM) displaying method. Possible values:
4106 <dl compact="compact">
4107 <dt> ‘<samp>off</samp>’</dt>
4108 <dd><p>Disable displaying of SSIM information.
4111 <dt> ‘<samp>avg</samp>’</dt>
4112 <dd><p>Output average SSIM at the end of encoding to stdout. The format of
4113 showing the average SSIM is:
4115 <table><tr><td> </td><td><pre class="example">Average SSIM: %f
4116 </pre></td></tr></table>
4118 <p>For users who are not familiar with C, %f means a float number, or
4119 a decimal (e.g. 0.939232).
4122 <dt> ‘<samp>frame</samp>’</dt>
4123 <dd><p>Output both per-frame SSIM data during encoding and average SSIM at
4124 the end of encoding to stdout. The format of per-frame information
4127 <table><tr><td> </td><td><pre class="example"> SSIM: avg: %1.3f min: %1.3f max: %1.3f
4128 </pre></td></tr></table>
4130 <p>For users who are not familiar with C, %1.3f means a float number
4131 rounded to 3 digits after the dot (e.g. 0.932).
4137 <dt> ‘<samp>ssim_acc</samp>’</dt>
4138 <dd><p>Set SSIM accuracy. Valid options are integers within the range of
4139 0-4, while 0 gives the most accurate result and 4 computes the
4146 <h2 class="section"><a href="ffmpeg-codecs.html#toc-png">9.6 png</a></h2>
4148 <p>PNG image encoder.
4150 <a name="Private-options-1"></a>
4151 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Private-options-1">9.6.1 Private options</a></h3>
4153 <dl compact="compact">
4154 <dt> ‘<samp>dpi <var>integer</var></samp>’</dt>
4155 <dd><p>Set physical density of pixels, in dots per inch, unset by default
4157 <dt> ‘<samp>dpm <var>integer</var></samp>’</dt>
4158 <dd><p>Set physical density of pixels, in dots per meter, unset by default
4162 <a name="ProRes"></a>
4163 <h2 class="section"><a href="ffmpeg-codecs.html#toc-ProRes">9.7 ProRes</a></h2>
4165 <p>Apple ProRes encoder.
4167 <p>FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
4168 The used encoder can be chosen with the <code>-vcodec</code> option.
4170 <a name="Private-Options-for-prores_002dks"></a>
4171 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Private-Options-for-prores_002dks">9.7.1 Private Options for prores-ks</a></h3>
4173 <dl compact="compact">
4174 <dt> ‘<samp>profile <var>integer</var></samp>’</dt>
4175 <dd><p>Select the ProRes profile to encode
4176 </p><dl compact="compact">
4177 <dt> ‘<samp>proxy</samp>’</dt>
4178 <dt> ‘<samp>lt</samp>’</dt>
4179 <dt> ‘<samp>standard</samp>’</dt>
4180 <dt> ‘<samp>hq</samp>’</dt>
4181 <dt> ‘<samp>4444</samp>’</dt>
4185 <dt> ‘<samp>quant_mat <var>integer</var></samp>’</dt>
4186 <dd><p>Select quantization matrix.
4187 </p><dl compact="compact">
4188 <dt> ‘<samp>auto</samp>’</dt>
4189 <dt> ‘<samp>default</samp>’</dt>
4190 <dt> ‘<samp>proxy</samp>’</dt>
4191 <dt> ‘<samp>lt</samp>’</dt>
4192 <dt> ‘<samp>standard</samp>’</dt>
4193 <dt> ‘<samp>hq</samp>’</dt>
4195 <p>If set to <var>auto</var>, the matrix matching the profile will be picked.
4196 If not set, the matrix providing the highest quality, <var>default</var>, will be
4200 <dt> ‘<samp>bits_per_mb <var>integer</var></samp>’</dt>
4201 <dd><p>How many bits to allot for coding one macroblock. Different profiles use
4202 between 200 and 2400 bits per macroblock, the maximum is 8000.
4205 <dt> ‘<samp>mbs_per_slice <var>integer</var></samp>’</dt>
4206 <dd><p>Number of macroblocks in each slice (1-8); the default value (8)
4207 should be good in almost all situations.
4210 <dt> ‘<samp>vendor <var>string</var></samp>’</dt>
4211 <dd><p>Override the 4-byte vendor ID.
4212 A custom vendor ID like <var>apl0</var> would claim the stream was produced by
4216 <dt> ‘<samp>alpha_bits <var>integer</var></samp>’</dt>
4217 <dd><p>Specify number of bits for alpha component.
4218 Possible values are <var>0</var>, <var>8</var> and <var>16</var>.
4219 Use <var>0</var> to disable alpha plane coding.
4224 <a name="Speed-considerations"></a>
4225 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Speed-considerations">9.7.2 Speed considerations</a></h3>
4227 <p>In the default mode of operation the encoder has to honor frame constraints
4228 (i.e. not produc frames with size bigger than requested) while still making
4229 output picture as good as possible.
4230 A frame containing a lot of small details is harder to compress and the encoder
4231 would spend more time searching for appropriate quantizers for each slice.
4233 <p>Setting a higher ‘<samp>bits_per_mb</samp>’ limit will improve the speed.
4235 <p>For the fastest encoding speed set the ‘<samp>qscale</samp>’ parameter (4 is the
4236 recommended value) and do not set a size constraint.
4239 <a name="See-Also"></a>
4240 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-See-Also">10. See Also</a></h1>
4242 <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>,
4243 <a href="libavcodec.html">libavcodec</a>
4246 <a name="Authors"></a>
4247 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Authors">11. Authors</a></h1>
4249 <p>The FFmpeg developers.
4251 <p>For details about the authorship, see the Git history of the project
4252 (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
4253 <code>git log</code> in the FFmpeg source directory, or browsing the
4254 online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>.
4256 <p>Maintainers for the specific components are listed in the file
4257 ‘<tt>MAINTAINERS</tt>’ in the source code tree.
4260 <footer class="footer pagination-right">
4261 <span class="label label-info">This document was generated by <em>Kyle Schwarz</em> on <em>June 19, 2014</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.</span></footer></div></div></body>