]> git.sesse.net Git - casparcg/blob - dependencies/ffmpeg/doc/ffmpeg-codecs.html
a6d724c7c92bcd08678b1eac4648620cf48ce66f
[casparcg] / dependencies / ffmpeg / doc / ffmpeg-codecs.html
1 <!DOCTYPE html>
2 <html>
3 <!-- Created on December 14, 2013 by texi2html 1.82 -->
4 <!--
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>
9             and many others.
10 Maintained by: Many creative people.
11 Send bugs and suggestions to <texi2html-bug@nongnu.org>
12
13 -->
14 <head>
15 <title>FFmpeg documentation : FFmpeg Codecs </title>
16
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" />
22
23 <link rel="icon" href="favicon.png" type="image/png" />
24 </head>
25 <body>
26 <div id="container">
27 <div id="body">
28
29 <a name="SEC_Top"></a>
30 <h1 class="settitle">FFmpeg Codecs Documentation</h1>
31
32 <a name="SEC_Contents"></a>
33 <h1>Table of Contents</h1>
34 <div class="contents">
35
36 <ul class="toc">
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>
41   <ul class="toc">
42     <li><a name="toc-rawvideo" href="#rawvideo">4.1 rawvideo</a>
43     <ul class="toc">
44       <li><a name="toc-Options-17" href="#Options-17">4.1.1 Options</a></li>
45     </ul>
46 </li>
47   </ul></li>
48   <li><a name="toc-Audio-Decoders" href="#Audio-Decoders">5. Audio Decoders</a>
49   <ul class="toc">
50     <li><a name="toc-ffwavesynth" href="#ffwavesynth">5.1 ffwavesynth</a></li>
51     <li><a name="toc-libcelt" href="#libcelt">5.2 libcelt</a></li>
52     <li><a name="toc-libgsm" href="#libgsm">5.3 libgsm</a></li>
53     <li><a name="toc-libilbc" href="#libilbc">5.4 libilbc</a>
54     <ul class="toc">
55       <li><a name="toc-Options-13" href="#Options-13">5.4.1 Options</a></li>
56     </ul></li>
57     <li><a name="toc-libopencore_002damrnb" href="#libopencore_002damrnb">5.5 libopencore-amrnb</a></li>
58     <li><a name="toc-libopencore_002damrwb" href="#libopencore_002damrwb">5.6 libopencore-amrwb</a></li>
59     <li><a name="toc-libopus" href="#libopus">5.7 libopus</a></li>
60   </ul></li>
61   <li><a name="toc-Subtitles-Decoders" href="#Subtitles-Decoders">6. Subtitles Decoders</a>
62   <ul class="toc">
63     <li><a name="toc-dvdsub" href="#dvdsub">6.1 dvdsub</a>
64     <ul class="toc">
65       <li><a name="toc-Options-7" href="#Options-7">6.1.1 Options</a></li>
66     </ul></li>
67     <li><a name="toc-libzvbi_002dteletext" href="#libzvbi_002dteletext">6.2 libzvbi-teletext</a>
68     <ul class="toc">
69       <li><a name="toc-Options-11" href="#Options-11">6.2.1 Options</a></li>
70     </ul>
71 </li>
72   </ul></li>
73   <li><a name="toc-Encoders" href="#Encoders">7. Encoders</a></li>
74   <li><a name="toc-Audio-Encoders" href="#Audio-Encoders">8. Audio Encoders</a>
75   <ul class="toc">
76     <li><a name="toc-aac" href="#aac">8.1 aac</a>
77     <ul class="toc">
78       <li><a name="toc-Options-8" href="#Options-8">8.1.1 Options</a></li>
79     </ul></li>
80     <li><a name="toc-ac3-and-ac3_005ffixed" href="#ac3-and-ac3_005ffixed">8.2 ac3 and ac3_fixed</a>
81     <ul class="toc">
82       <li><a name="toc-AC_002d3-Metadata" href="#AC_002d3-Metadata">8.2.1 AC-3 Metadata</a>
83       <ul class="toc">
84         <li><a name="toc-Metadata-Control-Options" href="#Metadata-Control-Options">8.2.1.1 Metadata Control Options</a></li>
85         <li><a name="toc-Downmix-Levels" href="#Downmix-Levels">8.2.1.2 Downmix Levels</a></li>
86         <li><a name="toc-Audio-Production-Information" href="#Audio-Production-Information">8.2.1.3 Audio Production Information</a></li>
87         <li><a name="toc-Other-Metadata-Options" href="#Other-Metadata-Options">8.2.1.4 Other Metadata Options</a></li>
88       </ul></li>
89       <li><a name="toc-Extended-Bitstream-Information" href="#Extended-Bitstream-Information">8.2.2 Extended Bitstream Information</a>
90       <ul class="toc">
91         <li><a name="toc-Extended-Bitstream-Information-_002d-Part-1" href="#Extended-Bitstream-Information-_002d-Part-1">8.2.2.1 Extended Bitstream Information - Part 1</a></li>
92         <li><a name="toc-Extended-Bitstream-Information-_002d-Part-2" href="#Extended-Bitstream-Information-_002d-Part-2">8.2.2.2 Extended Bitstream Information - Part 2</a></li>
93       </ul></li>
94       <li><a name="toc-Other-AC_002d3-Encoding-Options" href="#Other-AC_002d3-Encoding-Options">8.2.3 Other AC-3 Encoding Options</a></li>
95       <li><a name="toc-Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options" href="#Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options">8.2.4 Floating-Point-Only AC-3 Encoding Options</a></li>
96     </ul></li>
97     <li><a name="toc-libfaac-1" href="#libfaac-1">8.3 libfaac</a>
98     <ul class="toc">
99       <li><a name="toc-Options-10" href="#Options-10">8.3.1 Options</a></li>
100       <li><a name="toc-Examples-1" href="#Examples-1">8.3.2 Examples</a></li>
101     </ul></li>
102     <li><a name="toc-libfdk_005faac" href="#libfdk_005faac">8.4 libfdk_aac</a>
103     <ul class="toc">
104       <li><a name="toc-Options-5" href="#Options-5">8.4.1 Options</a></li>
105       <li><a name="toc-Examples-2" href="#Examples-2">8.4.2 Examples</a></li>
106     </ul></li>
107     <li><a name="toc-libmp3lame-1" href="#libmp3lame-1">8.5 libmp3lame</a>
108     <ul class="toc">
109       <li><a name="toc-Options-12" href="#Options-12">8.5.1 Options</a></li>
110     </ul></li>
111     <li><a name="toc-libopencore_002damrnb-1" href="#libopencore_002damrnb-1">8.6 libopencore-amrnb</a>
112     <ul class="toc">
113       <li><a name="toc-Options-9" href="#Options-9">8.6.1 Options</a></li>
114     </ul></li>
115     <li><a name="toc-libshine-1" href="#libshine-1">8.7 libshine</a>
116     <ul class="toc">
117       <li><a name="toc-Options" href="#Options">8.7.1 Options</a></li>
118     </ul></li>
119     <li><a name="toc-libtwolame" href="#libtwolame">8.8 libtwolame</a>
120     <ul class="toc">
121       <li><a name="toc-Options-1" href="#Options-1">8.8.1 Options</a></li>
122     </ul></li>
123     <li><a name="toc-libvo_002daacenc-1" href="#libvo_002daacenc-1">8.9 libvo-aacenc</a>
124     <ul class="toc">
125       <li><a name="toc-Options-4" href="#Options-4">8.9.1 Options</a></li>
126     </ul></li>
127     <li><a name="toc-libvo_002damrwbenc" href="#libvo_002damrwbenc">8.10 libvo-amrwbenc</a>
128     <ul class="toc">
129       <li><a name="toc-Options-15" href="#Options-15">8.10.1 Options</a></li>
130     </ul></li>
131     <li><a name="toc-libopus-1" href="#libopus-1">8.11 libopus</a>
132     <ul class="toc">
133       <li><a name="toc-Option-Mapping" href="#Option-Mapping">8.11.1 Option Mapping</a></li>
134     </ul></li>
135     <li><a name="toc-libvorbis" href="#libvorbis">8.12 libvorbis</a>
136     <ul class="toc">
137       <li><a name="toc-Options-16" href="#Options-16">8.12.1 Options</a></li>
138     </ul></li>
139     <li><a name="toc-libwavpack" href="#libwavpack">8.13 libwavpack</a></li>
140   </ul></li>
141   <li><a name="toc-Video-Encoders" href="#Video-Encoders">9. Video Encoders</a>
142   <ul class="toc">
143     <li><a name="toc-libtheora" href="#libtheora">9.1 libtheora</a>
144     <ul class="toc">
145       <li><a name="toc-Options-14" href="#Options-14">9.1.1 Options</a></li>
146       <li><a name="toc-Examples" href="#Examples">9.1.2 Examples</a></li>
147     </ul></li>
148     <li><a name="toc-libvpx" href="#libvpx">9.2 libvpx</a>
149     <ul class="toc">
150       <li><a name="toc-Options-3" href="#Options-3">9.2.1 Options</a></li>
151     </ul></li>
152     <li><a name="toc-libx264" href="#libx264">9.3 libx264</a>
153     <ul class="toc">
154       <li><a name="toc-Options-6" href="#Options-6">9.3.1 Options</a></li>
155     </ul></li>
156     <li><a name="toc-libxvid" href="#libxvid">9.4 libxvid</a>
157     <ul class="toc">
158       <li><a name="toc-Options-2" href="#Options-2">9.4.1 Options</a></li>
159     </ul></li>
160     <li><a name="toc-png" href="#png">9.5 png</a>
161     <ul class="toc">
162       <li><a name="toc-Private-options" href="#Private-options">9.5.1 Private options</a></li>
163     </ul></li>
164     <li><a name="toc-ProRes" href="#ProRes">9.6 ProRes</a>
165     <ul class="toc">
166       <li><a name="toc-Private-Options-for-prores_002dks" href="#Private-Options-for-prores_002dks">9.6.1 Private Options for prores-ks</a></li>
167       <li><a name="toc-Speed-considerations" href="#Speed-considerations">9.6.2 Speed considerations</a></li>
168     </ul>
169 </li>
170   </ul></li>
171   <li><a name="toc-See-Also" href="#See-Also">10. See Also</a></li>
172   <li><a name="toc-Authors" href="#Authors">11. Authors</a></li>
173 </ul>
174 </div>
175
176 <a name="Description"></a>
177 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Description">1. Description</a></h1>
178
179 <p>This document describes the codecs (decoders and encoders) provided by
180 the libavcodec library.
181 </p>
182
183 <p><a name="codec_002doptions"></a>
184 </p><a name="Codec-Options"></a>
185 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Codec-Options">2. Codec Options</a></h1>
186
187 <p>libavcodec provides some generic global options, which can be set on
188 all the encoders and decoders. In addition each codec may support
189 so-called private options, which are specific for a given codec.
190 </p>
191 <p>Sometimes, a global option may only affect a specific kind of codec,
192 and may be unsensical or ignored by another, so you need to be aware
193 of the meaning of the specified options. Also some options are
194 meant only for decoding or encoding.
195 </p>
196 <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
197 FFmpeg tools, or by setting the value explicitly in the
198 <code>AVCodecContext</code> options or using the &lsquo;<tt>libavutil/opt.h</tt>&rsquo; API
199 for programmatic use.
200 </p>
201 <p>The list of supported options follow:
202 </p>
203 <dl compact="compact">
204 <dt> &lsquo;<samp>b <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
205 <dd><p>Set bitrate in bits/s. Default value is 200K.
206 </p>
207 </dd>
208 <dt> &lsquo;<samp>ab <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
209 <dd><p>Set audio bitrate (in bits/s). Default value is 128K.
210 </p>
211 </dd>
212 <dt> &lsquo;<samp>bt <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
213 <dd><p>Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate
214 tolerance specifies how far ratecontrol is willing to deviate from the
215 target average bitrate value. This is not related to min/max
216 bitrate. Lowering tolerance too much has an adverse effect on quality.
217 </p>
218 </dd>
219 <dt> &lsquo;<samp>flags <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp>&rsquo;</dt>
220 <dd><p>Set generic flags.
221 </p>
222 <p>Possible values:
223 </p><dl compact="compact">
224 <dt> &lsquo;<samp>mv4</samp>&rsquo;</dt>
225 <dd><p>Use four motion vector by macroblock (mpeg4).
226 </p></dd>
227 <dt> &lsquo;<samp>qpel</samp>&rsquo;</dt>
228 <dd><p>Use 1/4 pel motion compensation.
229 </p></dd>
230 <dt> &lsquo;<samp>loop</samp>&rsquo;</dt>
231 <dd><p>Use loop filter.
232 </p></dd>
233 <dt> &lsquo;<samp>qscale</samp>&rsquo;</dt>
234 <dd><p>Use fixed qscale.
235 </p></dd>
236 <dt> &lsquo;<samp>gmc</samp>&rsquo;</dt>
237 <dd><p>Use gmc.
238 </p></dd>
239 <dt> &lsquo;<samp>mv0</samp>&rsquo;</dt>
240 <dd><p>Always try a mb with mv=&lt;0,0&gt;.
241 </p></dd>
242 <dt> &lsquo;<samp>input_preserved</samp>&rsquo;</dt>
243 <dt> &lsquo;<samp>pass1</samp>&rsquo;</dt>
244 <dd><p>Use internal 2pass ratecontrol in first pass mode.
245 </p></dd>
246 <dt> &lsquo;<samp>pass2</samp>&rsquo;</dt>
247 <dd><p>Use internal 2pass ratecontrol in second pass mode.
248 </p></dd>
249 <dt> &lsquo;<samp>gray</samp>&rsquo;</dt>
250 <dd><p>Only decode/encode grayscale.
251 </p></dd>
252 <dt> &lsquo;<samp>emu_edge</samp>&rsquo;</dt>
253 <dd><p>Do not draw edges.
254 </p></dd>
255 <dt> &lsquo;<samp>psnr</samp>&rsquo;</dt>
256 <dd><p>Set error[?] variables during encoding.
257 </p></dd>
258 <dt> &lsquo;<samp>truncated</samp>&rsquo;</dt>
259 <dt> &lsquo;<samp>naq</samp>&rsquo;</dt>
260 <dd><p>Normalize adaptive quantization.
261 </p></dd>
262 <dt> &lsquo;<samp>ildct</samp>&rsquo;</dt>
263 <dd><p>Use interlaced DCT.
264 </p></dd>
265 <dt> &lsquo;<samp>low_delay</samp>&rsquo;</dt>
266 <dd><p>Force low delay.
267 </p></dd>
268 <dt> &lsquo;<samp>global_header</samp>&rsquo;</dt>
269 <dd><p>Place global headers in extradata instead of every keyframe.
270 </p></dd>
271 <dt> &lsquo;<samp>bitexact</samp>&rsquo;</dt>
272 <dd><p>Use only bitexact stuff (except (I)DCT).
273 </p></dd>
274 <dt> &lsquo;<samp>aic</samp>&rsquo;</dt>
275 <dd><p>Apply H263 advanced intra coding / mpeg4 ac prediction.
276 </p></dd>
277 <dt> &lsquo;<samp>cbp</samp>&rsquo;</dt>
278 <dd><p>Deprecated, use mpegvideo private options instead.
279 </p></dd>
280 <dt> &lsquo;<samp>qprd</samp>&rsquo;</dt>
281 <dd><p>Deprecated, use mpegvideo private options instead.
282 </p></dd>
283 <dt> &lsquo;<samp>ilme</samp>&rsquo;</dt>
284 <dd><p>Apply interlaced motion estimation.
285 </p></dd>
286 <dt> &lsquo;<samp>cgop</samp>&rsquo;</dt>
287 <dd><p>Use closed gop.
288 </p></dd>
289 </dl>
290
291 </dd>
292 <dt> &lsquo;<samp>me_method <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
293 <dd><p>Set motion estimation method.
294 </p>
295 <p>Possible values:
296 </p><dl compact="compact">
297 <dt> &lsquo;<samp>zero</samp>&rsquo;</dt>
298 <dd><p>zero motion estimation (fastest)
299 </p></dd>
300 <dt> &lsquo;<samp>full</samp>&rsquo;</dt>
301 <dd><p>full motion estimation (slowest)
302 </p></dd>
303 <dt> &lsquo;<samp>epzs</samp>&rsquo;</dt>
304 <dd><p>EPZS motion estimation (default)
305 </p></dd>
306 <dt> &lsquo;<samp>esa</samp>&rsquo;</dt>
307 <dd><p>esa motion estimation (alias for full)
308 </p></dd>
309 <dt> &lsquo;<samp>tesa</samp>&rsquo;</dt>
310 <dd><p>tesa motion estimation
311 </p></dd>
312 <dt> &lsquo;<samp>dia</samp>&rsquo;</dt>
313 <dd><p>dia motion estimation (alias for epzs)
314 </p></dd>
315 <dt> &lsquo;<samp>log</samp>&rsquo;</dt>
316 <dd><p>log motion estimation
317 </p></dd>
318 <dt> &lsquo;<samp>phods</samp>&rsquo;</dt>
319 <dd><p>phods motion estimation
320 </p></dd>
321 <dt> &lsquo;<samp>x1</samp>&rsquo;</dt>
322 <dd><p>X1 motion estimation
323 </p></dd>
324 <dt> &lsquo;<samp>hex</samp>&rsquo;</dt>
325 <dd><p>hex motion estimation
326 </p></dd>
327 <dt> &lsquo;<samp>umh</samp>&rsquo;</dt>
328 <dd><p>umh motion estimation
329 </p></dd>
330 <dt> &lsquo;<samp>iter</samp>&rsquo;</dt>
331 <dd><p>iter motion estimation
332 </p></dd>
333 </dl>
334
335 </dd>
336 <dt> &lsquo;<samp>extradata_size <var>integer</var></samp>&rsquo;</dt>
337 <dd><p>Set extradata size.
338 </p>
339 </dd>
340 <dt> &lsquo;<samp>time_base <var>rational number</var></samp>&rsquo;</dt>
341 <dd><p>Set codec time base.
342 </p>
343 <p>It is the fundamental unit of time (in seconds) in terms of which
344 frame timestamps are represented. For fixed-fps content, timebase
345 should be <code>1 / frame_rate</code> and timestamp increments should be
346 identically 1.
347 </p>
348 </dd>
349 <dt> &lsquo;<samp>g <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
350 <dd><p>Set the group of picture size. Default value is 12.
351 </p>
352 </dd>
353 <dt> &lsquo;<samp>ar <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>&rsquo;</dt>
354 <dd><p>Set audio sampling rate (in Hz).
355 </p>
356 </dd>
357 <dt> &lsquo;<samp>ac <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>&rsquo;</dt>
358 <dd><p>Set number of audio channels.
359 </p>
360 </dd>
361 <dt> &lsquo;<samp>cutoff <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
362 <dd><p>Set cutoff bandwidth.
363 </p>
364 </dd>
365 <dt> &lsquo;<samp>frame_size <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
366 <dd><p>Set audio frame size.
367 </p>
368 <p>Each submitted frame except the last must contain exactly frame_size
369 samples per channel. May be 0 when the codec has
370 CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is not
371 restricted. It is set by some decoders to indicate constant frame
372 size.
373 </p>
374 </dd>
375 <dt> &lsquo;<samp>frame_number <var>integer</var></samp>&rsquo;</dt>
376 <dd><p>Set the frame number.
377 </p>
378 </dd>
379 <dt> &lsquo;<samp>delay <var>integer</var></samp>&rsquo;</dt>
380 <dt> &lsquo;<samp>qcomp <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
381 <dd><p>Set video quantizer scale compression (VBR). It is used as a constant
382 in the ratecontrol equation. Recommended range for default rc_eq:
383 0.0-1.0.
384 </p>
385 </dd>
386 <dt> &lsquo;<samp>qblur <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
387 <dd><p>Set video quantizer scale blur (VBR).
388 </p>
389 </dd>
390 <dt> &lsquo;<samp>qmin <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
391 <dd><p>Set min video quantizer scale (VBR). Must be included between -1 and
392 69, default value is 2.
393 </p>
394 </dd>
395 <dt> &lsquo;<samp>qmax <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
396 <dd><p>Set max video quantizer scale (VBR). Must be included between -1 and
397 1024, default value is 31.
398 </p>
399 </dd>
400 <dt> &lsquo;<samp>qdiff <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
401 <dd><p>Set max difference between the quantizer scale (VBR).
402 </p>
403 </dd>
404 <dt> &lsquo;<samp>bf <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
405 <dd><p>Set max number of B frames between non-B-frames.
406 </p>
407 <p>Must be an integer between -1 and 16. 0 means that B-frames are
408 disabled. If a value of -1 is used, it will choose an automatic value
409 depending on the encoder.
410 </p>
411 <p>Default value is 0.
412 </p>
413 </dd>
414 <dt> &lsquo;<samp>b_qfactor <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
415 <dd><p>Set qp factor between P and B frames.
416 </p>
417 </dd>
418 <dt> &lsquo;<samp>rc_strategy <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
419 <dd><p>Set ratecontrol method.
420 </p>
421 </dd>
422 <dt> &lsquo;<samp>b_strategy <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
423 <dd><p>Set strategy to choose between I/P/B-frames.
424 </p>
425 </dd>
426 <dt> &lsquo;<samp>ps <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
427 <dd><p>Set RTP payload size in bytes.
428 </p>
429 </dd>
430 <dt> &lsquo;<samp>mv_bits <var>integer</var></samp>&rsquo;</dt>
431 <dt> &lsquo;<samp>header_bits <var>integer</var></samp>&rsquo;</dt>
432 <dt> &lsquo;<samp>i_tex_bits <var>integer</var></samp>&rsquo;</dt>
433 <dt> &lsquo;<samp>p_tex_bits <var>integer</var></samp>&rsquo;</dt>
434 <dt> &lsquo;<samp>i_count <var>integer</var></samp>&rsquo;</dt>
435 <dt> &lsquo;<samp>p_count <var>integer</var></samp>&rsquo;</dt>
436 <dt> &lsquo;<samp>skip_count <var>integer</var></samp>&rsquo;</dt>
437 <dt> &lsquo;<samp>misc_bits <var>integer</var></samp>&rsquo;</dt>
438 <dt> &lsquo;<samp>frame_bits <var>integer</var></samp>&rsquo;</dt>
439 <dt> &lsquo;<samp>codec_tag <var>integer</var></samp>&rsquo;</dt>
440 <dt> &lsquo;<samp>bug <var>flags</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
441 <dd><p>Workaround not auto detected encoder bugs.
442 </p>
443 <p>Possible values:
444 </p><dl compact="compact">
445 <dt> &lsquo;<samp>autodetect</samp>&rsquo;</dt>
446 <dt> &lsquo;<samp>old_msmpeg4</samp>&rsquo;</dt>
447 <dd><p>some old lavc generated msmpeg4v3 files (no autodetection)
448 </p></dd>
449 <dt> &lsquo;<samp>xvid_ilace</samp>&rsquo;</dt>
450 <dd><p>Xvid interlacing bug (autodetected if fourcc==XVIX)
451 </p></dd>
452 <dt> &lsquo;<samp>ump4</samp>&rsquo;</dt>
453 <dd><p>(autodetected if fourcc==UMP4)
454 </p></dd>
455 <dt> &lsquo;<samp>no_padding</samp>&rsquo;</dt>
456 <dd><p>padding bug (autodetected)
457 </p></dd>
458 <dt> &lsquo;<samp>amv</samp>&rsquo;</dt>
459 <dt> &lsquo;<samp>ac_vlc</samp>&rsquo;</dt>
460 <dd><p>illegal vlc bug (autodetected per fourcc)
461 </p></dd>
462 <dt> &lsquo;<samp>qpel_chroma</samp>&rsquo;</dt>
463 <dt> &lsquo;<samp>std_qpel</samp>&rsquo;</dt>
464 <dd><p>old standard qpel (autodetected per fourcc/version)
465 </p></dd>
466 <dt> &lsquo;<samp>qpel_chroma2</samp>&rsquo;</dt>
467 <dt> &lsquo;<samp>direct_blocksize</samp>&rsquo;</dt>
468 <dd><p>direct-qpel-blocksize bug (autodetected per fourcc/version)
469 </p></dd>
470 <dt> &lsquo;<samp>edge</samp>&rsquo;</dt>
471 <dd><p>edge padding bug (autodetected per fourcc/version)
472 </p></dd>
473 <dt> &lsquo;<samp>hpel_chroma</samp>&rsquo;</dt>
474 <dt> &lsquo;<samp>dc_clip</samp>&rsquo;</dt>
475 <dt> &lsquo;<samp>ms</samp>&rsquo;</dt>
476 <dd><p>Workaround various bugs in microsoft broken decoders.
477 </p></dd>
478 <dt> &lsquo;<samp>trunc</samp>&rsquo;</dt>
479 <dd><p>trancated frames
480 </p></dd>
481 </dl>
482
483 </dd>
484 <dt> &lsquo;<samp>lelim <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
485 <dd><p>Set single coefficient elimination threshold for luminance (negative
486 values also consider DC coefficient).
487 </p>
488 </dd>
489 <dt> &lsquo;<samp>celim <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
490 <dd><p>Set single coefficient elimination threshold for chrominance (negative
491 values also consider dc coefficient)
492 </p>
493 </dd>
494 <dt> &lsquo;<samp>strict <var>integer</var> (<em>decoding/encoding,audio,video</em>)</samp>&rsquo;</dt>
495 <dd><p>Specify how strictly to follow the standards.
496 </p>
497 <p>Possible values:
498 </p><dl compact="compact">
499 <dt> &lsquo;<samp>very</samp>&rsquo;</dt>
500 <dd><p>strictly conform to a older more strict version of the spec or reference software
501 </p></dd>
502 <dt> &lsquo;<samp>strict</samp>&rsquo;</dt>
503 <dd><p>strictly conform to all the things in the spec no matter what consequences
504 </p></dd>
505 <dt> &lsquo;<samp>normal</samp>&rsquo;</dt>
506 <dt> &lsquo;<samp>unofficial</samp>&rsquo;</dt>
507 <dd><p>allow unofficial extensions
508 </p></dd>
509 <dt> &lsquo;<samp>experimental</samp>&rsquo;</dt>
510 <dd><p>allow non standardized experimental things, experimental
511 (unfinished/work in progress/not well tested) decoders and encoders.
512 Note: experimental decoders can pose a security risk, do not use this for
513 decoding untrusted input.
514 </p></dd>
515 </dl>
516
517 </dd>
518 <dt> &lsquo;<samp>b_qoffset <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
519 <dd><p>Set QP offset between P and B frames.
520 </p>
521 </dd>
522 <dt> &lsquo;<samp>err_detect <var>flags</var> (<em>decoding,audio,video</em>)</samp>&rsquo;</dt>
523 <dd><p>Set error detection flags.
524 </p>
525 <p>Possible values:
526 </p><dl compact="compact">
527 <dt> &lsquo;<samp>crccheck</samp>&rsquo;</dt>
528 <dd><p>verify embedded CRCs
529 </p></dd>
530 <dt> &lsquo;<samp>bitstream</samp>&rsquo;</dt>
531 <dd><p>detect bitstream specification deviations
532 </p></dd>
533 <dt> &lsquo;<samp>buffer</samp>&rsquo;</dt>
534 <dd><p>detect improper bitstream length
535 </p></dd>
536 <dt> &lsquo;<samp>explode</samp>&rsquo;</dt>
537 <dd><p>abort decoding on minor error detection
538 </p></dd>
539 <dt> &lsquo;<samp>careful</samp>&rsquo;</dt>
540 <dd><p>consider things that violate the spec and have not been seen in the wild as errors
541 </p></dd>
542 <dt> &lsquo;<samp>compliant</samp>&rsquo;</dt>
543 <dd><p>consider all spec non compliancies as errors
544 </p></dd>
545 <dt> &lsquo;<samp>aggressive</samp>&rsquo;</dt>
546 <dd><p>consider things that a sane encoder should not do as an error
547 </p></dd>
548 </dl>
549
550 </dd>
551 <dt> &lsquo;<samp>has_b_frames <var>integer</var></samp>&rsquo;</dt>
552 <dt> &lsquo;<samp>block_align <var>integer</var></samp>&rsquo;</dt>
553 <dt> &lsquo;<samp>mpeg_quant <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
554 <dd><p>Use MPEG quantizers instead of H.263.
555 </p>
556 </dd>
557 <dt> &lsquo;<samp>qsquish <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
558 <dd><p>How to keep quantizer between qmin and qmax (0 = clip, 1 = use
559 differentiable function).
560 </p>
561 </dd>
562 <dt> &lsquo;<samp>rc_qmod_amp <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
563 <dd><p>Set experimental quantizer modulation.
564 </p>
565 </dd>
566 <dt> &lsquo;<samp>rc_qmod_freq <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
567 <dd><p>Set experimental quantizer modulation.
568 </p>
569 </dd>
570 <dt> &lsquo;<samp>rc_override_count <var>integer</var></samp>&rsquo;</dt>
571 <dt> &lsquo;<samp>rc_eq <var>string</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
572 <dd><p>Set rate control equation. When computing the expression, besides the
573 standard functions defined in the section &rsquo;Expression Evaluation&rsquo;, the
574 following functions are available: bits2qp(bits), qp2bits(qp). Also
575 the following constants are available: iTex pTex tex mv fCode iCount
576 mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex
577 avgTex.
578 </p>
579 </dd>
580 <dt> &lsquo;<samp>maxrate <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
581 <dd><p>Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
582 </p>
583 </dd>
584 <dt> &lsquo;<samp>minrate <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
585 <dd><p>Set min bitrate tolerance (in bits/s). Most useful in setting up a CBR
586 encode. It is of little use elsewise.
587 </p>
588 </dd>
589 <dt> &lsquo;<samp>bufsize <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
590 <dd><p>Set ratecontrol buffer size (in bits).
591 </p>
592 </dd>
593 <dt> &lsquo;<samp>rc_buf_aggressivity <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
594 <dd><p>Currently useless.
595 </p>
596 </dd>
597 <dt> &lsquo;<samp>i_qfactor <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
598 <dd><p>Set QP factor between P and I frames.
599 </p>
600 </dd>
601 <dt> &lsquo;<samp>i_qoffset <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
602 <dd><p>Set QP offset between P and I frames.
603 </p>
604 </dd>
605 <dt> &lsquo;<samp>rc_init_cplx <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
606 <dd><p>Set initial complexity for 1-pass encoding.
607 </p>
608 </dd>
609 <dt> &lsquo;<samp>dct <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
610 <dd><p>Set DCT algorithm.
611 </p>
612 <p>Possible values:
613 </p><dl compact="compact">
614 <dt> &lsquo;<samp>auto</samp>&rsquo;</dt>
615 <dd><p>autoselect a good one (default)
616 </p></dd>
617 <dt> &lsquo;<samp>fastint</samp>&rsquo;</dt>
618 <dd><p>fast integer
619 </p></dd>
620 <dt> &lsquo;<samp>int</samp>&rsquo;</dt>
621 <dd><p>accurate integer
622 </p></dd>
623 <dt> &lsquo;<samp>mmx</samp>&rsquo;</dt>
624 <dt> &lsquo;<samp>altivec</samp>&rsquo;</dt>
625 <dt> &lsquo;<samp>faan</samp>&rsquo;</dt>
626 <dd><p>floating point AAN DCT
627 </p></dd>
628 </dl>
629
630 </dd>
631 <dt> &lsquo;<samp>lumi_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
632 <dd><p>Compress bright areas stronger than medium ones.
633 </p>
634 </dd>
635 <dt> &lsquo;<samp>tcplx_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
636 <dd><p>Set temporal complexity masking.
637 </p>
638 </dd>
639 <dt> &lsquo;<samp>scplx_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
640 <dd><p>Set spatial complexity masking.
641 </p>
642 </dd>
643 <dt> &lsquo;<samp>p_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
644 <dd><p>Set inter masking.
645 </p>
646 </dd>
647 <dt> &lsquo;<samp>dark_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
648 <dd><p>Compress dark areas stronger than medium ones.
649 </p>
650 </dd>
651 <dt> &lsquo;<samp>idct <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
652 <dd><p>Select IDCT implementation.
653 </p>
654 <p>Possible values:
655 </p><dl compact="compact">
656 <dt> &lsquo;<samp>auto</samp>&rsquo;</dt>
657 <dt> &lsquo;<samp>int</samp>&rsquo;</dt>
658 <dt> &lsquo;<samp>simple</samp>&rsquo;</dt>
659 <dt> &lsquo;<samp>simplemmx</samp>&rsquo;</dt>
660 <dt> &lsquo;<samp>arm</samp>&rsquo;</dt>
661 <dt> &lsquo;<samp>altivec</samp>&rsquo;</dt>
662 <dt> &lsquo;<samp>sh4</samp>&rsquo;</dt>
663 <dt> &lsquo;<samp>simplearm</samp>&rsquo;</dt>
664 <dt> &lsquo;<samp>simplearmv5te</samp>&rsquo;</dt>
665 <dt> &lsquo;<samp>simplearmv6</samp>&rsquo;</dt>
666 <dt> &lsquo;<samp>simpleneon</samp>&rsquo;</dt>
667 <dt> &lsquo;<samp>simplealpha</samp>&rsquo;</dt>
668 <dt> &lsquo;<samp>ipp</samp>&rsquo;</dt>
669 <dt> &lsquo;<samp>xvidmmx</samp>&rsquo;</dt>
670 <dt> &lsquo;<samp>faani</samp>&rsquo;</dt>
671 <dd><p>floating point AAN IDCT
672 </p></dd>
673 </dl>
674
675 </dd>
676 <dt> &lsquo;<samp>slice_count <var>integer</var></samp>&rsquo;</dt>
677 <dt> &lsquo;<samp>ec <var>flags</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
678 <dd><p>Set error concealment strategy.
679 </p>
680 <p>Possible values:
681 </p><dl compact="compact">
682 <dt> &lsquo;<samp>guess_mvs</samp>&rsquo;</dt>
683 <dd><p>iterative motion vector (MV) search (slow)
684 </p></dd>
685 <dt> &lsquo;<samp>deblock</samp>&rsquo;</dt>
686 <dd><p>use strong deblock filter for damaged MBs
687 </p></dd>
688 </dl>
689
690 </dd>
691 <dt> &lsquo;<samp>bits_per_coded_sample <var>integer</var></samp>&rsquo;</dt>
692 <dt> &lsquo;<samp>pred <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
693 <dd><p>Set prediction method.
694 </p>
695 <p>Possible values:
696 </p><dl compact="compact">
697 <dt> &lsquo;<samp>left</samp>&rsquo;</dt>
698 <dt> &lsquo;<samp>plane</samp>&rsquo;</dt>
699 <dt> &lsquo;<samp>median</samp>&rsquo;</dt>
700 </dl>
701
702 </dd>
703 <dt> &lsquo;<samp>aspect <var>rational number</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
704 <dd><p>Set sample aspect ratio.
705 </p>
706 </dd>
707 <dt> &lsquo;<samp>debug <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp>&rsquo;</dt>
708 <dd><p>Print specific debug info.
709 </p>
710 <p>Possible values:
711 </p><dl compact="compact">
712 <dt> &lsquo;<samp>pict</samp>&rsquo;</dt>
713 <dd><p>picture info
714 </p></dd>
715 <dt> &lsquo;<samp>rc</samp>&rsquo;</dt>
716 <dd><p>rate control
717 </p></dd>
718 <dt> &lsquo;<samp>bitstream</samp>&rsquo;</dt>
719 <dt> &lsquo;<samp>mb_type</samp>&rsquo;</dt>
720 <dd><p>macroblock (MB) type
721 </p></dd>
722 <dt> &lsquo;<samp>qp</samp>&rsquo;</dt>
723 <dd><p>per-block quantization parameter (QP)
724 </p></dd>
725 <dt> &lsquo;<samp>mv</samp>&rsquo;</dt>
726 <dd><p>motion vector
727 </p></dd>
728 <dt> &lsquo;<samp>dct_coeff</samp>&rsquo;</dt>
729 <dt> &lsquo;<samp>skip</samp>&rsquo;</dt>
730 <dt> &lsquo;<samp>startcode</samp>&rsquo;</dt>
731 <dt> &lsquo;<samp>pts</samp>&rsquo;</dt>
732 <dt> &lsquo;<samp>er</samp>&rsquo;</dt>
733 <dd><p>error recognition
734 </p></dd>
735 <dt> &lsquo;<samp>mmco</samp>&rsquo;</dt>
736 <dd><p>memory management control operations (H.264)
737 </p></dd>
738 <dt> &lsquo;<samp>bugs</samp>&rsquo;</dt>
739 <dt> &lsquo;<samp>vis_qp</samp>&rsquo;</dt>
740 <dd><p>visualize quantization parameter (QP), lower QP are tinted greener
741 </p></dd>
742 <dt> &lsquo;<samp>vis_mb_type</samp>&rsquo;</dt>
743 <dd><p>visualize block types
744 </p></dd>
745 <dt> &lsquo;<samp>buffers</samp>&rsquo;</dt>
746 <dd><p>picture buffer allocations
747 </p></dd>
748 <dt> &lsquo;<samp>thread_ops</samp>&rsquo;</dt>
749 <dd><p>threading operations
750 </p></dd>
751 </dl>
752
753 </dd>
754 <dt> &lsquo;<samp>vismv <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
755 <dd><p>Visualize motion vectors (MVs).
756 </p>
757 <p>Possible values:
758 </p><dl compact="compact">
759 <dt> &lsquo;<samp>pf</samp>&rsquo;</dt>
760 <dd><p>forward predicted MVs of P-frames
761 </p></dd>
762 <dt> &lsquo;<samp>bf</samp>&rsquo;</dt>
763 <dd><p>forward predicted MVs of B-frames
764 </p></dd>
765 <dt> &lsquo;<samp>bb</samp>&rsquo;</dt>
766 <dd><p>backward predicted MVs of B-frames
767 </p></dd>
768 </dl>
769
770 </dd>
771 <dt> &lsquo;<samp>cmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
772 <dd><p>Set full pel me compare function.
773 </p>
774 <p>Possible values:
775 </p><dl compact="compact">
776 <dt> &lsquo;<samp>sad</samp>&rsquo;</dt>
777 <dd><p>sum of absolute differences, fast (default)
778 </p></dd>
779 <dt> &lsquo;<samp>sse</samp>&rsquo;</dt>
780 <dd><p>sum of squared errors
781 </p></dd>
782 <dt> &lsquo;<samp>satd</samp>&rsquo;</dt>
783 <dd><p>sum of absolute Hadamard transformed differences
784 </p></dd>
785 <dt> &lsquo;<samp>dct</samp>&rsquo;</dt>
786 <dd><p>sum of absolute DCT transformed differences
787 </p></dd>
788 <dt> &lsquo;<samp>psnr</samp>&rsquo;</dt>
789 <dd><p>sum of squared quantization errors (avoid, low quality)
790 </p></dd>
791 <dt> &lsquo;<samp>bit</samp>&rsquo;</dt>
792 <dd><p>number of bits needed for the block
793 </p></dd>
794 <dt> &lsquo;<samp>rd</samp>&rsquo;</dt>
795 <dd><p>rate distortion optimal, slow
796 </p></dd>
797 <dt> &lsquo;<samp>zero</samp>&rsquo;</dt>
798 <dd><p>0
799 </p></dd>
800 <dt> &lsquo;<samp>vsad</samp>&rsquo;</dt>
801 <dd><p>sum of absolute vertical differences
802 </p></dd>
803 <dt> &lsquo;<samp>vsse</samp>&rsquo;</dt>
804 <dd><p>sum of squared vertical differences
805 </p></dd>
806 <dt> &lsquo;<samp>nsse</samp>&rsquo;</dt>
807 <dd><p>noise preserving sum of squared differences
808 </p></dd>
809 <dt> &lsquo;<samp>w53</samp>&rsquo;</dt>
810 <dd><p>5/3 wavelet, only used in snow
811 </p></dd>
812 <dt> &lsquo;<samp>w97</samp>&rsquo;</dt>
813 <dd><p>9/7 wavelet, only used in snow
814 </p></dd>
815 <dt> &lsquo;<samp>dctmax</samp>&rsquo;</dt>
816 <dt> &lsquo;<samp>chroma</samp>&rsquo;</dt>
817 </dl>
818
819 </dd>
820 <dt> &lsquo;<samp>subcmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
821 <dd><p>Set sub pel me compare function.
822 </p>
823 <p>Possible values:
824 </p><dl compact="compact">
825 <dt> &lsquo;<samp>sad</samp>&rsquo;</dt>
826 <dd><p>sum of absolute differences, fast (default)
827 </p></dd>
828 <dt> &lsquo;<samp>sse</samp>&rsquo;</dt>
829 <dd><p>sum of squared errors
830 </p></dd>
831 <dt> &lsquo;<samp>satd</samp>&rsquo;</dt>
832 <dd><p>sum of absolute Hadamard transformed differences
833 </p></dd>
834 <dt> &lsquo;<samp>dct</samp>&rsquo;</dt>
835 <dd><p>sum of absolute DCT transformed differences
836 </p></dd>
837 <dt> &lsquo;<samp>psnr</samp>&rsquo;</dt>
838 <dd><p>sum of squared quantization errors (avoid, low quality)
839 </p></dd>
840 <dt> &lsquo;<samp>bit</samp>&rsquo;</dt>
841 <dd><p>number of bits needed for the block
842 </p></dd>
843 <dt> &lsquo;<samp>rd</samp>&rsquo;</dt>
844 <dd><p>rate distortion optimal, slow
845 </p></dd>
846 <dt> &lsquo;<samp>zero</samp>&rsquo;</dt>
847 <dd><p>0
848 </p></dd>
849 <dt> &lsquo;<samp>vsad</samp>&rsquo;</dt>
850 <dd><p>sum of absolute vertical differences
851 </p></dd>
852 <dt> &lsquo;<samp>vsse</samp>&rsquo;</dt>
853 <dd><p>sum of squared vertical differences
854 </p></dd>
855 <dt> &lsquo;<samp>nsse</samp>&rsquo;</dt>
856 <dd><p>noise preserving sum of squared differences
857 </p></dd>
858 <dt> &lsquo;<samp>w53</samp>&rsquo;</dt>
859 <dd><p>5/3 wavelet, only used in snow
860 </p></dd>
861 <dt> &lsquo;<samp>w97</samp>&rsquo;</dt>
862 <dd><p>9/7 wavelet, only used in snow
863 </p></dd>
864 <dt> &lsquo;<samp>dctmax</samp>&rsquo;</dt>
865 <dt> &lsquo;<samp>chroma</samp>&rsquo;</dt>
866 </dl>
867
868 </dd>
869 <dt> &lsquo;<samp>mbcmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
870 <dd><p>Set macroblock compare function.
871 </p>
872 <p>Possible values:
873 </p><dl compact="compact">
874 <dt> &lsquo;<samp>sad</samp>&rsquo;</dt>
875 <dd><p>sum of absolute differences, fast (default)
876 </p></dd>
877 <dt> &lsquo;<samp>sse</samp>&rsquo;</dt>
878 <dd><p>sum of squared errors
879 </p></dd>
880 <dt> &lsquo;<samp>satd</samp>&rsquo;</dt>
881 <dd><p>sum of absolute Hadamard transformed differences
882 </p></dd>
883 <dt> &lsquo;<samp>dct</samp>&rsquo;</dt>
884 <dd><p>sum of absolute DCT transformed differences
885 </p></dd>
886 <dt> &lsquo;<samp>psnr</samp>&rsquo;</dt>
887 <dd><p>sum of squared quantization errors (avoid, low quality)
888 </p></dd>
889 <dt> &lsquo;<samp>bit</samp>&rsquo;</dt>
890 <dd><p>number of bits needed for the block
891 </p></dd>
892 <dt> &lsquo;<samp>rd</samp>&rsquo;</dt>
893 <dd><p>rate distortion optimal, slow
894 </p></dd>
895 <dt> &lsquo;<samp>zero</samp>&rsquo;</dt>
896 <dd><p>0
897 </p></dd>
898 <dt> &lsquo;<samp>vsad</samp>&rsquo;</dt>
899 <dd><p>sum of absolute vertical differences
900 </p></dd>
901 <dt> &lsquo;<samp>vsse</samp>&rsquo;</dt>
902 <dd><p>sum of squared vertical differences
903 </p></dd>
904 <dt> &lsquo;<samp>nsse</samp>&rsquo;</dt>
905 <dd><p>noise preserving sum of squared differences
906 </p></dd>
907 <dt> &lsquo;<samp>w53</samp>&rsquo;</dt>
908 <dd><p>5/3 wavelet, only used in snow
909 </p></dd>
910 <dt> &lsquo;<samp>w97</samp>&rsquo;</dt>
911 <dd><p>9/7 wavelet, only used in snow
912 </p></dd>
913 <dt> &lsquo;<samp>dctmax</samp>&rsquo;</dt>
914 <dt> &lsquo;<samp>chroma</samp>&rsquo;</dt>
915 </dl>
916
917 </dd>
918 <dt> &lsquo;<samp>ildctcmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
919 <dd><p>Set interlaced dct compare function.
920 </p>
921 <p>Possible values:
922 </p><dl compact="compact">
923 <dt> &lsquo;<samp>sad</samp>&rsquo;</dt>
924 <dd><p>sum of absolute differences, fast (default)
925 </p></dd>
926 <dt> &lsquo;<samp>sse</samp>&rsquo;</dt>
927 <dd><p>sum of squared errors
928 </p></dd>
929 <dt> &lsquo;<samp>satd</samp>&rsquo;</dt>
930 <dd><p>sum of absolute Hadamard transformed differences
931 </p></dd>
932 <dt> &lsquo;<samp>dct</samp>&rsquo;</dt>
933 <dd><p>sum of absolute DCT transformed differences
934 </p></dd>
935 <dt> &lsquo;<samp>psnr</samp>&rsquo;</dt>
936 <dd><p>sum of squared quantization errors (avoid, low quality)
937 </p></dd>
938 <dt> &lsquo;<samp>bit</samp>&rsquo;</dt>
939 <dd><p>number of bits needed for the block
940 </p></dd>
941 <dt> &lsquo;<samp>rd</samp>&rsquo;</dt>
942 <dd><p>rate distortion optimal, slow
943 </p></dd>
944 <dt> &lsquo;<samp>zero</samp>&rsquo;</dt>
945 <dd><p>0
946 </p></dd>
947 <dt> &lsquo;<samp>vsad</samp>&rsquo;</dt>
948 <dd><p>sum of absolute vertical differences
949 </p></dd>
950 <dt> &lsquo;<samp>vsse</samp>&rsquo;</dt>
951 <dd><p>sum of squared vertical differences
952 </p></dd>
953 <dt> &lsquo;<samp>nsse</samp>&rsquo;</dt>
954 <dd><p>noise preserving sum of squared differences
955 </p></dd>
956 <dt> &lsquo;<samp>w53</samp>&rsquo;</dt>
957 <dd><p>5/3 wavelet, only used in snow
958 </p></dd>
959 <dt> &lsquo;<samp>w97</samp>&rsquo;</dt>
960 <dd><p>9/7 wavelet, only used in snow
961 </p></dd>
962 <dt> &lsquo;<samp>dctmax</samp>&rsquo;</dt>
963 <dt> &lsquo;<samp>chroma</samp>&rsquo;</dt>
964 </dl>
965
966 </dd>
967 <dt> &lsquo;<samp>dia_size <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
968 <dd><p>Set diamond type &amp; size for motion estimation.
969 </p>
970 </dd>
971 <dt> &lsquo;<samp>last_pred <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
972 <dd><p>Set amount of motion predictors from the previous frame.
973 </p>
974 </dd>
975 <dt> &lsquo;<samp>preme <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
976 <dd><p>Set pre motion estimation.
977 </p>
978 </dd>
979 <dt> &lsquo;<samp>precmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
980 <dd><p>Set pre motion estimation compare function.
981 </p>
982 <p>Possible values:
983 </p><dl compact="compact">
984 <dt> &lsquo;<samp>sad</samp>&rsquo;</dt>
985 <dd><p>sum of absolute differences, fast (default)
986 </p></dd>
987 <dt> &lsquo;<samp>sse</samp>&rsquo;</dt>
988 <dd><p>sum of squared errors
989 </p></dd>
990 <dt> &lsquo;<samp>satd</samp>&rsquo;</dt>
991 <dd><p>sum of absolute Hadamard transformed differences
992 </p></dd>
993 <dt> &lsquo;<samp>dct</samp>&rsquo;</dt>
994 <dd><p>sum of absolute DCT transformed differences
995 </p></dd>
996 <dt> &lsquo;<samp>psnr</samp>&rsquo;</dt>
997 <dd><p>sum of squared quantization errors (avoid, low quality)
998 </p></dd>
999 <dt> &lsquo;<samp>bit</samp>&rsquo;</dt>
1000 <dd><p>number of bits needed for the block
1001 </p></dd>
1002 <dt> &lsquo;<samp>rd</samp>&rsquo;</dt>
1003 <dd><p>rate distortion optimal, slow
1004 </p></dd>
1005 <dt> &lsquo;<samp>zero</samp>&rsquo;</dt>
1006 <dd><p>0
1007 </p></dd>
1008 <dt> &lsquo;<samp>vsad</samp>&rsquo;</dt>
1009 <dd><p>sum of absolute vertical differences
1010 </p></dd>
1011 <dt> &lsquo;<samp>vsse</samp>&rsquo;</dt>
1012 <dd><p>sum of squared vertical differences
1013 </p></dd>
1014 <dt> &lsquo;<samp>nsse</samp>&rsquo;</dt>
1015 <dd><p>noise preserving sum of squared differences
1016 </p></dd>
1017 <dt> &lsquo;<samp>w53</samp>&rsquo;</dt>
1018 <dd><p>5/3 wavelet, only used in snow
1019 </p></dd>
1020 <dt> &lsquo;<samp>w97</samp>&rsquo;</dt>
1021 <dd><p>9/7 wavelet, only used in snow
1022 </p></dd>
1023 <dt> &lsquo;<samp>dctmax</samp>&rsquo;</dt>
1024 <dt> &lsquo;<samp>chroma</samp>&rsquo;</dt>
1025 </dl>
1026
1027 </dd>
1028 <dt> &lsquo;<samp>pre_dia_size <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1029 <dd><p>Set diamond type &amp; size for motion estimation pre-pass.
1030 </p>
1031 </dd>
1032 <dt> &lsquo;<samp>subq <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1033 <dd><p>Set sub pel motion estimation quality.
1034 </p>
1035 </dd>
1036 <dt> &lsquo;<samp>dtg_active_format <var>integer</var></samp>&rsquo;</dt>
1037 <dt> &lsquo;<samp>me_range <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1038 <dd><p>Set limit motion vectors range (1023 for DivX player).
1039 </p>
1040 </dd>
1041 <dt> &lsquo;<samp>ibias <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1042 <dd><p>Set intra quant bias.
1043 </p>
1044 </dd>
1045 <dt> &lsquo;<samp>pbias <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1046 <dd><p>Set inter quant bias.
1047 </p>
1048 </dd>
1049 <dt> &lsquo;<samp>color_table_id <var>integer</var></samp>&rsquo;</dt>
1050 <dt> &lsquo;<samp>global_quality <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
1051 <dt> &lsquo;<samp>coder <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1052 <dd>
1053 <p>Possible values:
1054 </p><dl compact="compact">
1055 <dt> &lsquo;<samp>vlc</samp>&rsquo;</dt>
1056 <dd><p>variable length coder / huffman coder
1057 </p></dd>
1058 <dt> &lsquo;<samp>ac</samp>&rsquo;</dt>
1059 <dd><p>arithmetic coder
1060 </p></dd>
1061 <dt> &lsquo;<samp>raw</samp>&rsquo;</dt>
1062 <dd><p>raw (no encoding)
1063 </p></dd>
1064 <dt> &lsquo;<samp>rle</samp>&rsquo;</dt>
1065 <dd><p>run-length coder
1066 </p></dd>
1067 <dt> &lsquo;<samp>deflate</samp>&rsquo;</dt>
1068 <dd><p>deflate-based coder
1069 </p></dd>
1070 </dl>
1071
1072 </dd>
1073 <dt> &lsquo;<samp>context <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1074 <dd><p>Set context model.
1075 </p>
1076 </dd>
1077 <dt> &lsquo;<samp>slice_flags <var>integer</var></samp>&rsquo;</dt>
1078 <dt> &lsquo;<samp>xvmc_acceleration <var>integer</var></samp>&rsquo;</dt>
1079 <dt> &lsquo;<samp>mbd <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1080 <dd><p>Set macroblock decision algorithm (high quality mode).
1081 </p>
1082 <p>Possible values:
1083 </p><dl compact="compact">
1084 <dt> &lsquo;<samp>simple</samp>&rsquo;</dt>
1085 <dd><p>use mbcmp (default)
1086 </p></dd>
1087 <dt> &lsquo;<samp>bits</samp>&rsquo;</dt>
1088 <dd><p>use fewest bits
1089 </p></dd>
1090 <dt> &lsquo;<samp>rd</samp>&rsquo;</dt>
1091 <dd><p>use best rate distortion
1092 </p></dd>
1093 </dl>
1094
1095 </dd>
1096 <dt> &lsquo;<samp>stream_codec_tag <var>integer</var></samp>&rsquo;</dt>
1097 <dt> &lsquo;<samp>sc_threshold <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1098 <dd><p>Set scene change threshold.
1099 </p>
1100 </dd>
1101 <dt> &lsquo;<samp>lmin <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1102 <dd><p>Set min lagrange factor (VBR).
1103 </p>
1104 </dd>
1105 <dt> &lsquo;<samp>lmax <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1106 <dd><p>Set max lagrange factor (VBR).
1107 </p>
1108 </dd>
1109 <dt> &lsquo;<samp>nr <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1110 <dd><p>Set noise reduction.
1111 </p>
1112 </dd>
1113 <dt> &lsquo;<samp>rc_init_occupancy <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1114 <dd><p>Set number of bits which should be loaded into the rc buffer before
1115 decoding starts.
1116 </p>
1117 </dd>
1118 <dt> &lsquo;<samp>flags2 <var>flags</var> (<em>decoding/encoding,audio,video</em>)</samp>&rsquo;</dt>
1119 <dd>
1120 <p>Possible values:
1121 </p><dl compact="compact">
1122 <dt> &lsquo;<samp>fast</samp>&rsquo;</dt>
1123 <dd><p>Allow non spec compliant speedup tricks.
1124 </p></dd>
1125 <dt> &lsquo;<samp>sgop</samp>&rsquo;</dt>
1126 <dd><p>Deprecated, use mpegvideo private options instead.
1127 </p></dd>
1128 <dt> &lsquo;<samp>noout</samp>&rsquo;</dt>
1129 <dd><p>Skip bitstream encoding.
1130 </p></dd>
1131 <dt> &lsquo;<samp>ignorecrop</samp>&rsquo;</dt>
1132 <dd><p>Ignore cropping information from sps.
1133 </p></dd>
1134 <dt> &lsquo;<samp>local_header</samp>&rsquo;</dt>
1135 <dd><p>Place global headers at every keyframe instead of in extradata.
1136 </p></dd>
1137 <dt> &lsquo;<samp>chunks</samp>&rsquo;</dt>
1138 <dd><p>Frame data might be split into multiple chunks.
1139 </p></dd>
1140 <dt> &lsquo;<samp>showall</samp>&rsquo;</dt>
1141 <dd><p>Show all frames before the first keyframe.
1142 </p></dd>
1143 <dt> &lsquo;<samp>skiprd</samp>&rsquo;</dt>
1144 <dd><p>Deprecated, use mpegvideo private options instead.
1145 </p></dd>
1146 </dl>
1147
1148 </dd>
1149 <dt> &lsquo;<samp>error <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1150 <dt> &lsquo;<samp>qns <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1151 <dd><p>Deprecated, use mpegvideo private options instead.
1152 </p>
1153 </dd>
1154 <dt> &lsquo;<samp>threads <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
1155 <dd>
1156 <p>Possible values:
1157 </p><dl compact="compact">
1158 <dt> &lsquo;<samp>auto</samp>&rsquo;</dt>
1159 <dd><p>detect a good number of threads
1160 </p></dd>
1161 </dl>
1162
1163 </dd>
1164 <dt> &lsquo;<samp>me_threshold <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1165 <dd><p>Set motion estimation threshold.
1166 </p>
1167 </dd>
1168 <dt> &lsquo;<samp>mb_threshold <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1169 <dd><p>Set macroblock threshold.
1170 </p>
1171 </dd>
1172 <dt> &lsquo;<samp>dc <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1173 <dd><p>Set intra_dc_precision.
1174 </p>
1175 </dd>
1176 <dt> &lsquo;<samp>nssew <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1177 <dd><p>Set nsse weight.
1178 </p>
1179 </dd>
1180 <dt> &lsquo;<samp>skip_top <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
1181 <dd><p>Set number of macroblock rows at the top which are skipped.
1182 </p>
1183 </dd>
1184 <dt> &lsquo;<samp>skip_bottom <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
1185 <dd><p>Set number of macroblock rows at the bottom which are skipped.
1186 </p>
1187 </dd>
1188 <dt> &lsquo;<samp>profile <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
1189 <dd>
1190 <p>Possible values:
1191 </p><dl compact="compact">
1192 <dt> &lsquo;<samp>unknown</samp>&rsquo;</dt>
1193 <dt> &lsquo;<samp>aac_main</samp>&rsquo;</dt>
1194 <dt> &lsquo;<samp>aac_low</samp>&rsquo;</dt>
1195 <dt> &lsquo;<samp>aac_ssr</samp>&rsquo;</dt>
1196 <dt> &lsquo;<samp>aac_ltp</samp>&rsquo;</dt>
1197 <dt> &lsquo;<samp>aac_he</samp>&rsquo;</dt>
1198 <dt> &lsquo;<samp>aac_he_v2</samp>&rsquo;</dt>
1199 <dt> &lsquo;<samp>aac_ld</samp>&rsquo;</dt>
1200 <dt> &lsquo;<samp>aac_eld</samp>&rsquo;</dt>
1201 <dt> &lsquo;<samp>mpeg2_aac_low</samp>&rsquo;</dt>
1202 <dt> &lsquo;<samp>mpeg2_aac_he</samp>&rsquo;</dt>
1203 <dt> &lsquo;<samp>dts</samp>&rsquo;</dt>
1204 <dt> &lsquo;<samp>dts_es</samp>&rsquo;</dt>
1205 <dt> &lsquo;<samp>dts_96_24</samp>&rsquo;</dt>
1206 <dt> &lsquo;<samp>dts_hd_hra</samp>&rsquo;</dt>
1207 <dt> &lsquo;<samp>dts_hd_ma</samp>&rsquo;</dt>
1208 </dl>
1209
1210 </dd>
1211 <dt> &lsquo;<samp>level <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
1212 <dd>
1213 <p>Possible values:
1214 </p><dl compact="compact">
1215 <dt> &lsquo;<samp>unknown</samp>&rsquo;</dt>
1216 </dl>
1217
1218 </dd>
1219 <dt> &lsquo;<samp>lowres <var>integer</var> (<em>decoding,audio,video</em>)</samp>&rsquo;</dt>
1220 <dd><p>Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
1221 </p>
1222 </dd>
1223 <dt> &lsquo;<samp>skip_threshold <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1224 <dd><p>Set frame skip threshold.
1225 </p>
1226 </dd>
1227 <dt> &lsquo;<samp>skip_factor <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1228 <dd><p>Set frame skip factor.
1229 </p>
1230 </dd>
1231 <dt> &lsquo;<samp>skip_exp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1232 <dd><p>Set frame skip exponent.
1233 </p>
1234 </dd>
1235 <dt> &lsquo;<samp>skipcmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1236 <dd><p>Set frame skip compare function.
1237 </p>
1238 <p>Possible values:
1239 </p><dl compact="compact">
1240 <dt> &lsquo;<samp>sad</samp>&rsquo;</dt>
1241 <dd><p>sum of absolute differences, fast (default)
1242 </p></dd>
1243 <dt> &lsquo;<samp>sse</samp>&rsquo;</dt>
1244 <dd><p>sum of squared errors
1245 </p></dd>
1246 <dt> &lsquo;<samp>satd</samp>&rsquo;</dt>
1247 <dd><p>sum of absolute Hadamard transformed differences
1248 </p></dd>
1249 <dt> &lsquo;<samp>dct</samp>&rsquo;</dt>
1250 <dd><p>sum of absolute DCT transformed differences
1251 </p></dd>
1252 <dt> &lsquo;<samp>psnr</samp>&rsquo;</dt>
1253 <dd><p>sum of squared quantization errors (avoid, low quality)
1254 </p></dd>
1255 <dt> &lsquo;<samp>bit</samp>&rsquo;</dt>
1256 <dd><p>number of bits needed for the block
1257 </p></dd>
1258 <dt> &lsquo;<samp>rd</samp>&rsquo;</dt>
1259 <dd><p>rate distortion optimal, slow
1260 </p></dd>
1261 <dt> &lsquo;<samp>zero</samp>&rsquo;</dt>
1262 <dd><p>0
1263 </p></dd>
1264 <dt> &lsquo;<samp>vsad</samp>&rsquo;</dt>
1265 <dd><p>sum of absolute vertical differences
1266 </p></dd>
1267 <dt> &lsquo;<samp>vsse</samp>&rsquo;</dt>
1268 <dd><p>sum of squared vertical differences
1269 </p></dd>
1270 <dt> &lsquo;<samp>nsse</samp>&rsquo;</dt>
1271 <dd><p>noise preserving sum of squared differences
1272 </p></dd>
1273 <dt> &lsquo;<samp>w53</samp>&rsquo;</dt>
1274 <dd><p>5/3 wavelet, only used in snow
1275 </p></dd>
1276 <dt> &lsquo;<samp>w97</samp>&rsquo;</dt>
1277 <dd><p>9/7 wavelet, only used in snow
1278 </p></dd>
1279 <dt> &lsquo;<samp>dctmax</samp>&rsquo;</dt>
1280 <dt> &lsquo;<samp>chroma</samp>&rsquo;</dt>
1281 </dl>
1282
1283 </dd>
1284 <dt> &lsquo;<samp>border_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1285 <dd><p>Increase the quantizer for macroblocks close to borders.
1286 </p>
1287 </dd>
1288 <dt> &lsquo;<samp>mblmin <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1289 <dd><p>Set min macroblock lagrange factor (VBR).
1290 </p>
1291 </dd>
1292 <dt> &lsquo;<samp>mblmax <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1293 <dd><p>Set max macroblock lagrange factor (VBR).
1294 </p>
1295 </dd>
1296 <dt> &lsquo;<samp>mepc <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1297 <dd><p>Set motion estimation bitrate penalty compensation (1.0 = 256).
1298 </p>
1299 </dd>
1300 <dt> &lsquo;<samp>skip_loop_filter <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
1301 <dt> &lsquo;<samp>skip_idct        <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
1302 <dt> &lsquo;<samp>skip_frame       <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
1303 <dd>
1304 <p>Make decoder discard processing depending on the frame type selected
1305 by the option value.
1306 </p>
1307 <p>&lsquo;<samp>skip_loop_filter</samp>&rsquo; skips frame loop filtering, &lsquo;<samp>skip_idct</samp>&rsquo;
1308 skips frame IDCT/dequantization, &lsquo;<samp>skip_frame</samp>&rsquo; skips decoding.
1309 </p>
1310 <p>Possible values:
1311 </p><dl compact="compact">
1312 <dt> &lsquo;<samp>none</samp>&rsquo;</dt>
1313 <dd><p>Discard no frame.
1314 </p>
1315 </dd>
1316 <dt> &lsquo;<samp>default</samp>&rsquo;</dt>
1317 <dd><p>Discard useless frames like 0-sized frames.
1318 </p>
1319 </dd>
1320 <dt> &lsquo;<samp>noref</samp>&rsquo;</dt>
1321 <dd><p>Discard all non-reference frames.
1322 </p>
1323 </dd>
1324 <dt> &lsquo;<samp>bidir</samp>&rsquo;</dt>
1325 <dd><p>Discard all bidirectional frames.
1326 </p>
1327 </dd>
1328 <dt> &lsquo;<samp>nokey</samp>&rsquo;</dt>
1329 <dd><p>Discard all frames excepts keyframes.
1330 </p>
1331 </dd>
1332 <dt> &lsquo;<samp>all</samp>&rsquo;</dt>
1333 <dd><p>Discard all frames.
1334 </p></dd>
1335 </dl>
1336
1337 <p>Default value is &lsquo;<samp>default</samp>&rsquo;.
1338 </p>
1339 </dd>
1340 <dt> &lsquo;<samp>bidir_refine <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1341 <dd><p>Refine the two motion vectors used in bidirectional macroblocks.
1342 </p>
1343 </dd>
1344 <dt> &lsquo;<samp>brd_scale <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1345 <dd><p>Downscale frames for dynamic B-frame decision.
1346 </p>
1347 </dd>
1348 <dt> &lsquo;<samp>keyint_min <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1349 <dd><p>Set minimum interval between IDR-frames.
1350 </p>
1351 </dd>
1352 <dt> &lsquo;<samp>refs <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1353 <dd><p>Set reference frames to consider for motion compensation.
1354 </p>
1355 </dd>
1356 <dt> &lsquo;<samp>chromaoffset <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1357 <dd><p>Set chroma qp offset from luma.
1358 </p>
1359 </dd>
1360 <dt> &lsquo;<samp>trellis <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
1361 <dd><p>Set rate-distortion optimal quantization.
1362 </p>
1363 </dd>
1364 <dt> &lsquo;<samp>sc_factor <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1365 <dd><p>Set value multiplied by qscale for each frame and added to
1366 scene_change_score.
1367 </p>
1368 </dd>
1369 <dt> &lsquo;<samp>mv0_threshold <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1370 <dt> &lsquo;<samp>b_sensitivity <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1371 <dd><p>Adjust sensitivity of b_frame_strategy 1.
1372 </p>
1373 </dd>
1374 <dt> &lsquo;<samp>compression_level <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
1375 <dt> &lsquo;<samp>min_prediction_order <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
1376 <dt> &lsquo;<samp>max_prediction_order <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
1377 <dt> &lsquo;<samp>timecode_frame_start <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1378 <dd><p>Set GOP timecode frame start number, in non drop frame format.
1379 </p>
1380 </dd>
1381 <dt> &lsquo;<samp>request_channels <var>integer</var> (<em>decoding,audio</em>)</samp>&rsquo;</dt>
1382 <dd><p>Set desired number of audio channels.
1383 </p>
1384 </dd>
1385 <dt> &lsquo;<samp>bits_per_raw_sample <var>integer</var></samp>&rsquo;</dt>
1386 <dt> &lsquo;<samp>channel_layout <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>&rsquo;</dt>
1387 <dd>
1388 <p>Possible values:
1389 </p></dd>
1390 <dt> &lsquo;<samp>request_channel_layout <var>integer</var> (<em>decoding,audio</em>)</samp>&rsquo;</dt>
1391 <dd>
1392 <p>Possible values:
1393 </p></dd>
1394 <dt> &lsquo;<samp>rc_max_vbv_use <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1395 <dt> &lsquo;<samp>rc_min_vbv_use <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1396 <dt> &lsquo;<samp>ticks_per_frame <var>integer</var> (<em>decoding/encoding,audio,video</em>)</samp>&rsquo;</dt>
1397 <dt> &lsquo;<samp>color_primaries <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
1398 <dt> &lsquo;<samp>color_trc <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
1399 <dt> &lsquo;<samp>colorspace <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
1400 <dt> &lsquo;<samp>color_range <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
1401 <dt> &lsquo;<samp>chroma_sample_location <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
1402 <dt> &lsquo;<samp>log_level_offset <var>integer</var></samp>&rsquo;</dt>
1403 <dd><p>Set the log level offset.
1404 </p>
1405 </dd>
1406 <dt> &lsquo;<samp>slices <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
1407 <dd><p>Number of slices, used in parallelized encoding.
1408 </p>
1409 </dd>
1410 <dt> &lsquo;<samp>thread_type <var>flags</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
1411 <dd><p>Select multithreading type.
1412 </p>
1413 <p>Possible values:
1414 </p><dl compact="compact">
1415 <dt> &lsquo;<samp>slice</samp>&rsquo;</dt>
1416 <dt> &lsquo;<samp>frame</samp>&rsquo;</dt>
1417 </dl>
1418 </dd>
1419 <dt> &lsquo;<samp>audio_service_type <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
1420 <dd><p>Set audio service type.
1421 </p>
1422 <p>Possible values:
1423 </p><dl compact="compact">
1424 <dt> &lsquo;<samp>ma</samp>&rsquo;</dt>
1425 <dd><p>Main Audio Service
1426 </p></dd>
1427 <dt> &lsquo;<samp>ef</samp>&rsquo;</dt>
1428 <dd><p>Effects
1429 </p></dd>
1430 <dt> &lsquo;<samp>vi</samp>&rsquo;</dt>
1431 <dd><p>Visually Impaired
1432 </p></dd>
1433 <dt> &lsquo;<samp>hi</samp>&rsquo;</dt>
1434 <dd><p>Hearing Impaired
1435 </p></dd>
1436 <dt> &lsquo;<samp>di</samp>&rsquo;</dt>
1437 <dd><p>Dialogue
1438 </p></dd>
1439 <dt> &lsquo;<samp>co</samp>&rsquo;</dt>
1440 <dd><p>Commentary
1441 </p></dd>
1442 <dt> &lsquo;<samp>em</samp>&rsquo;</dt>
1443 <dd><p>Emergency
1444 </p></dd>
1445 <dt> &lsquo;<samp>vo</samp>&rsquo;</dt>
1446 <dd><p>Voice Over
1447 </p></dd>
1448 <dt> &lsquo;<samp>ka</samp>&rsquo;</dt>
1449 <dd><p>Karaoke
1450 </p></dd>
1451 </dl>
1452
1453 </dd>
1454 <dt> &lsquo;<samp>request_sample_fmt <var>sample_fmt</var> (<em>decoding,audio</em>)</samp>&rsquo;</dt>
1455 <dd><p>Set sample format audio decoders should prefer. Default value is
1456 <code>none</code>.
1457 </p>
1458 </dd>
1459 <dt> &lsquo;<samp>pkt_timebase <var>rational number</var></samp>&rsquo;</dt>
1460 <dt> &lsquo;<samp>sub_charenc <var>encoding</var> (<em>decoding,subtitles</em>)</samp>&rsquo;</dt>
1461 <dd><p>Set the input subtitles character encoding.
1462 </p>
1463 </dd>
1464 <dt> &lsquo;<samp>field_order  <var>field_order</var> (<em>video</em>)</samp>&rsquo;</dt>
1465 <dd><p>Set/override the field order of the video.
1466 Possible values:
1467 </p><dl compact="compact">
1468 <dt> &lsquo;<samp>progressive</samp>&rsquo;</dt>
1469 <dd><p>Progressive video
1470 </p></dd>
1471 <dt> &lsquo;<samp>tt</samp>&rsquo;</dt>
1472 <dd><p>Interlaced video, top field coded and displayed first
1473 </p></dd>
1474 <dt> &lsquo;<samp>bb</samp>&rsquo;</dt>
1475 <dd><p>Interlaced video, bottom field coded and displayed first
1476 </p></dd>
1477 <dt> &lsquo;<samp>tb</samp>&rsquo;</dt>
1478 <dd><p>Interlaced video, top coded first, bottom displayed first
1479 </p></dd>
1480 <dt> &lsquo;<samp>bt</samp>&rsquo;</dt>
1481 <dd><p>Interlaced video, bottom coded first, top displayed first
1482 </p></dd>
1483 </dl>
1484
1485 </dd>
1486 <dt> &lsquo;<samp>skip_alpha <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
1487 <dd><p>Set to 1 to disable processing alpha (transparency). This works like the
1488 &lsquo;<samp>gray</samp>&rsquo; flag in the &lsquo;<samp>flags</samp>&rsquo; option which skips chroma information
1489 instead of alpha. Default is 0.
1490 </p></dd>
1491 </dl>
1492
1493
1494 <a name="Decoders"></a>
1495 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Decoders">3. Decoders</a></h1>
1496
1497 <p>Decoders are configured elements in FFmpeg which allow the decoding of
1498 multimedia streams.
1499 </p>
1500 <p>When you configure your FFmpeg build, all the supported native decoders
1501 are enabled by default. Decoders requiring an external library must be enabled
1502 manually via the corresponding <code>--enable-lib</code> option. You can list all
1503 available decoders using the configure option <code>--list-decoders</code>.
1504 </p>
1505 <p>You can disable all the decoders with the configure option
1506 <code>--disable-decoders</code> and selectively enable / disable single decoders
1507 with the options <code>--enable-decoder=<var>DECODER</var></code> /
1508 <code>--disable-decoder=<var>DECODER</var></code>.
1509 </p>
1510 <p>The option <code>-codecs</code> of the ff* tools will display the list of
1511 enabled decoders.
1512 </p>
1513
1514 <a name="Video-Decoders"></a>
1515 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Video-Decoders">4. Video Decoders</a></h1>
1516
1517 <p>A description of some of the currently available video decoders
1518 follows.
1519 </p>
1520 <a name="rawvideo"></a>
1521 <h2 class="section"><a href="ffmpeg-codecs.html#toc-rawvideo">4.1 rawvideo</a></h2>
1522
1523 <p>Raw video decoder.
1524 </p>
1525 <p>This decoder decodes rawvideo streams.
1526 </p>
1527 <a name="Options-17"></a>
1528 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-17">4.1.1 Options</a></h3>
1529
1530 <dl compact="compact">
1531 <dt> &lsquo;<samp>top <var>top_field_first</var></samp>&rsquo;</dt>
1532 <dd><p>Specify the assumed field type of the input video.
1533 </p><dl compact="compact">
1534 <dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
1535 <dd><p>the video is assumed to be progressive (default)
1536 </p></dd>
1537 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
1538 <dd><p>bottom-field-first is assumed
1539 </p></dd>
1540 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
1541 <dd><p>top-field-first is assumed
1542 </p></dd>
1543 </dl>
1544
1545 </dd>
1546 </dl>
1547
1548
1549 <a name="Audio-Decoders"></a>
1550 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Audio-Decoders">5. Audio Decoders</a></h1>
1551
1552 <a name="ffwavesynth"></a>
1553 <h2 class="section"><a href="ffmpeg-codecs.html#toc-ffwavesynth">5.1 ffwavesynth</a></h2>
1554
1555 <p>Internal wave synthetizer.
1556 </p>
1557 <p>This decoder generates wave patterns according to predefined sequences. Its
1558 use is purely internal and the format of the data it accepts is not publicly
1559 documented.
1560 </p>
1561 <a name="libcelt"></a>
1562 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libcelt">5.2 libcelt</a></h2>
1563
1564 <p>libcelt decoder wrapper.
1565 </p>
1566 <p>libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
1567 Requires the presence of the libcelt headers and library during configuration.
1568 You need to explicitly configure the build with <code>--enable-libcelt</code>.
1569 </p>
1570 <a name="libgsm"></a>
1571 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libgsm">5.3 libgsm</a></h2>
1572
1573 <p>libgsm decoder wrapper.
1574 </p>
1575 <p>libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
1576 the presence of the libgsm headers and library during configuration. You need
1577 to explicitly configure the build with <code>--enable-libgsm</code>.
1578 </p>
1579 <p>This decoder supports both the ordinary GSM and the Microsoft variant.
1580 </p>
1581 <a name="libilbc"></a>
1582 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libilbc">5.4 libilbc</a></h2>
1583
1584 <p>libilbc decoder wrapper.
1585 </p>
1586 <p>libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
1587 audio codec. Requires the presence of the libilbc headers and library during
1588 configuration. You need to explicitly configure the build with
1589 <code>--enable-libilbc</code>.
1590 </p>
1591 <a name="Options-13"></a>
1592 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-13">5.4.1 Options</a></h3>
1593
1594 <p>The following option is supported by the libilbc wrapper.
1595 </p>
1596 <dl compact="compact">
1597 <dt> &lsquo;<samp>enhance</samp>&rsquo;</dt>
1598 <dd>
1599 <p>Enable the enhancement of the decoded audio when set to 1. The default
1600 value is 0 (disabled).
1601 </p>
1602 </dd>
1603 </dl>
1604
1605 <a name="libopencore_002damrnb"></a>
1606 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopencore_002damrnb">5.5 libopencore-amrnb</a></h2>
1607
1608 <p>libopencore-amrnb decoder wrapper.
1609 </p>
1610 <p>libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
1611 Narrowband audio codec. Using it requires the presence of the
1612 libopencore-amrnb headers and library during configuration. You need to
1613 explicitly configure the build with <code>--enable-libopencore-amrnb</code>.
1614 </p>
1615 <p>An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
1616 without this library.
1617 </p>
1618 <a name="libopencore_002damrwb"></a>
1619 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopencore_002damrwb">5.6 libopencore-amrwb</a></h2>
1620
1621 <p>libopencore-amrwb decoder wrapper.
1622 </p>
1623 <p>libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
1624 Wideband audio codec. Using it requires the presence of the
1625 libopencore-amrwb headers and library during configuration. You need to
1626 explicitly configure the build with <code>--enable-libopencore-amrwb</code>.
1627 </p>
1628 <p>An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
1629 without this library.
1630 </p>
1631 <a name="libopus"></a>
1632 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopus">5.7 libopus</a></h2>
1633
1634 <p>libopus decoder wrapper.
1635 </p>
1636 <p>libopus allows libavcodec to decode the Opus Interactive Audio Codec.
1637 Requires the presence of the libopus headers and library during
1638 configuration. You need to explicitly configure the build with
1639 <code>--enable-libopus</code>.
1640 </p>
1641
1642 <a name="Subtitles-Decoders"></a>
1643 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Subtitles-Decoders">6. Subtitles Decoders</a></h1>
1644
1645 <a name="dvdsub"></a>
1646 <h2 class="section"><a href="ffmpeg-codecs.html#toc-dvdsub">6.1 dvdsub</a></h2>
1647
1648 <p>This codec decodes the bitmap subtitles used in DVDs; the same subtitles can
1649 also be found in VobSub file pairs and in some Matroska files.
1650 </p>
1651 <a name="Options-7"></a>
1652 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-7">6.1.1 Options</a></h3>
1653
1654 <dl compact="compact">
1655 <dt> &lsquo;<samp>palette</samp>&rsquo;</dt>
1656 <dd><p>Specify the global palette used by the bitmaps. When stored in VobSub, the
1657 palette is normally specified in the index file; in Matroska, the palette is
1658 stored in the codec extra-data in the same format as in VobSub. In DVDs, the
1659 palette is stored in the IFO file, and therefore not available when reading
1660 from dumped VOB files.
1661 </p>
1662 <p>The format for this option is a string containing 16 24-bits hexadecimal
1663 numbers (without 0x prefix) separated by comas, for example <code>0d00ee,
1664 ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
1665 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b</code>.
1666 </p></dd>
1667 </dl>
1668
1669 <a name="libzvbi_002dteletext"></a>
1670 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libzvbi_002dteletext">6.2 libzvbi-teletext</a></h2>
1671
1672 <p>Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
1673 subtitles. Requires the presence of the libzvbi headers and library during
1674 configuration. You need to explicitly configure the build with
1675 <code>--enable-libzvbi</code>.
1676 </p>
1677 <a name="Options-11"></a>
1678 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-11">6.2.1 Options</a></h3>
1679
1680 <dl compact="compact">
1681 <dt> &lsquo;<samp>txt_page</samp>&rsquo;</dt>
1682 <dd><p>List of teletext page numbers to decode. You may use the special * string to
1683 match all pages. Pages that do not match the specified list are dropped.
1684 Default value is *.
1685 </p></dd>
1686 <dt> &lsquo;<samp>txt_chop_top</samp>&rsquo;</dt>
1687 <dd><p>Discards the top teletext line. Default value is 1.
1688 </p></dd>
1689 <dt> &lsquo;<samp>txt_format</samp>&rsquo;</dt>
1690 <dd><p>Specifies the format of the decoded subtitles. The teletext decoder is capable
1691 of decoding the teletext pages to bitmaps or to simple text, you should use
1692 &quot;bitmap&quot; for teletext pages, because certain graphics and colors cannot be
1693 expressed in simple text. You might use &quot;text&quot; for teletext based subtitles if
1694 your application can handle simple text based subtitles. Default value is
1695 bitmap.
1696 </p></dd>
1697 <dt> &lsquo;<samp>txt_left</samp>&rsquo;</dt>
1698 <dd><p>X offset of generated bitmaps, default is 0.
1699 </p></dd>
1700 <dt> &lsquo;<samp>txt_top</samp>&rsquo;</dt>
1701 <dd><p>Y offset of generated bitmaps, default is 0.
1702 </p></dd>
1703 <dt> &lsquo;<samp>txt_chop_spaces</samp>&rsquo;</dt>
1704 <dd><p>Chops leading and trailing spaces and removes empty lines from the generated
1705 text. This option is useful for teletext based subtitles where empty spaces may
1706 be present at the start or at the end of the lines or empty lines may be
1707 present between the subtitle lines because of double-sized teletext charactes.
1708 Default value is 1.
1709 </p></dd>
1710 <dt> &lsquo;<samp>txt_duration</samp>&rsquo;</dt>
1711 <dd><p>Sets the display duration of the decoded teletext pages or subtitles in
1712 miliseconds. Default value is 30000 which is 30 seconds.
1713 </p></dd>
1714 <dt> &lsquo;<samp>txt_transparent</samp>&rsquo;</dt>
1715 <dd><p>Force transparent background of the generated teletext bitmaps. Default value
1716 is 0 which means an opaque (black) background.
1717 </p></dd>
1718 </dl>
1719
1720 <a name="Encoders"></a>
1721 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Encoders">7. Encoders</a></h1>
1722
1723 <p>Encoders are configured elements in FFmpeg which allow the encoding of
1724 multimedia streams.
1725 </p>
1726 <p>When you configure your FFmpeg build, all the supported native encoders
1727 are enabled by default. Encoders requiring an external library must be enabled
1728 manually via the corresponding <code>--enable-lib</code> option. You can list all
1729 available encoders using the configure option <code>--list-encoders</code>.
1730 </p>
1731 <p>You can disable all the encoders with the configure option
1732 <code>--disable-encoders</code> and selectively enable / disable single encoders
1733 with the options <code>--enable-encoder=<var>ENCODER</var></code> /
1734 <code>--disable-encoder=<var>ENCODER</var></code>.
1735 </p>
1736 <p>The option <code>-codecs</code> of the ff* tools will display the list of
1737 enabled encoders.
1738 </p>
1739
1740 <a name="Audio-Encoders"></a>
1741 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Audio-Encoders">8. Audio Encoders</a></h1>
1742
1743 <p>A description of some of the currently available audio encoders
1744 follows.
1745 </p>
1746 <p><a name="aacenc"></a>
1747 </p><a name="aac"></a>
1748 <h2 class="section"><a href="ffmpeg-codecs.html#toc-aac">8.1 aac</a></h2>
1749
1750 <p>Advanced Audio Coding (AAC) encoder.
1751 </p>
1752 <p>This encoder is an experimental FFmpeg-native AAC encoder. Currently only the
1753 low complexity (AAC-LC) profile is supported. To use this encoder, you must set
1754 &lsquo;<samp>strict</samp>&rsquo; option to &lsquo;<samp>experimental</samp>&rsquo; or lower.
1755 </p>
1756 <p>As this encoder is experimental, unexpected behavior may exist from time to
1757 time. For a more stable AAC encoder, see <a href="#libvo_002daacenc">libvo-aacenc</a>. However, be warned
1758 that it has a worse quality reported by some users.
1759 </p>
1760 <p>See also <a href="#libfdk_002daac_002denc">libfdk_aac</a> and <a href="#libfaac">libfaac</a>.
1761 </p>
1762 <a name="Options-8"></a>
1763 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-8">8.1.1 Options</a></h3>
1764
1765 <dl compact="compact">
1766 <dt> &lsquo;<samp>b</samp>&rsquo;</dt>
1767 <dd><p>Set bit rate in bits/s. Setting this automatically activates constant bit rate
1768 (CBR) mode.
1769 </p>
1770 </dd>
1771 <dt> &lsquo;<samp>q</samp>&rsquo;</dt>
1772 <dd><p>Set quality for variable bit rate (VBR) mode. This option is valid only using
1773 the <code>ffmpeg</code> command-line tool. For library interface users, use
1774 &lsquo;<samp>global_quality</samp>&rsquo;.
1775 </p>
1776 </dd>
1777 <dt> &lsquo;<samp>stereo_mode</samp>&rsquo;</dt>
1778 <dd><p>Set stereo encoding mode. Possible values:
1779 </p>
1780 <dl compact="compact">
1781 <dt> &lsquo;<samp>auto</samp>&rsquo;</dt>
1782 <dd><p>Automatically selected by the encoder.
1783 </p>
1784 </dd>
1785 <dt> &lsquo;<samp>ms_off</samp>&rsquo;</dt>
1786 <dd><p>Disable middle/side encoding. This is the default.
1787 </p>
1788 </dd>
1789 <dt> &lsquo;<samp>ms_force</samp>&rsquo;</dt>
1790 <dd><p>Force middle/side encoding.
1791 </p></dd>
1792 </dl>
1793
1794 </dd>
1795 <dt> &lsquo;<samp>aac_coder</samp>&rsquo;</dt>
1796 <dd><p>Set AAC encoder coding method. Possible values:
1797 </p>
1798 <dl compact="compact">
1799 <dt> &lsquo;<samp>faac</samp>&rsquo;</dt>
1800 <dd><p>FAAC-inspired method.
1801 </p>
1802 <p>This method is a simplified reimplementation of the method used in FAAC, which
1803 sets thresholds proportional to the band energies, and then decreases all the
1804 thresholds with quantizer steps to find the appropriate quantization with
1805 distortion below threshold band by band.
1806 </p>
1807 <p>The quality of this method is comparable to the two loop searching method
1808 descibed below, but somewhat a little better and slower.
1809 </p>
1810 </dd>
1811 <dt> &lsquo;<samp>anmr</samp>&rsquo;</dt>
1812 <dd><p>Average noise to mask ratio (ANMR) trellis-based solution.
1813 </p>
1814 <p>This has a theoretic best quality out of all the coding methods, but at the
1815 cost of the slowest speed.
1816 </p>
1817 </dd>
1818 <dt> &lsquo;<samp>twoloop</samp>&rsquo;</dt>
1819 <dd><p>Two loop searching (TLS) method.
1820 </p>
1821 <p>This method first sets quantizers depending on band thresholds and then tries
1822 to find an optimal combination by adding or subtracting a specific value from
1823 all quantizers and adjusting some individual quantizer a little.
1824 </p>
1825 <p>This method produces similar quality with the FAAC method and is the default.
1826 </p>
1827 </dd>
1828 <dt> &lsquo;<samp>fast</samp>&rsquo;</dt>
1829 <dd><p>Constant quantizer method.
1830 </p>
1831 <p>This method sets a constant quantizer for all bands. This is the fastest of all
1832 the methods, yet produces the worst quality.
1833 </p>
1834 </dd>
1835 </dl>
1836
1837 </dd>
1838 </dl>
1839
1840 <a name="ac3-and-ac3_005ffixed"></a>
1841 <h2 class="section"><a href="ffmpeg-codecs.html#toc-ac3-and-ac3_005ffixed">8.2 ac3 and ac3_fixed</a></h2>
1842
1843 <p>AC-3 audio encoders.
1844 </p>
1845 <p>These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as
1846 the undocumented RealAudio 3 (a.k.a. dnet).
1847 </p>
1848 <p>The <var>ac3</var> encoder uses floating-point math, while the <var>ac3_fixed</var>
1849 encoder only uses fixed-point integer math. This does not mean that one is
1850 always faster, just that one or the other may be better suited to a
1851 particular system. The floating-point encoder will generally produce better
1852 quality audio for a given bitrate. The <var>ac3_fixed</var> encoder is not the
1853 default codec for any of the output formats, so it must be specified explicitly
1854 using the option <code>-acodec ac3_fixed</code> in order to use it.
1855 </p>
1856 <a name="AC_002d3-Metadata"></a>
1857 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-AC_002d3-Metadata">8.2.1 AC-3 Metadata</a></h3>
1858
1859 <p>The AC-3 metadata options are used to set parameters that describe the audio,
1860 but in most cases do not affect the audio encoding itself. Some of the options
1861 do directly affect or influence the decoding and playback of the resulting
1862 bitstream, while others are just for informational purposes. A few of the
1863 options will add bits to the output stream that could otherwise be used for
1864 audio data, and will thus affect the quality of the output. Those will be
1865 indicated accordingly with a note in the option list below.
1866 </p>
1867 <p>These parameters are described in detail in several publicly-available
1868 documents.
1869 </p><ul>
1870 <li> <a href="http://www.atsc.org/cms/standards/a_52-2010.pdf">A/52:2010 - Digital Audio Compression (AC-3) (E-AC-3) Standard</a>
1871 </li><li> <a href="http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf">A/54 - Guide to the Use of the ATSC Digital Television Standard</a>
1872 </li><li> <a href="http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf">Dolby Metadata Guide</a>
1873 </li><li> <a href="http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf">Dolby Digital Professional Encoding Guidelines</a>
1874 </li></ul>
1875
1876 <a name="Metadata-Control-Options"></a>
1877 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Metadata-Control-Options">8.2.1.1 Metadata Control Options</a></h4>
1878
1879 <dl compact="compact">
1880 <dt> &lsquo;<samp>-per_frame_metadata <var>boolean</var></samp>&rsquo;</dt>
1881 <dd><p>Allow Per-Frame Metadata. Specifies if the encoder should check for changing
1882 metadata for each frame.
1883 </p><dl compact="compact">
1884 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
1885 <dd><p>The metadata values set at initialization will be used for every frame in the
1886 stream. (default)
1887 </p></dd>
1888 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
1889 <dd><p>Metadata values can be changed before encoding each frame.
1890 </p></dd>
1891 </dl>
1892
1893 </dd>
1894 </dl>
1895
1896 <a name="Downmix-Levels"></a>
1897 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Downmix-Levels">8.2.1.2 Downmix Levels</a></h4>
1898
1899 <dl compact="compact">
1900 <dt> &lsquo;<samp>-center_mixlev <var>level</var></samp>&rsquo;</dt>
1901 <dd><p>Center Mix Level. The amount of gain the decoder should apply to the center
1902 channel when downmixing to stereo. This field will only be written to the
1903 bitstream if a center channel is present. The value is specified as a scale
1904 factor. There are 3 valid values:
1905 </p><dl compact="compact">
1906 <dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
1907 <dd><p>Apply -3dB gain
1908 </p></dd>
1909 <dt> &lsquo;<samp>0.595</samp>&rsquo;</dt>
1910 <dd><p>Apply -4.5dB gain (default)
1911 </p></dd>
1912 <dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
1913 <dd><p>Apply -6dB gain
1914 </p></dd>
1915 </dl>
1916
1917 </dd>
1918 <dt> &lsquo;<samp>-surround_mixlev <var>level</var></samp>&rsquo;</dt>
1919 <dd><p>Surround Mix Level. The amount of gain the decoder should apply to the surround
1920 channel(s) when downmixing to stereo. This field will only be written to the
1921 bitstream if one or more surround channels are present. The value is specified
1922 as a scale factor.  There are 3 valid values:
1923 </p><dl compact="compact">
1924 <dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
1925 <dd><p>Apply -3dB gain
1926 </p></dd>
1927 <dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
1928 <dd><p>Apply -6dB gain (default)
1929 </p></dd>
1930 <dt> &lsquo;<samp>0.000</samp>&rsquo;</dt>
1931 <dd><p>Silence Surround Channel(s)
1932 </p></dd>
1933 </dl>
1934
1935 </dd>
1936 </dl>
1937
1938 <a name="Audio-Production-Information"></a>
1939 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Audio-Production-Information">8.2.1.3 Audio Production Information</a></h4>
1940 <p>Audio Production Information is optional information describing the mixing
1941 environment.  Either none or both of the fields are written to the bitstream.
1942 </p>
1943 <dl compact="compact">
1944 <dt> &lsquo;<samp>-mixing_level <var>number</var></samp>&rsquo;</dt>
1945 <dd><p>Mixing Level. Specifies peak sound pressure level (SPL) in the production
1946 environment when the mix was mastered. Valid values are 80 to 111, or -1 for
1947 unknown or not indicated. The default value is -1, but that value cannot be
1948 used if the Audio Production Information is written to the bitstream. Therefore,
1949 if the <code>room_type</code> option is not the default value, the <code>mixing_level</code>
1950 option must not be -1.
1951 </p>
1952 </dd>
1953 <dt> &lsquo;<samp>-room_type <var>type</var></samp>&rsquo;</dt>
1954 <dd><p>Room Type. Describes the equalization used during the final mixing session at
1955 the studio or on the dubbing stage. A large room is a dubbing stage with the
1956 industry standard X-curve equalization; a small room has flat equalization.
1957 This field will not be written to the bitstream if both the <code>mixing_level</code>
1958 option and the <code>room_type</code> option have the default values.
1959 </p><dl compact="compact">
1960 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
1961 <dt> &lsquo;<samp>notindicated</samp>&rsquo;</dt>
1962 <dd><p>Not Indicated (default)
1963 </p></dd>
1964 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
1965 <dt> &lsquo;<samp>large</samp>&rsquo;</dt>
1966 <dd><p>Large Room
1967 </p></dd>
1968 <dt> &lsquo;<samp>2</samp>&rsquo;</dt>
1969 <dt> &lsquo;<samp>small</samp>&rsquo;</dt>
1970 <dd><p>Small Room
1971 </p></dd>
1972 </dl>
1973
1974 </dd>
1975 </dl>
1976
1977 <a name="Other-Metadata-Options"></a>
1978 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Other-Metadata-Options">8.2.1.4 Other Metadata Options</a></h4>
1979
1980 <dl compact="compact">
1981 <dt> &lsquo;<samp>-copyright <var>boolean</var></samp>&rsquo;</dt>
1982 <dd><p>Copyright Indicator. Specifies whether a copyright exists for this audio.
1983 </p><dl compact="compact">
1984 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
1985 <dt> &lsquo;<samp>off</samp>&rsquo;</dt>
1986 <dd><p>No Copyright Exists (default)
1987 </p></dd>
1988 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
1989 <dt> &lsquo;<samp>on</samp>&rsquo;</dt>
1990 <dd><p>Copyright Exists
1991 </p></dd>
1992 </dl>
1993
1994 </dd>
1995 <dt> &lsquo;<samp>-dialnorm <var>value</var></samp>&rsquo;</dt>
1996 <dd><p>Dialogue Normalization. Indicates how far the average dialogue level of the
1997 program is below digital 100% full scale (0 dBFS). This parameter determines a
1998 level shift during audio reproduction that sets the average volume of the
1999 dialogue to a preset level. The goal is to match volume level between program
2000 sources. A value of -31dB will result in no volume level change, relative to
2001 the source volume, during audio reproduction. Valid values are whole numbers in
2002 the range -31 to -1, with -31 being the default.
2003 </p>
2004 </dd>
2005 <dt> &lsquo;<samp>-dsur_mode <var>mode</var></samp>&rsquo;</dt>
2006 <dd><p>Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround
2007 (Pro Logic). This field will only be written to the bitstream if the audio
2008 stream is stereo. Using this option does <b>NOT</b> mean the encoder will actually
2009 apply Dolby Surround processing.
2010 </p><dl compact="compact">
2011 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
2012 <dt> &lsquo;<samp>notindicated</samp>&rsquo;</dt>
2013 <dd><p>Not Indicated (default)
2014 </p></dd>
2015 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
2016 <dt> &lsquo;<samp>off</samp>&rsquo;</dt>
2017 <dd><p>Not Dolby Surround Encoded
2018 </p></dd>
2019 <dt> &lsquo;<samp>2</samp>&rsquo;</dt>
2020 <dt> &lsquo;<samp>on</samp>&rsquo;</dt>
2021 <dd><p>Dolby Surround Encoded
2022 </p></dd>
2023 </dl>
2024
2025 </dd>
2026 <dt> &lsquo;<samp>-original <var>boolean</var></samp>&rsquo;</dt>
2027 <dd><p>Original Bit Stream Indicator. Specifies whether this audio is from the
2028 original source and not a copy.
2029 </p><dl compact="compact">
2030 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
2031 <dt> &lsquo;<samp>off</samp>&rsquo;</dt>
2032 <dd><p>Not Original Source
2033 </p></dd>
2034 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
2035 <dt> &lsquo;<samp>on</samp>&rsquo;</dt>
2036 <dd><p>Original Source (default)
2037 </p></dd>
2038 </dl>
2039
2040 </dd>
2041 </dl>
2042
2043 <a name="Extended-Bitstream-Information"></a>
2044 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Extended-Bitstream-Information">8.2.2 Extended Bitstream Information</a></h3>
2045 <p>The extended bitstream options are part of the Alternate Bit Stream Syntax as
2046 specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.
2047 If any one parameter in a group is specified, all values in that group will be
2048 written to the bitstream.  Default values are used for those that are written
2049 but have not been specified.  If the mixing levels are written, the decoder
2050 will use these values instead of the ones specified in the <code>center_mixlev</code>
2051 and <code>surround_mixlev</code> options if it supports the Alternate Bit Stream
2052 Syntax.
2053 </p>
2054 <a name="Extended-Bitstream-Information-_002d-Part-1"></a>
2055 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Extended-Bitstream-Information-_002d-Part-1">8.2.2.1 Extended Bitstream Information - Part 1</a></h4>
2056
2057 <dl compact="compact">
2058 <dt> &lsquo;<samp>-dmix_mode <var>mode</var></samp>&rsquo;</dt>
2059 <dd><p>Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt
2060 (Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.
2061 </p><dl compact="compact">
2062 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
2063 <dt> &lsquo;<samp>notindicated</samp>&rsquo;</dt>
2064 <dd><p>Not Indicated (default)
2065 </p></dd>
2066 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
2067 <dt> &lsquo;<samp>ltrt</samp>&rsquo;</dt>
2068 <dd><p>Lt/Rt Downmix Preferred
2069 </p></dd>
2070 <dt> &lsquo;<samp>2</samp>&rsquo;</dt>
2071 <dt> &lsquo;<samp>loro</samp>&rsquo;</dt>
2072 <dd><p>Lo/Ro Downmix Preferred
2073 </p></dd>
2074 </dl>
2075
2076 </dd>
2077 <dt> &lsquo;<samp>-ltrt_cmixlev <var>level</var></samp>&rsquo;</dt>
2078 <dd><p>Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the
2079 center channel when downmixing to stereo in Lt/Rt mode.
2080 </p><dl compact="compact">
2081 <dt> &lsquo;<samp>1.414</samp>&rsquo;</dt>
2082 <dd><p>Apply +3dB gain
2083 </p></dd>
2084 <dt> &lsquo;<samp>1.189</samp>&rsquo;</dt>
2085 <dd><p>Apply +1.5dB gain
2086 </p></dd>
2087 <dt> &lsquo;<samp>1.000</samp>&rsquo;</dt>
2088 <dd><p>Apply 0dB gain
2089 </p></dd>
2090 <dt> &lsquo;<samp>0.841</samp>&rsquo;</dt>
2091 <dd><p>Apply -1.5dB gain
2092 </p></dd>
2093 <dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
2094 <dd><p>Apply -3.0dB gain
2095 </p></dd>
2096 <dt> &lsquo;<samp>0.595</samp>&rsquo;</dt>
2097 <dd><p>Apply -4.5dB gain (default)
2098 </p></dd>
2099 <dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
2100 <dd><p>Apply -6.0dB gain
2101 </p></dd>
2102 <dt> &lsquo;<samp>0.000</samp>&rsquo;</dt>
2103 <dd><p>Silence Center Channel
2104 </p></dd>
2105 </dl>
2106
2107 </dd>
2108 <dt> &lsquo;<samp>-ltrt_surmixlev <var>level</var></samp>&rsquo;</dt>
2109 <dd><p>Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the
2110 surround channel(s) when downmixing to stereo in Lt/Rt mode.
2111 </p><dl compact="compact">
2112 <dt> &lsquo;<samp>0.841</samp>&rsquo;</dt>
2113 <dd><p>Apply -1.5dB gain
2114 </p></dd>
2115 <dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
2116 <dd><p>Apply -3.0dB gain
2117 </p></dd>
2118 <dt> &lsquo;<samp>0.595</samp>&rsquo;</dt>
2119 <dd><p>Apply -4.5dB gain
2120 </p></dd>
2121 <dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
2122 <dd><p>Apply -6.0dB gain (default)
2123 </p></dd>
2124 <dt> &lsquo;<samp>0.000</samp>&rsquo;</dt>
2125 <dd><p>Silence Surround Channel(s)
2126 </p></dd>
2127 </dl>
2128
2129 </dd>
2130 <dt> &lsquo;<samp>-loro_cmixlev <var>level</var></samp>&rsquo;</dt>
2131 <dd><p>Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the
2132 center channel when downmixing to stereo in Lo/Ro mode.
2133 </p><dl compact="compact">
2134 <dt> &lsquo;<samp>1.414</samp>&rsquo;</dt>
2135 <dd><p>Apply +3dB gain
2136 </p></dd>
2137 <dt> &lsquo;<samp>1.189</samp>&rsquo;</dt>
2138 <dd><p>Apply +1.5dB gain
2139 </p></dd>
2140 <dt> &lsquo;<samp>1.000</samp>&rsquo;</dt>
2141 <dd><p>Apply 0dB gain
2142 </p></dd>
2143 <dt> &lsquo;<samp>0.841</samp>&rsquo;</dt>
2144 <dd><p>Apply -1.5dB gain
2145 </p></dd>
2146 <dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
2147 <dd><p>Apply -3.0dB gain
2148 </p></dd>
2149 <dt> &lsquo;<samp>0.595</samp>&rsquo;</dt>
2150 <dd><p>Apply -4.5dB gain (default)
2151 </p></dd>
2152 <dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
2153 <dd><p>Apply -6.0dB gain
2154 </p></dd>
2155 <dt> &lsquo;<samp>0.000</samp>&rsquo;</dt>
2156 <dd><p>Silence Center Channel
2157 </p></dd>
2158 </dl>
2159
2160 </dd>
2161 <dt> &lsquo;<samp>-loro_surmixlev <var>level</var></samp>&rsquo;</dt>
2162 <dd><p>Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the
2163 surround channel(s) when downmixing to stereo in Lo/Ro mode.
2164 </p><dl compact="compact">
2165 <dt> &lsquo;<samp>0.841</samp>&rsquo;</dt>
2166 <dd><p>Apply -1.5dB gain
2167 </p></dd>
2168 <dt> &lsquo;<samp>0.707</samp>&rsquo;</dt>
2169 <dd><p>Apply -3.0dB gain
2170 </p></dd>
2171 <dt> &lsquo;<samp>0.595</samp>&rsquo;</dt>
2172 <dd><p>Apply -4.5dB gain
2173 </p></dd>
2174 <dt> &lsquo;<samp>0.500</samp>&rsquo;</dt>
2175 <dd><p>Apply -6.0dB gain (default)
2176 </p></dd>
2177 <dt> &lsquo;<samp>0.000</samp>&rsquo;</dt>
2178 <dd><p>Silence Surround Channel(s)
2179 </p></dd>
2180 </dl>
2181
2182 </dd>
2183 </dl>
2184
2185 <a name="Extended-Bitstream-Information-_002d-Part-2"></a>
2186 <h4 class="subsubsection"><a href="ffmpeg-codecs.html#toc-Extended-Bitstream-Information-_002d-Part-2">8.2.2.2 Extended Bitstream Information - Part 2</a></h4>
2187
2188 <dl compact="compact">
2189 <dt> &lsquo;<samp>-dsurex_mode <var>mode</var></samp>&rsquo;</dt>
2190 <dd><p>Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX
2191 (7.1 matrixed to 5.1). Using this option does <b>NOT</b> mean the encoder will actually
2192 apply Dolby Surround EX processing.
2193 </p><dl compact="compact">
2194 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
2195 <dt> &lsquo;<samp>notindicated</samp>&rsquo;</dt>
2196 <dd><p>Not Indicated (default)
2197 </p></dd>
2198 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
2199 <dt> &lsquo;<samp>on</samp>&rsquo;</dt>
2200 <dd><p>Dolby Surround EX Off
2201 </p></dd>
2202 <dt> &lsquo;<samp>2</samp>&rsquo;</dt>
2203 <dt> &lsquo;<samp>off</samp>&rsquo;</dt>
2204 <dd><p>Dolby Surround EX On
2205 </p></dd>
2206 </dl>
2207
2208 </dd>
2209 <dt> &lsquo;<samp>-dheadphone_mode <var>mode</var></samp>&rsquo;</dt>
2210 <dd><p>Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone
2211 encoding (multi-channel matrixed to 2.0 for use with headphones). Using this
2212 option does <b>NOT</b> mean the encoder will actually apply Dolby Headphone
2213 processing.
2214 </p><dl compact="compact">
2215 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
2216 <dt> &lsquo;<samp>notindicated</samp>&rsquo;</dt>
2217 <dd><p>Not Indicated (default)
2218 </p></dd>
2219 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
2220 <dt> &lsquo;<samp>on</samp>&rsquo;</dt>
2221 <dd><p>Dolby Headphone Off
2222 </p></dd>
2223 <dt> &lsquo;<samp>2</samp>&rsquo;</dt>
2224 <dt> &lsquo;<samp>off</samp>&rsquo;</dt>
2225 <dd><p>Dolby Headphone On
2226 </p></dd>
2227 </dl>
2228
2229 </dd>
2230 <dt> &lsquo;<samp>-ad_conv_type <var>type</var></samp>&rsquo;</dt>
2231 <dd><p>A/D Converter Type. Indicates whether the audio has passed through HDCD A/D
2232 conversion.
2233 </p><dl compact="compact">
2234 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
2235 <dt> &lsquo;<samp>standard</samp>&rsquo;</dt>
2236 <dd><p>Standard A/D Converter (default)
2237 </p></dd>
2238 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
2239 <dt> &lsquo;<samp>hdcd</samp>&rsquo;</dt>
2240 <dd><p>HDCD A/D Converter
2241 </p></dd>
2242 </dl>
2243
2244 </dd>
2245 </dl>
2246
2247 <a name="Other-AC_002d3-Encoding-Options"></a>
2248 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Other-AC_002d3-Encoding-Options">8.2.3 Other AC-3 Encoding Options</a></h3>
2249
2250 <dl compact="compact">
2251 <dt> &lsquo;<samp>-stereo_rematrixing <var>boolean</var></samp>&rsquo;</dt>
2252 <dd><p>Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
2253 is an optional AC-3 feature that increases quality by selectively encoding
2254 the left/right channels as mid/side. This option is enabled by default, and it
2255 is highly recommended that it be left as enabled except for testing purposes.
2256 </p>
2257 </dd>
2258 </dl>
2259
2260 <a name="Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options"></a>
2261 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Floating_002dPoint_002dOnly-AC_002d3-Encoding-Options">8.2.4 Floating-Point-Only AC-3 Encoding Options</a></h3>
2262
2263 <p>These options are only valid for the floating-point encoder and do not exist
2264 for the fixed-point encoder due to the corresponding features not being
2265 implemented in fixed-point.
2266 </p>
2267 <dl compact="compact">
2268 <dt> &lsquo;<samp>-channel_coupling <var>boolean</var></samp>&rsquo;</dt>
2269 <dd><p>Enables/Disables use of channel coupling, which is an optional AC-3 feature
2270 that increases quality by combining high frequency information from multiple
2271 channels into a single channel. The per-channel high frequency information is
2272 sent with less accuracy in both the frequency and time domains. This allows
2273 more bits to be used for lower frequencies while preserving enough information
2274 to reconstruct the high frequencies. This option is enabled by default for the
2275 floating-point encoder and should generally be left as enabled except for
2276 testing purposes or to increase encoding speed.
2277 </p><dl compact="compact">
2278 <dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
2279 <dt> &lsquo;<samp>auto</samp>&rsquo;</dt>
2280 <dd><p>Selected by Encoder (default)
2281 </p></dd>
2282 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
2283 <dt> &lsquo;<samp>off</samp>&rsquo;</dt>
2284 <dd><p>Disable Channel Coupling
2285 </p></dd>
2286 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
2287 <dt> &lsquo;<samp>on</samp>&rsquo;</dt>
2288 <dd><p>Enable Channel Coupling
2289 </p></dd>
2290 </dl>
2291
2292 </dd>
2293 <dt> &lsquo;<samp>-cpl_start_band <var>number</var></samp>&rsquo;</dt>
2294 <dd><p>Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a
2295 value higher than the bandwidth is used, it will be reduced to 1 less than the
2296 coupling end band. If <var>auto</var> is used, the start band will be determined by
2297 the encoder based on the bit rate, sample rate, and channel layout. This option
2298 has no effect if channel coupling is disabled.
2299 </p><dl compact="compact">
2300 <dt> &lsquo;<samp>-1</samp>&rsquo;</dt>
2301 <dt> &lsquo;<samp>auto</samp>&rsquo;</dt>
2302 <dd><p>Selected by Encoder (default)
2303 </p></dd>
2304 </dl>
2305
2306 </dd>
2307 </dl>
2308
2309 <p><a name="libfaac"></a>
2310 </p><a name="libfaac-1"></a>
2311 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libfaac-1">8.3 libfaac</a></h2>
2312
2313 <p>libfaac AAC (Advanced Audio Coding) encoder wrapper.
2314 </p>
2315 <p>Requires the presence of the libfaac headers and library during
2316 configuration. You need to explicitly configure the build with
2317 <code>--enable-libfaac --enable-nonfree</code>.
2318 </p>
2319 <p>This encoder is considered to be of higher quality with respect to the
2320 <a href="#aacenc">the native experimental FFmpeg AAC encoder</a>.
2321 </p>
2322 <p>For more information see the libfaac project at
2323 <a href="http://www.audiocoding.com/faac.html/">http://www.audiocoding.com/faac.html/</a>.
2324 </p>
2325 <a name="Options-10"></a>
2326 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-10">8.3.1 Options</a></h3>
2327
2328 <p>The following shared FFmpeg codec options are recognized.
2329 </p>
2330 <p>The following options are supported by the libfaac wrapper. The
2331 <code>faac</code>-equivalent of the options are listed in parentheses.
2332 </p>
2333 <dl compact="compact">
2334 <dt> &lsquo;<samp>b (<em>-b</em>)</samp>&rsquo;</dt>
2335 <dd><p>Set bit rate in bits/s for ABR (Average Bit Rate) mode. If the bit rate
2336 is not explicitly specified, it is automatically set to a suitable
2337 value depending on the selected profile. <code>faac</code> bitrate is
2338 expressed in kilobits/s.
2339 </p>
2340 <p>Note that libfaac does not support CBR (Constant Bit Rate) but only
2341 ABR (Average Bit Rate).
2342 </p>
2343 <p>If VBR mode is enabled this option is ignored.
2344 </p>
2345 </dd>
2346 <dt> &lsquo;<samp>ar (<em>-R</em>)</samp>&rsquo;</dt>
2347 <dd><p>Set audio sampling rate (in Hz).
2348 </p>
2349 </dd>
2350 <dt> &lsquo;<samp>ac (<em>-c</em>)</samp>&rsquo;</dt>
2351 <dd><p>Set the number of audio channels.
2352 </p>
2353 </dd>
2354 <dt> &lsquo;<samp>cutoff (<em>-C</em>)</samp>&rsquo;</dt>
2355 <dd><p>Set cutoff frequency. If not specified (or explicitly set to 0) it
2356 will use a value automatically computed by the library. Default value
2357 is 0.
2358 </p>
2359 </dd>
2360 <dt> &lsquo;<samp>profile</samp>&rsquo;</dt>
2361 <dd><p>Set audio profile.
2362 </p>
2363 <p>The following profiles are recognized:
2364 </p><dl compact="compact">
2365 <dt> &lsquo;<samp>aac_main</samp>&rsquo;</dt>
2366 <dd><p>Main AAC (Main)
2367 </p>
2368 </dd>
2369 <dt> &lsquo;<samp>aac_low</samp>&rsquo;</dt>
2370 <dd><p>Low Complexity AAC (LC)
2371 </p>
2372 </dd>
2373 <dt> &lsquo;<samp>aac_ssr</samp>&rsquo;</dt>
2374 <dd><p>Scalable Sample Rate (SSR)
2375 </p>
2376 </dd>
2377 <dt> &lsquo;<samp>aac_ltp</samp>&rsquo;</dt>
2378 <dd><p>Long Term Prediction (LTP)
2379 </p></dd>
2380 </dl>
2381
2382 <p>If not specified it is set to &lsquo;<samp>aac_low</samp>&rsquo;.
2383 </p>
2384 </dd>
2385 <dt> &lsquo;<samp>flags +qscale</samp>&rsquo;</dt>
2386 <dd><p>Set constant quality VBR (Variable Bit Rate) mode.
2387 </p>
2388 </dd>
2389 <dt> &lsquo;<samp>global_quality</samp>&rsquo;</dt>
2390 <dd><p>Set quality in VBR mode as an integer number of lambda units.
2391 </p>
2392 <p>Only relevant when VBR mode is enabled with <code>flags +qscale</code>.  The
2393 value is converted to QP units by dividing it by <code>FF_QP2LAMBDA</code>,
2394 and used to set the quality value used by libfaac. A reasonable range
2395 for the option value in QP units is [10-500], the higher the value the
2396 higher the quality.
2397 </p>
2398 </dd>
2399 <dt> &lsquo;<samp>q (<em>-q</em>)</samp>&rsquo;</dt>
2400 <dd><p>Enable VBR mode when set to a non-negative value, and set constant
2401 quality value as a double floating point value in QP units.
2402 </p>
2403 <p>The value sets the quality value used by libfaac. A reasonable range
2404 for the option value is [10-500], the higher the value the higher the
2405 quality.
2406 </p>
2407 <p>This option is valid only using the <code>ffmpeg</code> command-line
2408 tool. For library interface users, use &lsquo;<samp>global_quality</samp>&rsquo;.
2409 </p></dd>
2410 </dl>
2411
2412 <a name="Examples-1"></a>
2413 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Examples-1">8.3.2 Examples</a></h3>
2414
2415 <ul>
2416 <li>
2417 Use <code>ffmpeg</code> to convert an audio file to ABR 128 kbps AAC in an M4A (MP4)
2418 container:
2419 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i input.wav -codec:a libfaac -b:a 128k -output.m4a
2420 </pre></td></tr></table>
2421
2422 </li><li>
2423 Use <code>ffmpeg</code> to convert an audio file to VBR AAC, using the
2424 LTP AAC profile:
2425 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i input.wav -c:a libfaac -profile:a aac_ltp -q:a 100 output.m4a
2426 </pre></td></tr></table>
2427 </li></ul>
2428
2429 <p><a name="libfdk_002daac_002denc"></a>
2430 </p><a name="libfdk_005faac"></a>
2431 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libfdk_005faac">8.4 libfdk_aac</a></h2>
2432
2433 <p>libfdk-aac AAC (Advanced Audio Coding) encoder wrapper.
2434 </p>
2435 <p>The libfdk-aac library is based on the Fraunhofer FDK AAC code from
2436 the Android project.
2437 </p>
2438 <p>Requires the presence of the libfdk-aac headers and library during
2439 configuration. You need to explicitly configure the build with
2440 <code>--enable-libfdk-aac</code>. The library is also incompatible with GPL,
2441 so if you allow the use of GPL, you should configure with
2442 <code>--enable-gpl --enable-nonfree --enable-libfdk-aac</code>.
2443 </p>
2444 <p>This encoder is considered to be of higher quality with respect to
2445 both <a href="#aacenc">the native experimental FFmpeg AAC encoder</a> and
2446 <a href="#libfaac">libfaac</a>.
2447 </p>
2448 <p>VBR encoding, enabled through the &lsquo;<samp>vbr</samp>&rsquo; or &lsquo;<samp>flags
2449 +qscale</samp>&rsquo; options, is experimental and only works with some
2450 combinations of parameters.
2451 </p>
2452 <p>For more information see the fdk-aac project at
2453 <a href="http://sourceforge.net/p/opencore-amr/fdk-aac/">http://sourceforge.net/p/opencore-amr/fdk-aac/</a>.
2454 </p>
2455 <a name="Options-5"></a>
2456 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-5">8.4.1 Options</a></h3>
2457
2458 <p>The following options are mapped on the shared FFmpeg codec options.
2459 </p>
2460 <dl compact="compact">
2461 <dt> &lsquo;<samp>b</samp>&rsquo;</dt>
2462 <dd><p>Set bit rate in bits/s. If the bitrate is not explicitly specified, it
2463 is automatically set to a suitable value depending on the selected
2464 profile.
2465 </p>
2466 <p>In case VBR mode is enabled the option is ignored.
2467 </p>
2468 </dd>
2469 <dt> &lsquo;<samp>ar</samp>&rsquo;</dt>
2470 <dd><p>Set audio sampling rate (in Hz).
2471 </p>
2472 </dd>
2473 <dt> &lsquo;<samp>channels</samp>&rsquo;</dt>
2474 <dd><p>Set the number of audio channels.
2475 </p>
2476 </dd>
2477 <dt> &lsquo;<samp>flags +qscale</samp>&rsquo;</dt>
2478 <dd><p>Enable fixed quality, VBR (Variable Bit Rate) mode.
2479 Note that VBR is implicitly enabled when the &lsquo;<samp>vbr</samp>&rsquo; value is
2480 positive.
2481 </p>
2482 </dd>
2483 <dt> &lsquo;<samp>cutoff</samp>&rsquo;</dt>
2484 <dd><p>Set cutoff frequency. If not specified (or explicitly set to 0) it
2485 will use a value automatically computed by the library. Default value
2486 is 0.
2487 </p>
2488 </dd>
2489 <dt> &lsquo;<samp>profile</samp>&rsquo;</dt>
2490 <dd><p>Set audio profile.
2491 </p>
2492 <p>The following profiles are recognized:
2493 </p><dl compact="compact">
2494 <dt> &lsquo;<samp>aac_low</samp>&rsquo;</dt>
2495 <dd><p>Low Complexity AAC (LC)
2496 </p>
2497 </dd>
2498 <dt> &lsquo;<samp>aac_he</samp>&rsquo;</dt>
2499 <dd><p>High Efficiency AAC (HE-AAC)
2500 </p>
2501 </dd>
2502 <dt> &lsquo;<samp>aac_he_v2</samp>&rsquo;</dt>
2503 <dd><p>High Efficiency AAC version 2 (HE-AACv2)
2504 </p>
2505 </dd>
2506 <dt> &lsquo;<samp>aac_ld</samp>&rsquo;</dt>
2507 <dd><p>Low Delay AAC (LD)
2508 </p>
2509 </dd>
2510 <dt> &lsquo;<samp>aac_eld</samp>&rsquo;</dt>
2511 <dd><p>Enhanced Low Delay AAC (ELD)
2512 </p></dd>
2513 </dl>
2514
2515 <p>If not specified it is set to &lsquo;<samp>aac_low</samp>&rsquo;.
2516 </p></dd>
2517 </dl>
2518
2519 <p>The following are private options of the libfdk_aac encoder.
2520 </p>
2521 <dl compact="compact">
2522 <dt> &lsquo;<samp>afterburner</samp>&rsquo;</dt>
2523 <dd><p>Enable afterburner feature if set to 1, disabled if set to 0. This
2524 improves the quality but also the required processing power.
2525 </p>
2526 <p>Default value is 1.
2527 </p>
2528 </dd>
2529 <dt> &lsquo;<samp>eld_sbr</samp>&rsquo;</dt>
2530 <dd><p>Enable SBR (Spectral Band Replication) for ELD if set to 1, disabled
2531 if set to 0.
2532 </p>
2533 <p>Default value is 0.
2534 </p>
2535 </dd>
2536 <dt> &lsquo;<samp>signaling</samp>&rsquo;</dt>
2537 <dd><p>Set SBR/PS signaling style.
2538 </p>
2539 <p>It can assume one of the following values:
2540 </p><dl compact="compact">
2541 <dt> &lsquo;<samp>default</samp>&rsquo;</dt>
2542 <dd><p>choose signaling implicitly (explicit hierarchical by default,
2543 implicit if global header is disabled)
2544 </p>
2545 </dd>
2546 <dt> &lsquo;<samp>implicit</samp>&rsquo;</dt>
2547 <dd><p>implicit backwards compatible signaling
2548 </p>
2549 </dd>
2550 <dt> &lsquo;<samp>explicit_sbr</samp>&rsquo;</dt>
2551 <dd><p>explicit SBR, implicit PS signaling
2552 </p>
2553 </dd>
2554 <dt> &lsquo;<samp>explicit_hierarchical</samp>&rsquo;</dt>
2555 <dd><p>explicit hierarchical signaling
2556 </p></dd>
2557 </dl>
2558
2559 <p>Default value is &lsquo;<samp>default</samp>&rsquo;.
2560 </p>
2561 </dd>
2562 <dt> &lsquo;<samp>latm</samp>&rsquo;</dt>
2563 <dd><p>Output LATM/LOAS encapsulated data if set to 1, disabled if set to 0.
2564 </p>
2565 <p>Default value is 0.
2566 </p>
2567 </dd>
2568 <dt> &lsquo;<samp>header_period</samp>&rsquo;</dt>
2569 <dd><p>Set StreamMuxConfig and PCE repetition period (in frames) for sending
2570 in-band configuration buffers within LATM/LOAS transport layer.
2571 </p>
2572 <p>Must be a 16-bits non-negative integer.
2573 </p>
2574 <p>Default value is 0.
2575 </p>
2576 </dd>
2577 <dt> &lsquo;<samp>vbr</samp>&rsquo;</dt>
2578 <dd><p>Set VBR mode, from 1 to 5. 1 is lowest quality (though still pretty
2579 good) and 5 is highest quality. A value of 0 will disable VBR, and CBR
2580 (Constant Bit Rate) is enabled.
2581 </p>
2582 <p>Currently only the &lsquo;<samp>aac_low</samp>&rsquo; profile supports VBR encoding.
2583 </p>
2584 <p>VBR modes 1-5 correspond to roughly the following average bit rates:
2585 </p>
2586 <dl compact="compact">
2587 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
2588 <dd><p>32 kbps/channel
2589 </p></dd>
2590 <dt> &lsquo;<samp>2</samp>&rsquo;</dt>
2591 <dd><p>40 kbps/channel
2592 </p></dd>
2593 <dt> &lsquo;<samp>3</samp>&rsquo;</dt>
2594 <dd><p>48-56 kbps/channel
2595 </p></dd>
2596 <dt> &lsquo;<samp>4</samp>&rsquo;</dt>
2597 <dd><p>64 kbps/channel
2598 </p></dd>
2599 <dt> &lsquo;<samp>5</samp>&rsquo;</dt>
2600 <dd><p>about 80-96 kbps/channel
2601 </p></dd>
2602 </dl>
2603
2604 <p>Default value is 0.
2605 </p></dd>
2606 </dl>
2607
2608 <a name="Examples-2"></a>
2609 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Examples-2">8.4.2 Examples</a></h3>
2610
2611 <ul>
2612 <li>
2613 Use <code>ffmpeg</code> to convert an audio file to VBR AAC in an M4A (MP4)
2614 container:
2615 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i input.wav -codec:a libfdk_aac -vbr 3 output.m4a
2616 </pre></td></tr></table>
2617
2618 </li><li>
2619 Use <code>ffmpeg</code> to convert an audio file to CBR 64k kbps AAC, using the
2620 High-Efficiency AAC profile:
2621 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i input.wav -c:a libfdk_aac -profile:a aac_he -b:a 64k output.m4a
2622 </pre></td></tr></table>
2623 </li></ul>
2624
2625 <p><a name="libmp3lame"></a>
2626 </p><a name="libmp3lame-1"></a>
2627 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libmp3lame-1">8.5 libmp3lame</a></h2>
2628
2629 <p>LAME (Lame Ain&rsquo;t an MP3 Encoder) MP3 encoder wrapper.
2630 </p>
2631 <p>Requires the presence of the libmp3lame headers and library during
2632 configuration. You need to explicitly configure the build with
2633 <code>--enable-libmp3lame</code>.
2634 </p>
2635 <p>See <a href="#libshine">libshine</a> for a fixed-point MP3 encoder, although with a
2636 lower quality.
2637 </p>
2638 <a name="Options-12"></a>
2639 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-12">8.5.1 Options</a></h3>
2640
2641 <p>The following options are supported by the libmp3lame wrapper. The
2642 <code>lame</code>-equivalent of the options are listed in parentheses.
2643 </p>
2644 <dl compact="compact">
2645 <dt> &lsquo;<samp>b (<em>-b</em>)</samp>&rsquo;</dt>
2646 <dd><p>Set bitrate expressed in bits/s for CBR or ABR. LAME <code>bitrate</code> is
2647 expressed in kilobits/s.
2648 </p>
2649 </dd>
2650 <dt> &lsquo;<samp>q (<em>-V</em>)</samp>&rsquo;</dt>
2651 <dd><p>Set constant quality setting for VBR. This option is valid only
2652 using the <code>ffmpeg</code> command-line tool. For library interface
2653 users, use &lsquo;<samp>global_quality</samp>&rsquo;.
2654 </p>
2655 </dd>
2656 <dt> &lsquo;<samp>compression_level (<em>-q</em>)</samp>&rsquo;</dt>
2657 <dd><p>Set algorithm quality. Valid arguments are integers in the 0-9 range,
2658 with 0 meaning highest quality but slowest, and 9 meaning fastest
2659 while producing the worst quality.
2660 </p>
2661 </dd>
2662 <dt> &lsquo;<samp>reservoir</samp>&rsquo;</dt>
2663 <dd><p>Enable use of bit reservoir when set to 1. Default value is 1. LAME
2664 has this enabled by default, but can be overriden by use
2665 &lsquo;<samp>--nores</samp>&rsquo; option.
2666 </p>
2667 </dd>
2668 <dt> &lsquo;<samp>joint_stereo (<em>-m j</em>)</samp>&rsquo;</dt>
2669 <dd><p>Enable the encoder to use (on a frame by frame basis) either L/R
2670 stereo or mid/side stereo. Default value is 1.
2671 </p>
2672 </dd>
2673 <dt> &lsquo;<samp>abr (<em>--abr</em>)</samp>&rsquo;</dt>
2674 <dd><p>Enable the encoder to use ABR when set to 1. The <code>lame</code>
2675 &lsquo;<samp>--abr</samp>&rsquo; sets the target bitrate, while this options only
2676 tells FFmpeg to use ABR still relies on &lsquo;<samp>b</samp>&rsquo; to set bitrate.
2677 </p>
2678 </dd>
2679 </dl>
2680
2681 <a name="libopencore_002damrnb-1"></a>
2682 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopencore_002damrnb-1">8.6 libopencore-amrnb</a></h2>
2683
2684 <p>OpenCORE Adaptive Multi-Rate Narrowband encoder.
2685 </p>
2686 <p>Requires the presence of the libopencore-amrnb headers and library during
2687 configuration. You need to explicitly configure the build with
2688 <code>--enable-libopencore-amrnb --enable-version3</code>.
2689 </p>
2690 <p>This is a mono-only encoder. Officially it only supports 8000Hz sample rate,
2691 but you can override it by setting &lsquo;<samp>strict</samp>&rsquo; to &lsquo;<samp>unofficial</samp>&rsquo; or
2692 lower.
2693 </p>
2694 <a name="Options-9"></a>
2695 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-9">8.6.1 Options</a></h3>
2696
2697 <dl compact="compact">
2698 <dt> &lsquo;<samp>b</samp>&rsquo;</dt>
2699 <dd><p>Set bitrate in bits per second. Only the following bitrates are supported,
2700 otherwise libavcodec will round to the nearest valid bitrate.
2701 </p>
2702 <dl compact="compact">
2703 <dt> &lsquo;<samp>4750</samp>&rsquo;</dt>
2704 <dt> &lsquo;<samp>5150</samp>&rsquo;</dt>
2705 <dt> &lsquo;<samp>5900</samp>&rsquo;</dt>
2706 <dt> &lsquo;<samp>6700</samp>&rsquo;</dt>
2707 <dt> &lsquo;<samp>7400</samp>&rsquo;</dt>
2708 <dt> &lsquo;<samp>7950</samp>&rsquo;</dt>
2709 <dt> &lsquo;<samp>10200</samp>&rsquo;</dt>
2710 <dt> &lsquo;<samp>12200</samp>&rsquo;</dt>
2711 </dl>
2712
2713 </dd>
2714 <dt> &lsquo;<samp>dtx</samp>&rsquo;</dt>
2715 <dd><p>Allow discontinuous transmission (generate comfort noise) when set to 1. The
2716 default value is 0 (disabled).
2717 </p>
2718 </dd>
2719 </dl>
2720
2721 <p><a name="libshine"></a>
2722 </p><a name="libshine-1"></a>
2723 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libshine-1">8.7 libshine</a></h2>
2724
2725 <p>Shine Fixed-Point MP3 encoder wrapper.
2726 </p>
2727 <p>Shine is a fixed-point MP3 encoder. It has a far better performance on
2728 platforms without an FPU, e.g. armel CPUs, and some phones and tablets.
2729 However, as it is more targeted on performance than quality, it is not on par
2730 with LAME and other production-grade encoders quality-wise. Also, according to
2731 the project&rsquo;s homepage, this encoder may not be free of bugs as the code was
2732 written a long time ago and the project was dead for at least 5 years.
2733 </p>
2734 <p>This encoder only supports stereo and mono input. This is also CBR-only.
2735 </p>
2736 <p>The original project (last updated in early 2007) is at
2737 <a href="http://sourceforge.net/projects/libshine-fxp/">http://sourceforge.net/projects/libshine-fxp/</a>. We only support the
2738 updated fork by the Savonet/Liquidsoap project at <a href="https://github.com/savonet/shine">https://github.com/savonet/shine</a>.
2739 </p>
2740 <p>Requires the presence of the libshine headers and library during
2741 configuration. You need to explicitly configure the build with
2742 <code>--enable-libshine</code>.
2743 </p>
2744 <p>See also <a href="#libmp3lame">libmp3lame</a>.
2745 </p>
2746 <a name="Options"></a>
2747 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options">8.7.1 Options</a></h3>
2748
2749 <p>The following options are supported by the libshine wrapper. The
2750 <code>shineenc</code>-equivalent of the options are listed in parentheses.
2751 </p>
2752 <dl compact="compact">
2753 <dt> &lsquo;<samp>b (<em>-b</em>)</samp>&rsquo;</dt>
2754 <dd><p>Set bitrate expressed in bits/s for CBR. <code>shineenc</code> &lsquo;<samp>-b</samp>&rsquo; option
2755 is expressed in kilobits/s.
2756 </p>
2757 </dd>
2758 </dl>
2759
2760 <a name="libtwolame"></a>
2761 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libtwolame">8.8 libtwolame</a></h2>
2762
2763 <p>TwoLAME MP2 encoder wrapper.
2764 </p>
2765 <p>Requires the presence of the libtwolame headers and library during
2766 configuration. You need to explicitly configure the build with
2767 <code>--enable-libtwolame</code>.
2768 </p>
2769 <a name="Options-1"></a>
2770 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-1">8.8.1 Options</a></h3>
2771
2772 <p>The following options are supported by the libtwolame wrapper. The
2773 <code>twolame</code>-equivalent options follow the FFmpeg ones and are in
2774 parentheses.
2775 </p>
2776 <dl compact="compact">
2777 <dt> &lsquo;<samp>b (<em>-b</em>)</samp>&rsquo;</dt>
2778 <dd><p>Set bitrate expressed in bits/s for CBR. <code>twolame</code> &lsquo;<samp>b</samp>&rsquo;
2779 option is expressed in kilobits/s. Default value is 128k.
2780 </p>
2781 </dd>
2782 <dt> &lsquo;<samp>q (<em>-V</em>)</samp>&rsquo;</dt>
2783 <dd><p>Set quality for experimental VBR support. Maximum value range is
2784 from -50 to 50, useful range is from -10 to 10. The higher the
2785 value, the better the quality. This option is valid only using the
2786 <code>ffmpeg</code> command-line tool. For library interface users,
2787 use &lsquo;<samp>global_quality</samp>&rsquo;.
2788 </p>
2789 </dd>
2790 <dt> &lsquo;<samp>mode (<em>--mode</em>)</samp>&rsquo;</dt>
2791 <dd><p>Set the mode of the resulting audio. Possible values:
2792 </p>
2793 <dl compact="compact">
2794 <dt> &lsquo;<samp>auto</samp>&rsquo;</dt>
2795 <dd><p>Choose mode automatically based on the input. This is the default.
2796 </p></dd>
2797 <dt> &lsquo;<samp>stereo</samp>&rsquo;</dt>
2798 <dd><p>Stereo
2799 </p></dd>
2800 <dt> &lsquo;<samp>joint_stereo</samp>&rsquo;</dt>
2801 <dd><p>Joint stereo
2802 </p></dd>
2803 <dt> &lsquo;<samp>dual_channel</samp>&rsquo;</dt>
2804 <dd><p>Dual channel
2805 </p></dd>
2806 <dt> &lsquo;<samp>mono</samp>&rsquo;</dt>
2807 <dd><p>Mono
2808 </p></dd>
2809 </dl>
2810
2811 </dd>
2812 <dt> &lsquo;<samp>psymodel (<em>--psyc-mode</em>)</samp>&rsquo;</dt>
2813 <dd><p>Set psychoacoustic model to use in encoding. The argument must be
2814 an integer between -1 and 4, inclusive. The higher the value, the
2815 better the quality. The default value is 3.
2816 </p>
2817 </dd>
2818 <dt> &lsquo;<samp>energy_levels (<em>--energy</em>)</samp>&rsquo;</dt>
2819 <dd><p>Enable energy levels extensions when set to 1. The default value is
2820 0 (disabled).
2821 </p>
2822 </dd>
2823 <dt> &lsquo;<samp>error_protection (<em>--protect</em>)</samp>&rsquo;</dt>
2824 <dd><p>Enable CRC error protection when set to 1. The default value is 0
2825 (disabled).
2826 </p>
2827 </dd>
2828 <dt> &lsquo;<samp>copyright (<em>--copyright</em>)</samp>&rsquo;</dt>
2829 <dd><p>Set MPEG audio copyright flag when set to 1. The default value is 0
2830 (disabled).
2831 </p>
2832 </dd>
2833 <dt> &lsquo;<samp>original (<em>--original</em>)</samp>&rsquo;</dt>
2834 <dd><p>Set MPEG audio original flag when set to 1. The default value is 0
2835 (disabled).
2836 </p>
2837 </dd>
2838 </dl>
2839
2840 <p><a name="libvo_002daacenc"></a>
2841 </p><a name="libvo_002daacenc-1"></a>
2842 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvo_002daacenc-1">8.9 libvo-aacenc</a></h2>
2843
2844 <p>VisualOn AAC encoder.
2845 </p>
2846 <p>Requires the presence of the libvo-aacenc headers and library during
2847 configuration. You need to explicitly configure the build with
2848 <code>--enable-libvo-aacenc --enable-version3</code>.
2849 </p>
2850 <p>This encoder is considered to be worse than the
2851 <a href="#aacenc">native experimental FFmpeg AAC encoder</a>, according to
2852 multiple sources.
2853 </p>
2854 <a name="Options-4"></a>
2855 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-4">8.9.1 Options</a></h3>
2856
2857 <p>The VisualOn AAC encoder only support encoding AAC-LC and up to 2
2858 channels. It is also CBR-only.
2859 </p>
2860 <dl compact="compact">
2861 <dt> &lsquo;<samp>b</samp>&rsquo;</dt>
2862 <dd><p>Set bit rate in bits/s.
2863 </p>
2864 </dd>
2865 </dl>
2866
2867 <a name="libvo_002damrwbenc"></a>
2868 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvo_002damrwbenc">8.10 libvo-amrwbenc</a></h2>
2869
2870 <p>VisualOn Adaptive Multi-Rate Wideband encoder.
2871 </p>
2872 <p>Requires the presence of the libvo-amrwbenc headers and library during
2873 configuration. You need to explicitly configure the build with
2874 <code>--enable-libvo-amrwbenc --enable-version3</code>.
2875 </p>
2876 <p>This is a mono-only encoder. Officially it only supports 16000Hz sample
2877 rate, but you can override it by setting &lsquo;<samp>strict</samp>&rsquo; to
2878 &lsquo;<samp>unofficial</samp>&rsquo; or lower.
2879 </p>
2880 <a name="Options-15"></a>
2881 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-15">8.10.1 Options</a></h3>
2882
2883 <dl compact="compact">
2884 <dt> &lsquo;<samp>b</samp>&rsquo;</dt>
2885 <dd><p>Set bitrate in bits/s. Only the following bitrates are supported, otherwise
2886 libavcodec will round to the nearest valid bitrate.
2887 </p>
2888 <dl compact="compact">
2889 <dt> &lsquo;<samp>6600</samp>&rsquo;</dt>
2890 <dt> &lsquo;<samp>8850</samp>&rsquo;</dt>
2891 <dt> &lsquo;<samp>12650</samp>&rsquo;</dt>
2892 <dt> &lsquo;<samp>14250</samp>&rsquo;</dt>
2893 <dt> &lsquo;<samp>15850</samp>&rsquo;</dt>
2894 <dt> &lsquo;<samp>18250</samp>&rsquo;</dt>
2895 <dt> &lsquo;<samp>19850</samp>&rsquo;</dt>
2896 <dt> &lsquo;<samp>23050</samp>&rsquo;</dt>
2897 <dt> &lsquo;<samp>23850</samp>&rsquo;</dt>
2898 </dl>
2899
2900 </dd>
2901 <dt> &lsquo;<samp>dtx</samp>&rsquo;</dt>
2902 <dd><p>Allow discontinuous transmission (generate comfort noise) when set to 1. The
2903 default value is 0 (disabled).
2904 </p>
2905 </dd>
2906 </dl>
2907
2908 <a name="libopus-1"></a>
2909 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libopus-1">8.11 libopus</a></h2>
2910
2911 <p>libopus Opus Interactive Audio Codec encoder wrapper.
2912 </p>
2913 <p>Requires the presence of the libopus headers and library during
2914 configuration. You need to explicitly configure the build with
2915 <code>--enable-libopus</code>.
2916 </p>
2917 <a name="Option-Mapping"></a>
2918 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Option-Mapping">8.11.1 Option Mapping</a></h3>
2919
2920 <p>Most libopus options are modeled after the <code>opusenc</code> utility from
2921 opus-tools. The following is an option mapping chart describing options
2922 supported by the libopus wrapper, and their <code>opusenc</code>-equivalent
2923 in parentheses.
2924 </p>
2925 <dl compact="compact">
2926 <dt> &lsquo;<samp>b (<em>bitrate</em>)</samp>&rsquo;</dt>
2927 <dd><p>Set the bit rate in bits/s.  FFmpeg&rsquo;s &lsquo;<samp>b</samp>&rsquo; option is
2928 expressed in bits/s, while <code>opusenc</code>&rsquo;s &lsquo;<samp>bitrate</samp>&rsquo; in
2929 kilobits/s.
2930 </p>
2931 </dd>
2932 <dt> &lsquo;<samp>vbr (<em>vbr</em>, <em>hard-cbr</em>, and <em>cvbr</em>)</samp>&rsquo;</dt>
2933 <dd><p>Set VBR mode. The FFmpeg &lsquo;<samp>vbr</samp>&rsquo; option has the following
2934 valid arguments, with the their <code>opusenc</code> equivalent options
2935 in parentheses:
2936 </p>
2937 <dl compact="compact">
2938 <dt> &lsquo;<samp>off (<em>hard-cbr</em>)</samp>&rsquo;</dt>
2939 <dd><p>Use constant bit rate encoding.
2940 </p>
2941 </dd>
2942 <dt> &lsquo;<samp>on (<em>vbr</em>)</samp>&rsquo;</dt>
2943 <dd><p>Use variable bit rate encoding (the default).
2944 </p>
2945 </dd>
2946 <dt> &lsquo;<samp>constrained (<em>cvbr</em>)</samp>&rsquo;</dt>
2947 <dd><p>Use constrained variable bit rate encoding.
2948 </p></dd>
2949 </dl>
2950
2951 </dd>
2952 <dt> &lsquo;<samp>compression_level (<em>comp</em>)</samp>&rsquo;</dt>
2953 <dd><p>Set encoding algorithm complexity. Valid options are integers in
2954 the 0-10 range. 0 gives the fastest encodes but lower quality, while 10
2955 gives the highest quality but slowest encoding. The default is 10.
2956 </p>
2957 </dd>
2958 <dt> &lsquo;<samp>frame_duration (<em>framesize</em>)</samp>&rsquo;</dt>
2959 <dd><p>Set maximum frame size, or duration of a frame in milliseconds. The
2960 argument must be exactly the following: 2.5, 5, 10, 20, 40, 60. Smaller
2961 frame sizes achieve lower latency but less quality at a given bitrate.
2962 Sizes greater than 20ms are only interesting at fairly low bitrates.
2963 The default is 20ms.
2964 </p>
2965 </dd>
2966 <dt> &lsquo;<samp>packet_loss (<em>expect-loss</em>)</samp>&rsquo;</dt>
2967 <dd><p>Set expected packet loss percentage. The default is 0.
2968 </p>
2969 </dd>
2970 <dt> &lsquo;<samp>application (N.A.)</samp>&rsquo;</dt>
2971 <dd><p>Set intended application type. Valid options are listed below:
2972 </p>
2973 <dl compact="compact">
2974 <dt> &lsquo;<samp>voip</samp>&rsquo;</dt>
2975 <dd><p>Favor improved speech intelligibility.
2976 </p></dd>
2977 <dt> &lsquo;<samp>audio</samp>&rsquo;</dt>
2978 <dd><p>Favor faithfulness to the input (the default).
2979 </p></dd>
2980 <dt> &lsquo;<samp>lowdelay</samp>&rsquo;</dt>
2981 <dd><p>Restrict to only the lowest delay modes.
2982 </p></dd>
2983 </dl>
2984
2985 </dd>
2986 <dt> &lsquo;<samp>cutoff (N.A.)</samp>&rsquo;</dt>
2987 <dd><p>Set cutoff bandwidth in Hz. The argument must be exactly one of the
2988 following: 4000, 6000, 8000, 12000, or 20000, corresponding to
2989 narrowband, mediumband, wideband, super wideband, and fullband
2990 respectively. The default is 0 (cutoff disabled).
2991 </p>
2992 </dd>
2993 </dl>
2994
2995 <a name="libvorbis"></a>
2996 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvorbis">8.12 libvorbis</a></h2>
2997
2998 <p>libvorbis encoder wrapper.
2999 </p>
3000 <p>Requires the presence of the libvorbisenc headers and library during
3001 configuration. You need to explicitly configure the build with
3002 <code>--enable-libvorbis</code>.
3003 </p>
3004 <a name="Options-16"></a>
3005 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-16">8.12.1 Options</a></h3>
3006
3007 <p>The following options are supported by the libvorbis wrapper. The
3008 <code>oggenc</code>-equivalent of the options are listed in parentheses.
3009 </p>
3010 <p>To get a more accurate and extensive documentation of the libvorbis
3011 options, consult the libvorbisenc&rsquo;s and <code>oggenc</code>&rsquo;s documentations.
3012 See <a href="http://xiph.org/vorbis/">http://xiph.org/vorbis/</a>,
3013 <a href="http://wiki.xiph.org/Vorbis-tools">http://wiki.xiph.org/Vorbis-tools</a>, and oggenc(1).
3014 </p>
3015 <dl compact="compact">
3016 <dt> &lsquo;<samp>b (<em>-b</em>)</samp>&rsquo;</dt>
3017 <dd><p>Set bitrate expressed in bits/s for ABR. <code>oggenc</code> &lsquo;<samp>-b</samp>&rsquo; is
3018 expressed in kilobits/s.
3019 </p>
3020 </dd>
3021 <dt> &lsquo;<samp>q (<em>-q</em>)</samp>&rsquo;</dt>
3022 <dd><p>Set constant quality setting for VBR. The value should be a float
3023 number in the range of -1.0 to 10.0. The higher the value, the better
3024 the quality. The default value is &lsquo;<samp>3.0</samp>&rsquo;.
3025 </p>
3026 <p>This option is valid only using the <code>ffmpeg</code> command-line tool.
3027 For library interface users, use &lsquo;<samp>global_quality</samp>&rsquo;.
3028 </p>
3029 </dd>
3030 <dt> &lsquo;<samp>cutoff (<em>--advanced-encode-option lowpass_frequency=N</em>)</samp>&rsquo;</dt>
3031 <dd><p>Set cutoff bandwidth in Hz, a value of 0 disables cutoff. <code>oggenc</code>&rsquo;s
3032 related option is expressed in kHz. The default value is &lsquo;<samp>0</samp>&rsquo; (cutoff
3033 disabled).
3034 </p>
3035 </dd>
3036 <dt> &lsquo;<samp>minrate (<em>-m</em>)</samp>&rsquo;</dt>
3037 <dd><p>Set minimum bitrate expressed in bits/s. <code>oggenc</code> &lsquo;<samp>-m</samp>&rsquo; is
3038 expressed in kilobits/s.
3039 </p>
3040 </dd>
3041 <dt> &lsquo;<samp>maxrate (<em>-M</em>)</samp>&rsquo;</dt>
3042 <dd><p>Set maximum bitrate expressed in bits/s. <code>oggenc</code> &lsquo;<samp>-M</samp>&rsquo; is
3043 expressed in kilobits/s. This only has effect on ABR mode.
3044 </p>
3045 </dd>
3046 <dt> &lsquo;<samp>iblock (<em>--advanced-encode-option impulse_noisetune=N</em>)</samp>&rsquo;</dt>
3047 <dd><p>Set noise floor bias for impulse blocks. The value is a float number from
3048 -15.0 to 0.0. A negative bias instructs the encoder to pay special attention
3049 to the crispness of transients in the encoded audio. The tradeoff for better
3050 transient response is a higher bitrate.
3051 </p>
3052 </dd>
3053 </dl>
3054
3055 <a name="libwavpack"></a>
3056 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libwavpack">8.13 libwavpack</a></h2>
3057
3058 <p>A wrapper providing WavPack encoding through libwavpack.
3059 </p>
3060 <p>Only lossless mode using 32-bit integer samples is supported currently.
3061 The &lsquo;<samp>compression_level</samp>&rsquo; option can be used to control speed vs.
3062 compression tradeoff, with the values mapped to libwavpack as follows:
3063 </p>
3064 <dl compact="compact">
3065 <dt> &lsquo;<samp>0</samp>&rsquo;</dt>
3066 <dd><p>Fast mode - corresponding to the wavpack &lsquo;<samp>-f</samp>&rsquo; option.
3067 </p>
3068 </dd>
3069 <dt> &lsquo;<samp>1</samp>&rsquo;</dt>
3070 <dd><p>Normal (default) settings.
3071 </p>
3072 </dd>
3073 <dt> &lsquo;<samp>2</samp>&rsquo;</dt>
3074 <dd><p>High quality - corresponding to the wavpack &lsquo;<samp>-h</samp>&rsquo; option.
3075 </p>
3076 </dd>
3077 <dt> &lsquo;<samp>3</samp>&rsquo;</dt>
3078 <dd><p>Very high quality - corresponding to the wavpack &lsquo;<samp>-hh</samp>&rsquo; option.
3079 </p>
3080 </dd>
3081 <dt> &lsquo;<samp>4-8</samp>&rsquo;</dt>
3082 <dd><p>Same as 3, but with extra processing enabled - corresponding to the wavpack
3083 &lsquo;<samp>-x</samp>&rsquo; option. I.e. 4 is the same as &lsquo;<samp>-x2</samp>&rsquo; and 8 is the same as
3084 &lsquo;<samp>-x6</samp>&rsquo;.
3085 </p>
3086 </dd>
3087 </dl>
3088
3089
3090 <a name="Video-Encoders"></a>
3091 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Video-Encoders">9. Video Encoders</a></h1>
3092
3093 <p>A description of some of the currently available video encoders
3094 follows.
3095 </p>
3096 <a name="libtheora"></a>
3097 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libtheora">9.1 libtheora</a></h2>
3098
3099 <p>libtheora Theora encoder wrapper.
3100 </p>
3101 <p>Requires the presence of the libtheora headers and library during
3102 configuration. You need to explicitly configure the build with
3103 <code>--enable-libtheora</code>.
3104 </p>
3105 <p>For more informations about the libtheora project see
3106 <a href="http://www.theora.org/">http://www.theora.org/</a>.
3107 </p>
3108 <a name="Options-14"></a>
3109 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-14">9.1.1 Options</a></h3>
3110
3111 <p>The following global options are mapped to internal libtheora options
3112 which affect the quality and the bitrate of the encoded stream.
3113 </p>
3114 <dl compact="compact">
3115 <dt> &lsquo;<samp>b</samp>&rsquo;</dt>
3116 <dd><p>Set the video bitrate in bit/s for CBR (Constant Bit Rate) mode.  In
3117 case VBR (Variable Bit Rate) mode is enabled this option is ignored.
3118 </p>
3119 </dd>
3120 <dt> &lsquo;<samp>flags</samp>&rsquo;</dt>
3121 <dd><p>Used to enable constant quality mode (VBR) encoding through the
3122 &lsquo;<samp>qscale</samp>&rsquo; flag, and to enable the <code>pass1</code> and <code>pass2</code>
3123 modes.
3124 </p>
3125 </dd>
3126 <dt> &lsquo;<samp>g</samp>&rsquo;</dt>
3127 <dd><p>Set the GOP size.
3128 </p>
3129 </dd>
3130 <dt> &lsquo;<samp>global_quality</samp>&rsquo;</dt>
3131 <dd><p>Set the global quality as an integer in lambda units.
3132 </p>
3133 <p>Only relevant when VBR mode is enabled with <code>flags +qscale</code>. The
3134 value is converted to QP units by dividing it by <code>FF_QP2LAMBDA</code>,
3135 clipped in the [0 - 10] range, and then multiplied by 6.3 to get a
3136 value in the native libtheora range [0-63]. A higher value corresponds
3137 to a higher quality.
3138 </p>
3139 </dd>
3140 <dt> &lsquo;<samp>q</samp>&rsquo;</dt>
3141 <dd><p>Enable VBR mode when set to a non-negative value, and set constant
3142 quality value as a double floating point value in QP units.
3143 </p>
3144 <p>The value is clipped in the [0-10] range, and then multiplied by 6.3
3145 to get a value in the native libtheora range [0-63].
3146 </p>
3147 <p>This option is valid only using the <code>ffmpeg</code> command-line
3148 tool. For library interface users, use &lsquo;<samp>global_quality</samp>&rsquo;.
3149 </p></dd>
3150 </dl>
3151
3152 <a name="Examples"></a>
3153 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Examples">9.1.2 Examples</a></h3>
3154
3155 <ul>
3156 <li>
3157 Set maximum constant quality (VBR) encoding with <code>ffmpeg</code>:
3158 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -codec:v libtheora -q:v 10 OUTPUT.ogg
3159 </pre></td></tr></table>
3160
3161 </li><li>
3162 Use <code>ffmpeg</code> to convert a CBR 1000 kbps Theora video stream:
3163 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -codec:v libtheora -b:v 1000k OUTPUT.ogg
3164 </pre></td></tr></table>
3165 </li></ul>
3166
3167 <a name="libvpx"></a>
3168 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libvpx">9.2 libvpx</a></h2>
3169
3170 <p>VP8 format supported through libvpx.
3171 </p>
3172 <p>Requires the presence of the libvpx headers and library during configuration.
3173 You need to explicitly configure the build with <code>--enable-libvpx</code>.
3174 </p>
3175 <a name="Options-3"></a>
3176 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-3">9.2.1 Options</a></h3>
3177
3178 <p>Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
3179 </p>
3180 <dl compact="compact">
3181 <dt> &lsquo;<samp>threads</samp>&rsquo;</dt>
3182 <dd><p>g_threads
3183 </p>
3184 </dd>
3185 <dt> &lsquo;<samp>profile</samp>&rsquo;</dt>
3186 <dd><p>g_profile
3187 </p>
3188 </dd>
3189 <dt> &lsquo;<samp>vb</samp>&rsquo;</dt>
3190 <dd><p>rc_target_bitrate
3191 </p>
3192 </dd>
3193 <dt> &lsquo;<samp>g</samp>&rsquo;</dt>
3194 <dd><p>kf_max_dist
3195 </p>
3196 </dd>
3197 <dt> &lsquo;<samp>keyint_min</samp>&rsquo;</dt>
3198 <dd><p>kf_min_dist
3199 </p>
3200 </dd>
3201 <dt> &lsquo;<samp>qmin</samp>&rsquo;</dt>
3202 <dd><p>rc_min_quantizer
3203 </p>
3204 </dd>
3205 <dt> &lsquo;<samp>qmax</samp>&rsquo;</dt>
3206 <dd><p>rc_max_quantizer
3207 </p>
3208 </dd>
3209 <dt> &lsquo;<samp>bufsize, vb</samp>&rsquo;</dt>
3210 <dd><p>rc_buf_sz
3211 <code>(bufsize * 1000 / vb)</code>
3212 </p>
3213 <p>rc_buf_optimal_sz
3214 <code>(bufsize * 1000 / vb * 5 / 6)</code>
3215 </p>
3216 </dd>
3217 <dt> &lsquo;<samp>rc_init_occupancy, vb</samp>&rsquo;</dt>
3218 <dd><p>rc_buf_initial_sz
3219 <code>(rc_init_occupancy * 1000 / vb)</code>
3220 </p>
3221 </dd>
3222 <dt> &lsquo;<samp>rc_buffer_aggressivity</samp>&rsquo;</dt>
3223 <dd><p>rc_undershoot_pct
3224 </p>
3225 </dd>
3226 <dt> &lsquo;<samp>skip_threshold</samp>&rsquo;</dt>
3227 <dd><p>rc_dropframe_thresh
3228 </p>
3229 </dd>
3230 <dt> &lsquo;<samp>qcomp</samp>&rsquo;</dt>
3231 <dd><p>rc_2pass_vbr_bias_pct
3232 </p>
3233 </dd>
3234 <dt> &lsquo;<samp>maxrate, vb</samp>&rsquo;</dt>
3235 <dd><p>rc_2pass_vbr_maxsection_pct
3236 <code>(maxrate * 100 / vb)</code>
3237 </p>
3238 </dd>
3239 <dt> &lsquo;<samp>minrate, vb</samp>&rsquo;</dt>
3240 <dd><p>rc_2pass_vbr_minsection_pct
3241 <code>(minrate * 100 / vb)</code>
3242 </p>
3243 </dd>
3244 <dt> &lsquo;<samp>minrate, maxrate, vb</samp>&rsquo;</dt>
3245 <dd><p><code>VPX_CBR</code>
3246 <code>(minrate == maxrate == vb)</code>
3247 </p>
3248 </dd>
3249 <dt> &lsquo;<samp>crf</samp>&rsquo;</dt>
3250 <dd><p><code>VPX_CQ</code>, <code>VP8E_SET_CQ_LEVEL</code>
3251 </p>
3252 </dd>
3253 <dt> &lsquo;<samp>quality</samp>&rsquo;</dt>
3254 <dd><dl compact="compact">
3255 <dt> &lsquo;<samp><var>best</var></samp>&rsquo;</dt>
3256 <dd><p><code>VPX_DL_BEST_QUALITY</code>
3257 </p></dd>
3258 <dt> &lsquo;<samp><var>good</var></samp>&rsquo;</dt>
3259 <dd><p><code>VPX_DL_GOOD_QUALITY</code>
3260 </p></dd>
3261 <dt> &lsquo;<samp><var>realtime</var></samp>&rsquo;</dt>
3262 <dd><p><code>VPX_DL_REALTIME</code>
3263 </p></dd>
3264 </dl>
3265
3266 </dd>
3267 <dt> &lsquo;<samp>speed</samp>&rsquo;</dt>
3268 <dd><p><code>VP8E_SET_CPUUSED</code>
3269 </p>
3270 </dd>
3271 <dt> &lsquo;<samp>nr</samp>&rsquo;</dt>
3272 <dd><p><code>VP8E_SET_NOISE_SENSITIVITY</code>
3273 </p>
3274 </dd>
3275 <dt> &lsquo;<samp>mb_threshold</samp>&rsquo;</dt>
3276 <dd><p><code>VP8E_SET_STATIC_THRESHOLD</code>
3277 </p>
3278 </dd>
3279 <dt> &lsquo;<samp>slices</samp>&rsquo;</dt>
3280 <dd><p><code>VP8E_SET_TOKEN_PARTITIONS</code>
3281 </p>
3282 </dd>
3283 <dt> &lsquo;<samp>max-intra-rate</samp>&rsquo;</dt>
3284 <dd><p><code>VP8E_SET_MAX_INTRA_BITRATE_PCT</code>
3285 </p>
3286 </dd>
3287 <dt> &lsquo;<samp>force_key_frames</samp>&rsquo;</dt>
3288 <dd><p><code>VPX_EFLAG_FORCE_KF</code>
3289 </p>
3290 </dd>
3291 <dt> &lsquo;<samp>Alternate reference frame related</samp>&rsquo;</dt>
3292 <dd><dl compact="compact">
3293 <dt> &lsquo;<samp>vp8flags altref</samp>&rsquo;</dt>
3294 <dd><p><code>VP8E_SET_ENABLEAUTOALTREF</code>
3295 </p></dd>
3296 <dt> &lsquo;<samp><var>arnr_max_frames</var></samp>&rsquo;</dt>
3297 <dd><p><code>VP8E_SET_ARNR_MAXFRAMES</code>
3298 </p></dd>
3299 <dt> &lsquo;<samp><var>arnr_type</var></samp>&rsquo;</dt>
3300 <dd><p><code>VP8E_SET_ARNR_TYPE</code>
3301 </p></dd>
3302 <dt> &lsquo;<samp><var>arnr_strength</var></samp>&rsquo;</dt>
3303 <dd><p><code>VP8E_SET_ARNR_STRENGTH</code>
3304 </p></dd>
3305 <dt> &lsquo;<samp><var>rc_lookahead</var></samp>&rsquo;</dt>
3306 <dd><p>g_lag_in_frames
3307 </p></dd>
3308 </dl>
3309
3310 </dd>
3311 <dt> &lsquo;<samp>vp8flags error_resilient</samp>&rsquo;</dt>
3312 <dd><p>g_error_resilient
3313 </p>
3314 </dd>
3315 </dl>
3316
3317 <p>For more information about libvpx see:
3318 <a href="http://www.webmproject.org/">http://www.webmproject.org/</a>
3319 </p>
3320 <a name="libx264"></a>
3321 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libx264">9.3 libx264</a></h2>
3322
3323 <p>x264 H.264/MPEG-4 AVC encoder wrapper.
3324 </p>
3325 <p>This encoder requires the presence of the libx264 headers and library
3326 during configuration. You need to explicitly configure the build with
3327 <code>--enable-libx264</code>.
3328 </p>
3329 <p>libx264 supports an impressive number of features, including 8x8 and
3330 4x4 adaptive spatial transform, adaptive B-frame placement, CAVLC/CABAC
3331 entropy coding, interlacing (MBAFF), lossless mode, psy optimizations
3332 for detail retention (adaptive quantization, psy-RD, psy-trellis).
3333 </p>
3334 <p>Many libx264 encoder options are mapped to FFmpeg global codec
3335 options, while unique encoder options are provided through private
3336 options. Additionally the &lsquo;<samp>x264opts</samp>&rsquo; and &lsquo;<samp>x264-params</samp>&rsquo;
3337 private options allows to pass a list of key=value tuples as accepted
3338 by the libx264 <code>x264_param_parse</code> function.
3339 </p>
3340 <p>The x264 project website is at
3341 <a href="http://www.videolan.org/developers/x264.html">http://www.videolan.org/developers/x264.html</a>.
3342 </p>
3343 <a name="Options-6"></a>
3344 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-6">9.3.1 Options</a></h3>
3345
3346 <p>The following options are supported by the libx264 wrapper. The
3347 <code>x264</code>-equivalent options or values are listed in parentheses
3348 for easy migration.
3349 </p>
3350 <p>To reduce the duplication of documentation, only the private options
3351 and some others requiring special attention are documented here. For
3352 the documentation of the undocumented generic options, see
3353 <a href="#codec_002doptions">the Codec Options chapter</a>.
3354 </p>
3355 <p>To get a more accurate and extensive documentation of the libx264
3356 options, invoke the command <code>x264 --full-help</code> or consult
3357 the libx264 documentation.
3358 </p>
3359 <dl compact="compact">
3360 <dt> &lsquo;<samp>b (<em>bitrate</em>)</samp>&rsquo;</dt>
3361 <dd><p>Set bitrate in bits/s. Note that FFmpeg&rsquo;s &lsquo;<samp>b</samp>&rsquo; option is
3362 expressed in bits/s, while <code>x264</code>&rsquo;s &lsquo;<samp>bitrate</samp>&rsquo; is in
3363 kilobits/s.
3364 </p>
3365 </dd>
3366 <dt> &lsquo;<samp>bf (<em>bframes</em>)</samp>&rsquo;</dt>
3367 <dt> &lsquo;<samp>g (<em>keyint</em>)</samp>&rsquo;</dt>
3368 <dt> &lsquo;<samp>qmax (<em>qpmax</em>)</samp>&rsquo;</dt>
3369 <dt> &lsquo;<samp>qmin (<em>qpmin</em>)</samp>&rsquo;</dt>
3370 <dt> &lsquo;<samp>qdiff (<em>qpstep</em>)</samp>&rsquo;</dt>
3371 <dt> &lsquo;<samp>qblur (<em>qblur</em>)</samp>&rsquo;</dt>
3372 <dt> &lsquo;<samp>qcomp (<em>qcomp</em>)</samp>&rsquo;</dt>
3373 <dt> &lsquo;<samp>refs (<em>ref</em>)</samp>&rsquo;</dt>
3374 <dt> &lsquo;<samp>sc_threshold (<em>scenecut</em>)</samp>&rsquo;</dt>
3375 <dt> &lsquo;<samp>trellis (<em>trellis</em>)</samp>&rsquo;</dt>
3376 <dt> &lsquo;<samp>nr  (<em>nr</em>)</samp>&rsquo;</dt>
3377 <dt> &lsquo;<samp>me_range (<em>merange</em>)</samp>&rsquo;</dt>
3378 <dt> &lsquo;<samp>me_method (<em>me</em>)</samp>&rsquo;</dt>
3379 <dd><p>Set motion estimation method. Possible values in the decreasing order
3380 of speed:
3381 </p>
3382 <dl compact="compact">
3383 <dt> &lsquo;<samp>dia (<em>dia</em>)</samp>&rsquo;</dt>
3384 <dt> &lsquo;<samp>epzs (<em>dia</em>)</samp>&rsquo;</dt>
3385 <dd><p>Diamond search with radius 1 (fastest). &lsquo;<samp>epzs</samp>&rsquo; is an alias for
3386 &lsquo;<samp>dia</samp>&rsquo;.
3387 </p></dd>
3388 <dt> &lsquo;<samp>hex (<em>hex</em>)</samp>&rsquo;</dt>
3389 <dd><p>Hexagonal search with radius 2.
3390 </p></dd>
3391 <dt> &lsquo;<samp>umh (<em>umh</em>)</samp>&rsquo;</dt>
3392 <dd><p>Uneven multi-hexagon search.
3393 </p></dd>
3394 <dt> &lsquo;<samp>esa (<em>esa</em>)</samp>&rsquo;</dt>
3395 <dd><p>Exhaustive search.
3396 </p></dd>
3397 <dt> &lsquo;<samp>tesa (<em>tesa</em>)</samp>&rsquo;</dt>
3398 <dd><p>Hadamard exhaustive search (slowest).
3399 </p></dd>
3400 </dl>
3401
3402 </dd>
3403 <dt> &lsquo;<samp>subq (<em>subme</em>)</samp>&rsquo;</dt>
3404 <dt> &lsquo;<samp>b_strategy (<em>b-adapt</em>)</samp>&rsquo;</dt>
3405 <dt> &lsquo;<samp>keyint_min (<em>min-keyint</em>)</samp>&rsquo;</dt>
3406 <dt> &lsquo;<samp>coder</samp>&rsquo;</dt>
3407 <dd><p>Set entropy encoder. Possible values:
3408 </p>
3409 <dl compact="compact">
3410 <dt> &lsquo;<samp>ac</samp>&rsquo;</dt>
3411 <dd><p>Enable CABAC.
3412 </p>
3413 </dd>
3414 <dt> &lsquo;<samp>vlc</samp>&rsquo;</dt>
3415 <dd><p>Enable CAVLC and disable CABAC. It generates the same effect as
3416 <code>x264</code>&rsquo;s &lsquo;<samp>--no-cabac</samp>&rsquo; option.
3417 </p></dd>
3418 </dl>
3419
3420 </dd>
3421 <dt> &lsquo;<samp>cmp</samp>&rsquo;</dt>
3422 <dd><p>Set full pixel motion estimation comparation algorithm. Possible values:
3423 </p>
3424 <dl compact="compact">
3425 <dt> &lsquo;<samp>chroma</samp>&rsquo;</dt>
3426 <dd><p>Enable chroma in motion estimation.
3427 </p>
3428 </dd>
3429 <dt> &lsquo;<samp>sad</samp>&rsquo;</dt>
3430 <dd><p>Ignore chroma in motion estimation. It generates the same effect as
3431 <code>x264</code>&rsquo;s &lsquo;<samp>--no-chroma-me</samp>&rsquo; option.
3432 </p></dd>
3433 </dl>
3434
3435 </dd>
3436 <dt> &lsquo;<samp>threads (<em>threads</em>)</samp>&rsquo;</dt>
3437 <dt> &lsquo;<samp>thread_type</samp>&rsquo;</dt>
3438 <dd><p>Set multithreading technique. Possible values:
3439 </p>
3440 <dl compact="compact">
3441 <dt> &lsquo;<samp>slice</samp>&rsquo;</dt>
3442 <dd><p>Slice-based multithreading. It generates the same effect as
3443 <code>x264</code>&rsquo;s &lsquo;<samp>--sliced-threads</samp>&rsquo; option.
3444 </p></dd>
3445 <dt> &lsquo;<samp>frame</samp>&rsquo;</dt>
3446 <dd><p>Frame-based multithreading.
3447 </p></dd>
3448 </dl>
3449
3450 </dd>
3451 <dt> &lsquo;<samp>flags</samp>&rsquo;</dt>
3452 <dd><p>Set encoding flags. It can be used to disable closed GOP and enable
3453 open GOP by setting it to <code>-cgop</code>. The result is similar to
3454 the behavior of <code>x264</code>&rsquo;s &lsquo;<samp>--open-gop</samp>&rsquo; option.
3455 </p>
3456 </dd>
3457 <dt> &lsquo;<samp>rc_init_occupancy (<em>vbv-init</em>)</samp>&rsquo;</dt>
3458 <dt> &lsquo;<samp>preset (<em>preset</em>)</samp>&rsquo;</dt>
3459 <dd><p>Set the encoding preset.
3460 </p>
3461 </dd>
3462 <dt> &lsquo;<samp>tune (<em>tune</em>)</samp>&rsquo;</dt>
3463 <dd><p>Set tuning of the encoding params.
3464 </p>
3465 </dd>
3466 <dt> &lsquo;<samp>profile (<em>profile</em>)</samp>&rsquo;</dt>
3467 <dd><p>Set profile restrictions.
3468 </p>
3469 </dd>
3470 <dt> &lsquo;<samp>fastfirstpass</samp>&rsquo;</dt>
3471 <dd><p>Enable fast settings when encoding first pass, when set to 1. When set
3472 to 0, it has the same effect of <code>x264</code>&rsquo;s
3473 &lsquo;<samp>--slow-firstpass</samp>&rsquo; option.
3474 </p>
3475 </dd>
3476 <dt> &lsquo;<samp>crf (<em>crf</em>)</samp>&rsquo;</dt>
3477 <dd><p>Set the quality for constant quality mode.
3478 </p>
3479 </dd>
3480 <dt> &lsquo;<samp>crf_max (<em>crf-max</em>)</samp>&rsquo;</dt>
3481 <dd><p>In CRF mode, prevents VBV from lowering quality beyond this point.
3482 </p>
3483 </dd>
3484 <dt> &lsquo;<samp>qp (<em>qp</em>)</samp>&rsquo;</dt>
3485 <dd><p>Set constant quantization rate control method parameter.
3486 </p>
3487 </dd>
3488 <dt> &lsquo;<samp>aq-mode (<em>aq-mode</em>)</samp>&rsquo;</dt>
3489 <dd><p>Set AQ method. Possible values:
3490 </p>
3491 <dl compact="compact">
3492 <dt> &lsquo;<samp>none (<em>0</em>)</samp>&rsquo;</dt>
3493 <dd><p>Disabled.
3494 </p>
3495 </dd>
3496 <dt> &lsquo;<samp>variance (<em>1</em>)</samp>&rsquo;</dt>
3497 <dd><p>Variance AQ (complexity mask).
3498 </p>
3499 </dd>
3500 <dt> &lsquo;<samp>autovariance (<em>2</em>)</samp>&rsquo;</dt>
3501 <dd><p>Auto-variance AQ (experimental).
3502 </p></dd>
3503 </dl>
3504
3505 </dd>
3506 <dt> &lsquo;<samp>aq-strength (<em>aq-strength</em>)</samp>&rsquo;</dt>
3507 <dd><p>Set AQ strength, reduce blocking and blurring in flat and textured areas.
3508 </p>
3509 </dd>
3510 <dt> &lsquo;<samp>psy</samp>&rsquo;</dt>
3511 <dd><p>Use psychovisual optimizations when set to 1. When set to 0, it has the
3512 same effect as <code>x264</code>&rsquo;s &lsquo;<samp>--no-psy</samp>&rsquo; option.
3513 </p>
3514 </dd>
3515 <dt> &lsquo;<samp>psy-rd  (<em>psy-rd</em>)</samp>&rsquo;</dt>
3516 <dd><p>Set strength of psychovisual optimization, in
3517 <var>psy-rd</var>:<var>psy-trellis</var> format.
3518 </p>
3519 </dd>
3520 <dt> &lsquo;<samp>rc-lookahead (<em>rc-lookahead</em>)</samp>&rsquo;</dt>
3521 <dd><p>Set number of frames to look ahead for frametype and ratecontrol.
3522 </p>
3523 </dd>
3524 <dt> &lsquo;<samp>weightb</samp>&rsquo;</dt>
3525 <dd><p>Enable weighted prediction for B-frames when set to 1. When set to 0,
3526 it has the same effect as <code>x264</code>&rsquo;s &lsquo;<samp>--no-weightb</samp>&rsquo; option.
3527 </p>
3528 </dd>
3529 <dt> &lsquo;<samp>weightp (<em>weightp</em>)</samp>&rsquo;</dt>
3530 <dd><p>Set weighted prediction method for P-frames. Possible values:
3531 </p>
3532 <dl compact="compact">
3533 <dt> &lsquo;<samp>none (<em>0</em>)</samp>&rsquo;</dt>
3534 <dd><p>Disabled
3535 </p></dd>
3536 <dt> &lsquo;<samp>simple (<em>1</em>)</samp>&rsquo;</dt>
3537 <dd><p>Enable only weighted refs
3538 </p></dd>
3539 <dt> &lsquo;<samp>smart (<em>2</em>)</samp>&rsquo;</dt>
3540 <dd><p>Enable both weighted refs and duplicates
3541 </p></dd>
3542 </dl>
3543
3544 </dd>
3545 <dt> &lsquo;<samp>ssim (<em>ssim</em>)</samp>&rsquo;</dt>
3546 <dd><p>Enable calculation and printing SSIM stats after the encoding.
3547 </p>
3548 </dd>
3549 <dt> &lsquo;<samp>intra-refresh (<em>intra-refresh</em>)</samp>&rsquo;</dt>
3550 <dd><p>Enable the use of Periodic Intra Refresh instead of IDR frames when set
3551 to 1.
3552 </p>
3553 </dd>
3554 <dt> &lsquo;<samp>bluray-compat (<em>bluray-compat</em>)</samp>&rsquo;</dt>
3555 <dd><p>Configure the encoder to be compatible with the bluray standard.
3556 It is a shorthand for setting &quot;bluray-compat=1 force-cfr=1&quot;.
3557 </p>
3558 </dd>
3559 <dt> &lsquo;<samp>b-bias (<em>b-bias</em>)</samp>&rsquo;</dt>
3560 <dd><p>Set the influence on how often B-frames are used.
3561 </p>
3562 </dd>
3563 <dt> &lsquo;<samp>b-pyramid (<em>b-pyramid</em>)</samp>&rsquo;</dt>
3564 <dd><p>Set method for keeping of some B-frames as references. Possible values:
3565 </p>
3566 <dl compact="compact">
3567 <dt> &lsquo;<samp>none (<em>none</em>)</samp>&rsquo;</dt>
3568 <dd><p>Disabled.
3569 </p></dd>
3570 <dt> &lsquo;<samp>strict (<em>strict</em>)</samp>&rsquo;</dt>
3571 <dd><p>Strictly hierarchical pyramid.
3572 </p></dd>
3573 <dt> &lsquo;<samp>normal (<em>normal</em>)</samp>&rsquo;</dt>
3574 <dd><p>Non-strict (not Blu-ray compatible).
3575 </p></dd>
3576 </dl>
3577
3578 </dd>
3579 <dt> &lsquo;<samp>mixed-refs</samp>&rsquo;</dt>
3580 <dd><p>Enable the use of one reference per partition, as opposed to one
3581 reference per macroblock when set to 1. When set to 0, it has the
3582 same effect as <code>x264</code>&rsquo;s &lsquo;<samp>--no-mixed-refs</samp>&rsquo; option.
3583 </p>
3584 </dd>
3585 <dt> &lsquo;<samp>8x8dct</samp>&rsquo;</dt>
3586 <dd><p>Enable adaptive spatial transform (high profile 8x8 transform)
3587 when set to 1. When set to 0, it has the same effect as
3588 <code>x264</code>&rsquo;s &lsquo;<samp>--no-8x8dct</samp>&rsquo; option.
3589 </p>
3590 </dd>
3591 <dt> &lsquo;<samp>fast-pskip</samp>&rsquo;</dt>
3592 <dd><p>Enable early SKIP detection on P-frames when set to 1. When set
3593 to 0, it has the same effect as <code>x264</code>&rsquo;s
3594 &lsquo;<samp>--no-fast-pskip</samp>&rsquo; option.
3595 </p>
3596 </dd>
3597 <dt> &lsquo;<samp>aud (<em>aud</em>)</samp>&rsquo;</dt>
3598 <dd><p>Enable use of access unit delimiters when set to 1.
3599 </p>
3600 </dd>
3601 <dt> &lsquo;<samp>mbtree</samp>&rsquo;</dt>
3602 <dd><p>Enable use macroblock tree ratecontrol when set to 1. When set
3603 to 0, it has the same effect as <code>x264</code>&rsquo;s
3604 &lsquo;<samp>--no-mbtree</samp>&rsquo; option.
3605 </p>
3606 </dd>
3607 <dt> &lsquo;<samp>deblock (<em>deblock</em>)</samp>&rsquo;</dt>
3608 <dd><p>Set loop filter parameters, in <var>alpha</var>:<var>beta</var> form.
3609 </p>
3610 </dd>
3611 <dt> &lsquo;<samp>cplxblur (<em>cplxblur</em>)</samp>&rsquo;</dt>
3612 <dd><p>Set fluctuations reduction in QP (before curve compression).
3613 </p>
3614 </dd>
3615 <dt> &lsquo;<samp>partitions (<em>partitions</em>)</samp>&rsquo;</dt>
3616 <dd><p>Set partitions to consider as a comma-separated list of. Possible
3617 values in the list:
3618 </p>
3619 <dl compact="compact">
3620 <dt> &lsquo;<samp>p8x8</samp>&rsquo;</dt>
3621 <dd><p>8x8 P-frame partition.
3622 </p></dd>
3623 <dt> &lsquo;<samp>p4x4</samp>&rsquo;</dt>
3624 <dd><p>4x4 P-frame partition.
3625 </p></dd>
3626 <dt> &lsquo;<samp>b8x8</samp>&rsquo;</dt>
3627 <dd><p>4x4 B-frame partition.
3628 </p></dd>
3629 <dt> &lsquo;<samp>i8x8</samp>&rsquo;</dt>
3630 <dd><p>8x8 I-frame partition.
3631 </p></dd>
3632 <dt> &lsquo;<samp>i4x4</samp>&rsquo;</dt>
3633 <dd><p>4x4 I-frame partition.
3634 (Enabling &lsquo;<samp>p4x4</samp>&rsquo; requires &lsquo;<samp>p8x8</samp>&rsquo; to be enabled. Enabling
3635 &lsquo;<samp>i8x8</samp>&rsquo; requires adaptive spatial transform (&lsquo;<samp>8x8dct</samp>&rsquo;
3636 option) to be enabled.)
3637 </p></dd>
3638 <dt> &lsquo;<samp>none (<em>none</em>)</samp>&rsquo;</dt>
3639 <dd><p>Do not consider any partitions.
3640 </p></dd>
3641 <dt> &lsquo;<samp>all (<em>all</em>)</samp>&rsquo;</dt>
3642 <dd><p>Consider every partition.
3643 </p></dd>
3644 </dl>
3645
3646 </dd>
3647 <dt> &lsquo;<samp>direct-pred (<em>direct</em>)</samp>&rsquo;</dt>
3648 <dd><p>Set direct MV prediction mode. Possible values:
3649 </p>
3650 <dl compact="compact">
3651 <dt> &lsquo;<samp>none (<em>none</em>)</samp>&rsquo;</dt>
3652 <dd><p>Disable MV prediction.
3653 </p></dd>
3654 <dt> &lsquo;<samp>spatial (<em>spatial</em>)</samp>&rsquo;</dt>
3655 <dd><p>Enable spatial predicting.
3656 </p></dd>
3657 <dt> &lsquo;<samp>temporal (<em>temporal</em>)</samp>&rsquo;</dt>
3658 <dd><p>Enable temporal predicting.
3659 </p></dd>
3660 <dt> &lsquo;<samp>auto (<em>auto</em>)</samp>&rsquo;</dt>
3661 <dd><p>Automatically decided.
3662 </p></dd>
3663 </dl>
3664
3665 </dd>
3666 <dt> &lsquo;<samp>slice-max-size (<em>slice-max-size</em>)</samp>&rsquo;</dt>
3667 <dd><p>Set the limit of the size of each slice in bytes. If not specified
3668 but RTP payload size (&lsquo;<samp>ps</samp>&rsquo;) is specified, that is used.
3669 </p>
3670 </dd>
3671 <dt> &lsquo;<samp>stats (<em>stats</em>)</samp>&rsquo;</dt>
3672 <dd><p>Set the file name for multi-pass stats.
3673 </p>
3674 </dd>
3675 <dt> &lsquo;<samp>nal-hrd (<em>nal-hrd</em>)</samp>&rsquo;</dt>
3676 <dd><p>Set signal HRD information (requires &lsquo;<samp>vbv-bufsize</samp>&rsquo; to be set).
3677 Possible values:
3678 </p>
3679 <dl compact="compact">
3680 <dt> &lsquo;<samp>none (<em>none</em>)</samp>&rsquo;</dt>
3681 <dd><p>Disable HRD information signaling.
3682 </p></dd>
3683 <dt> &lsquo;<samp>vbr (<em>vbr</em>)</samp>&rsquo;</dt>
3684 <dd><p>Variable bit rate.
3685 </p></dd>
3686 <dt> &lsquo;<samp>cbr (<em>cbr</em>)</samp>&rsquo;</dt>
3687 <dd><p>Constant bit rate (not allowed in MP4 container).
3688 </p></dd>
3689 </dl>
3690
3691 </dd>
3692 <dt> &lsquo;<samp>x264opts (N.A.)</samp>&rsquo;</dt>
3693 <dd><p>Set any x264 option, see <code>x264 --fullhelp</code> for a list.
3694 </p>
3695 <p>Argument is a list of <var>key</var>=<var>value</var> couples separated by
3696 &quot;:&quot;. In <var>filter</var> and <var>psy-rd</var> options that use &quot;:&quot; as a separator
3697 themselves, use &quot;,&quot; instead. They accept it as well since long ago but this
3698 is kept undocumented for some reason.
3699 </p>
3700 <p>For example to specify libx264 encoding options with <code>ffmpeg</code>:
3701 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
3702 </pre></td></tr></table>
3703
3704 </dd>
3705 <dt> &lsquo;<samp>x264-params (N.A.)</samp>&rsquo;</dt>
3706 <dd><p>Override the x264 configuration using a :-separated list of key=value
3707 parameters.
3708 </p>
3709 <p>This option is functionally the same as the &lsquo;<samp>x264opts</samp>&rsquo;, but is
3710 duplicated for compability with the Libav fork.
3711 </p>
3712 <p>For example to specify libx264 encoding options with <code>ffmpeg</code>:
3713 </p><table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
3714 cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
3715 no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
3716 </pre></td></tr></table>
3717 </dd>
3718 </dl>
3719
3720 <p>Encoding ffpresets for common usages are provided so they can be used with the
3721 general presets system (e.g. passing the &lsquo;<samp>pre</samp>&rsquo; option).
3722 </p>
3723 <a name="libxvid"></a>
3724 <h2 class="section"><a href="ffmpeg-codecs.html#toc-libxvid">9.4 libxvid</a></h2>
3725
3726 <p>Xvid MPEG-4 Part 2 encoder wrapper.
3727 </p>
3728 <p>This encoder requires the presence of the libxvidcore headers and library
3729 during configuration. You need to explicitly configure the build with
3730 <code>--enable-libxvid --enable-gpl</code>.
3731 </p>
3732 <p>The native <code>mpeg4</code> encoder supports the MPEG-4 Part 2 format, so
3733 users can encode to this format without this library.
3734 </p>
3735 <a name="Options-2"></a>
3736 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Options-2">9.4.1 Options</a></h3>
3737
3738 <p>The following options are supported by the libxvid wrapper. Some of
3739 the following options are listed but are not documented, and
3740 correspond to shared codec options. See <a href="#codec_002doptions">the Codec Options chapter</a> for their documentation. The other shared options
3741 which are not listed have no effect for the libxvid encoder.
3742 </p>
3743 <dl compact="compact">
3744 <dt> &lsquo;<samp>b</samp>&rsquo;</dt>
3745 <dt> &lsquo;<samp>g</samp>&rsquo;</dt>
3746 <dt> &lsquo;<samp>qmin</samp>&rsquo;</dt>
3747 <dt> &lsquo;<samp>qmax</samp>&rsquo;</dt>
3748 <dt> &lsquo;<samp>mpeg_quant</samp>&rsquo;</dt>
3749 <dt> &lsquo;<samp>threads</samp>&rsquo;</dt>
3750 <dt> &lsquo;<samp>bf</samp>&rsquo;</dt>
3751 <dt> &lsquo;<samp>b_qfactor</samp>&rsquo;</dt>
3752 <dt> &lsquo;<samp>b_qoffset</samp>&rsquo;</dt>
3753 <dt> &lsquo;<samp>flags</samp>&rsquo;</dt>
3754 <dd><p>Set specific encoding flags. Possible values:
3755 </p>
3756 <dl compact="compact">
3757 <dt> &lsquo;<samp>mv4</samp>&rsquo;</dt>
3758 <dd><p>Use four motion vector by macroblock.
3759 </p>
3760 </dd>
3761 <dt> &lsquo;<samp>aic</samp>&rsquo;</dt>
3762 <dd><p>Enable high quality AC prediction.
3763 </p>
3764 </dd>
3765 <dt> &lsquo;<samp>gray</samp>&rsquo;</dt>
3766 <dd><p>Only encode grayscale.
3767 </p>
3768 </dd>
3769 <dt> &lsquo;<samp>gmc</samp>&rsquo;</dt>
3770 <dd><p>Enable the use of global motion compensation (GMC).
3771 </p>
3772 </dd>
3773 <dt> &lsquo;<samp>qpel</samp>&rsquo;</dt>
3774 <dd><p>Enable quarter-pixel motion compensation.
3775 </p>
3776 </dd>
3777 <dt> &lsquo;<samp>cgop</samp>&rsquo;</dt>
3778 <dd><p>Enable closed GOP.
3779 </p>
3780 </dd>
3781 <dt> &lsquo;<samp>global_header</samp>&rsquo;</dt>
3782 <dd><p>Place global headers in extradata instead of every keyframe.
3783 </p>
3784 </dd>
3785 </dl>
3786
3787 </dd>
3788 <dt> &lsquo;<samp>trellis</samp>&rsquo;</dt>
3789 <dt> &lsquo;<samp>me_method</samp>&rsquo;</dt>
3790 <dd><p>Set motion estimation method. Possible values in decreasing order of
3791 speed and increasing order of quality:
3792 </p>
3793 <dl compact="compact">
3794 <dt> &lsquo;<samp>zero</samp>&rsquo;</dt>
3795 <dd><p>Use no motion estimation (default).
3796 </p>
3797 </dd>
3798 <dt> &lsquo;<samp>phods</samp>&rsquo;</dt>
3799 <dt> &lsquo;<samp>x1</samp>&rsquo;</dt>
3800 <dt> &lsquo;<samp>log</samp>&rsquo;</dt>
3801 <dd><p>Enable advanced diamond zonal search for 16x16 blocks and half-pixel
3802 refinement for 16x16 blocks. &lsquo;<samp>x1</samp>&rsquo; and &lsquo;<samp>log</samp>&rsquo; are aliases for
3803 &lsquo;<samp>phods</samp>&rsquo;.
3804 </p>
3805 </dd>
3806 <dt> &lsquo;<samp>epzs</samp>&rsquo;</dt>
3807 <dd><p>Enable all of the things described above, plus advanced diamond zonal
3808 search for 8x8 blocks, half-pixel refinement for 8x8 blocks, and motion
3809 estimation on chroma planes.
3810 </p>
3811 </dd>
3812 <dt> &lsquo;<samp>full</samp>&rsquo;</dt>
3813 <dd><p>Enable all of the things described above, plus extended 16x16 and 8x8
3814 blocks search.
3815 </p></dd>
3816 </dl>
3817
3818 </dd>
3819 <dt> &lsquo;<samp>mbd</samp>&rsquo;</dt>
3820 <dd><p>Set macroblock decision algorithm. Possible values in the increasing
3821 order of quality:
3822 </p>
3823 <dl compact="compact">
3824 <dt> &lsquo;<samp>simple</samp>&rsquo;</dt>
3825 <dd><p>Use macroblock comparing function algorithm (default).
3826 </p>
3827 </dd>
3828 <dt> &lsquo;<samp>bits</samp>&rsquo;</dt>
3829 <dd><p>Enable rate distortion-based half pixel and quarter pixel refinement for
3830 16x16 blocks.
3831 </p>
3832 </dd>
3833 <dt> &lsquo;<samp>rd</samp>&rsquo;</dt>
3834 <dd><p>Enable all of the things described above, plus rate distortion-based
3835 half pixel and quarter pixel refinement for 8x8 blocks, and rate
3836 distortion-based search using square pattern.
3837 </p></dd>
3838 </dl>
3839
3840 </dd>
3841 <dt> &lsquo;<samp>lumi_aq</samp>&rsquo;</dt>
3842 <dd><p>Enable lumi masking adaptive quantization when set to 1. Default is 0
3843 (disabled).
3844 </p>
3845 </dd>
3846 <dt> &lsquo;<samp>variance_aq</samp>&rsquo;</dt>
3847 <dd><p>Enable variance adaptive quantization when set to 1. Default is 0
3848 (disabled).
3849 </p>
3850 <p>When combined with &lsquo;<samp>lumi_aq</samp>&rsquo;, the resulting quality will not
3851 be better than any of the two specified individually. In other
3852 words, the resulting quality will be the worse one of the two
3853 effects.
3854 </p>
3855 </dd>
3856 <dt> &lsquo;<samp>ssim</samp>&rsquo;</dt>
3857 <dd><p>Set structural similarity (SSIM) displaying method. Possible values:
3858 </p>
3859 <dl compact="compact">
3860 <dt> &lsquo;<samp>off</samp>&rsquo;</dt>
3861 <dd><p>Disable displaying of SSIM information.
3862 </p>
3863 </dd>
3864 <dt> &lsquo;<samp>avg</samp>&rsquo;</dt>
3865 <dd><p>Output average SSIM at the end of encoding to stdout. The format of
3866 showing the average SSIM is:
3867 </p>
3868 <table><tr><td>&nbsp;</td><td><pre class="example">Average SSIM: %f
3869 </pre></td></tr></table>
3870
3871 <p>For users who are not familiar with C, %f means a float number, or
3872 a decimal (e.g. 0.939232).
3873 </p>
3874 </dd>
3875 <dt> &lsquo;<samp>frame</samp>&rsquo;</dt>
3876 <dd><p>Output both per-frame SSIM data during encoding and average SSIM at
3877 the end of encoding to stdout. The format of per-frame information
3878 is:
3879 </p>
3880 <table><tr><td>&nbsp;</td><td><pre class="example">       SSIM: avg: %1.3f min: %1.3f max: %1.3f
3881 </pre></td></tr></table>
3882
3883 <p>For users who are not familiar with C, %1.3f means a float number
3884 rounded to 3 digits after the dot (e.g. 0.932).
3885 </p>
3886 </dd>
3887 </dl>
3888
3889 </dd>
3890 <dt> &lsquo;<samp>ssim_acc</samp>&rsquo;</dt>
3891 <dd><p>Set SSIM accuracy. Valid options are integers within the range of
3892 0-4, while 0 gives the most accurate result and 4 computes the
3893 fastest.
3894 </p>
3895 </dd>
3896 </dl>
3897
3898 <a name="png"></a>
3899 <h2 class="section"><a href="ffmpeg-codecs.html#toc-png">9.5 png</a></h2>
3900
3901 <p>PNG image encoder.
3902 </p>
3903 <a name="Private-options"></a>
3904 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Private-options">9.5.1 Private options</a></h3>
3905
3906 <dl compact="compact">
3907 <dt> &lsquo;<samp>dpi <var>integer</var></samp>&rsquo;</dt>
3908 <dd><p>Set physical density of pixels, in dots per inch, unset by default
3909 </p></dd>
3910 <dt> &lsquo;<samp>dpm <var>integer</var></samp>&rsquo;</dt>
3911 <dd><p>Set physical density of pixels, in dots per meter, unset by default
3912 </p></dd>
3913 </dl>
3914
3915 <a name="ProRes"></a>
3916 <h2 class="section"><a href="ffmpeg-codecs.html#toc-ProRes">9.6 ProRes</a></h2>
3917
3918 <p>Apple ProRes encoder.
3919 </p>
3920 <p>FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
3921 The used encoder can be choosen with the <code>-vcodec</code> option.
3922 </p>
3923 <a name="Private-Options-for-prores_002dks"></a>
3924 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Private-Options-for-prores_002dks">9.6.1 Private Options for prores-ks</a></h3>
3925
3926 <dl compact="compact">
3927 <dt> &lsquo;<samp>profile <var>integer</var></samp>&rsquo;</dt>
3928 <dd><p>Select the ProRes profile to encode
3929 </p><dl compact="compact">
3930 <dt> &lsquo;<samp>proxy</samp>&rsquo;</dt>
3931 <dt> &lsquo;<samp>lt</samp>&rsquo;</dt>
3932 <dt> &lsquo;<samp>standard</samp>&rsquo;</dt>
3933 <dt> &lsquo;<samp>hq</samp>&rsquo;</dt>
3934 <dt> &lsquo;<samp>4444</samp>&rsquo;</dt>
3935 </dl>
3936
3937 </dd>
3938 <dt> &lsquo;<samp>quant_mat <var>integer</var></samp>&rsquo;</dt>
3939 <dd><p>Select quantization matrix.
3940 </p><dl compact="compact">
3941 <dt> &lsquo;<samp>auto</samp>&rsquo;</dt>
3942 <dt> &lsquo;<samp>default</samp>&rsquo;</dt>
3943 <dt> &lsquo;<samp>proxy</samp>&rsquo;</dt>
3944 <dt> &lsquo;<samp>lt</samp>&rsquo;</dt>
3945 <dt> &lsquo;<samp>standard</samp>&rsquo;</dt>
3946 <dt> &lsquo;<samp>hq</samp>&rsquo;</dt>
3947 </dl>
3948 <p>If set to <var>auto</var>, the matrix matching the profile will be picked.
3949 If not set, the matrix providing the highest quality, <var>default</var>, will be
3950 picked.
3951 </p>
3952 </dd>
3953 <dt> &lsquo;<samp>bits_per_mb <var>integer</var></samp>&rsquo;</dt>
3954 <dd><p>How many bits to allot for coding one macroblock. Different profiles use
3955 between 200 and 2400 bits per macroblock, the maximum is 8000.
3956 </p>
3957 </dd>
3958 <dt> &lsquo;<samp>mbs_per_slice <var>integer</var></samp>&rsquo;</dt>
3959 <dd><p>Number of macroblocks in each slice (1-8); the default value (8)
3960 should be good in almost all situations.
3961 </p>
3962 </dd>
3963 <dt> &lsquo;<samp>vendor <var>string</var></samp>&rsquo;</dt>
3964 <dd><p>Override the 4-byte vendor ID.
3965 A custom vendor ID like <var>apl0</var> would claim the stream was produced by
3966 the Apple encoder.
3967 </p>
3968 </dd>
3969 <dt> &lsquo;<samp>alpha_bits <var>integer</var></samp>&rsquo;</dt>
3970 <dd><p>Specify number of bits for alpha component.
3971 Possible values are <var>0</var>, <var>8</var> and <var>16</var>.
3972 Use <var>0</var> to disable alpha plane coding.
3973 </p>
3974 </dd>
3975 </dl>
3976
3977 <a name="Speed-considerations"></a>
3978 <h3 class="subsection"><a href="ffmpeg-codecs.html#toc-Speed-considerations">9.6.2 Speed considerations</a></h3>
3979
3980 <p>In the default mode of operation the encoder has to honor frame constraints
3981 (i.e. not produc frames with size bigger than requested) while still making
3982 output picture as good as possible.
3983 A frame containing a lot of small details is harder to compress and the encoder
3984 would spend more time searching for appropriate quantizers for each slice.
3985 </p>
3986 <p>Setting a higher &lsquo;<samp>bits_per_mb</samp>&rsquo; limit will improve the speed.
3987 </p>
3988 <p>For the fastest encoding speed set the &lsquo;<samp>qscale</samp>&rsquo; parameter (4 is the
3989 recommended value) and do not set a size constraint.
3990 </p>
3991
3992 <a name="See-Also"></a>
3993 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-See-Also">10. See Also</a></h1>
3994
3995 <p><a href="ffmpeg.html">ffmpeg</a>, <a href="ffplay.html">ffplay</a>, <a href="ffprobe.html">ffprobe</a>, <a href="ffserver.html">ffserver</a>,
3996 <a href="libavcodec.html">libavcodec</a>
3997 </p>
3998
3999 <a name="Authors"></a>
4000 <h1 class="chapter"><a href="ffmpeg-codecs.html#toc-Authors">11. Authors</a></h1>
4001
4002 <p>The FFmpeg developers.
4003 </p>
4004 <p>For details about the authorship, see the Git history of the project
4005 (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
4006 <code>git log</code> in the FFmpeg source directory, or browsing the
4007 online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>.
4008 </p>
4009 <p>Maintainers for the specific components are listed in the file
4010 &lsquo;<tt>MAINTAINERS</tt>&rsquo; in the source code tree.
4011 </p>
4012
4013 <footer class="footer pagination-right">
4014 <span class="label label-info">This document was generated by <em>Kyle Schwarz</em> on <em>December 14, 2013</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.</span></footer></div></div></body>