]> git.sesse.net Git - casparcg/blob - ffmpeg 0.7/doc/faq.html
2.0.2: INFO TEMPLATE works on both compressed and uncompressed templates.
[casparcg] / ffmpeg 0.7 / doc / faq.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
2 <html>
3 <!-- Created on June 10, 2011 by texi2html 1.82
4 texi2html was written by: 
5             Lionel Cons <Lionel.Cons@cern.ch> (original author)
6             Karl Berry  <karl@freefriends.org>
7             Olaf Bachmann <obachman@mathematik.uni-kl.de>
8             and many others.
9 Maintained by: Many creative people.
10 Send bugs and suggestions to <texi2html-bug@nongnu.org>
11 -->
12 <head>
13 <title>FFmpeg FAQ</title>
14
15 <meta name="description" content="FFmpeg FAQ">
16 <meta name="keywords" content="FFmpeg FAQ">
17 <meta name="resource-type" content="document">
18 <meta name="distribution" content="global">
19 <meta name="Generator" content="texi2html 1.82">
20 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
21 <style type="text/css">
22 <!--
23 a.summary-letter {text-decoration: none}
24 blockquote.smallquotation {font-size: smaller}
25 pre.display {font-family: serif}
26 pre.format {font-family: serif}
27 pre.menu-comment {font-family: serif}
28 pre.menu-preformatted {font-family: serif}
29 pre.smalldisplay {font-family: serif; font-size: smaller}
30 pre.smallexample {font-size: smaller}
31 pre.smallformat {font-family: serif; font-size: smaller}
32 pre.smalllisp {font-size: smaller}
33 span.roman {font-family:serif; font-weight:normal;}
34 span.sansserif {font-family:sans-serif; font-weight:normal;}
35 ul.toc {list-style: none}
36 -->
37 </style>
38
39
40 </head>
41
42 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
43
44 <a name="SEC_Top"></a>
45 <h1 class="settitle">FFmpeg FAQ</h1>
46
47 <a name="SEC_Contents"></a>
48 <h1>Table of Contents</h1>
49 <div class="contents">
50
51 <ul class="toc">
52   <li><a name="toc-General-Questions" href="#General-Questions">1. General Questions</a>
53   <ul class="toc">
54     <li><a name="toc-When-will-the-next-FFmpeg-version-be-released_003f-_002f-Why-are-FFmpeg-releases-so-few-and-far-between_003f" href="#When-will-the-next-FFmpeg-version-be-released_003f-_002f-Why-are-FFmpeg-releases-so-few-and-far-between_003f">1.1 When will the next FFmpeg version be released? / Why are FFmpeg releases so few and far between?</a></li>
55     <li><a name="toc-I-have-a-problem-with-an-old-version-of-FFmpeg_003b-where-should-I-report-it_003f" href="#I-have-a-problem-with-an-old-version-of-FFmpeg_003b-where-should-I-report-it_003f">1.2 I have a problem with an old version of FFmpeg; where should I report it?</a></li>
56     <li><a name="toc-Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f" href="#Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f">1.3 Why doesn&rsquo;t FFmpeg support feature [xyz]?</a></li>
57     <li><a name="toc-FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f" href="#FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f">1.4 FFmpeg does not support codec XXX. Can you include a Windows DLL loader to support it?</a></li>
58     <li><a name="toc-My-bug-report_002fmail-to-ffmpeg_002ddevel_002fuser-has-not-received-any-replies_002e" href="#My-bug-report_002fmail-to-ffmpeg_002ddevel_002fuser-has-not-received-any-replies_002e">1.5 My bug report/mail to ffmpeg-devel/user has not received any replies.</a></li>
59     <li><a name="toc-Is-there-a-forum-for-FFmpeg_003f-I-do-not-like-mailing-lists_002e" href="#Is-there-a-forum-for-FFmpeg_003f-I-do-not-like-mailing-lists_002e">1.6 Is there a forum for FFmpeg? I do not like mailing lists.</a></li>
60     <li><a name="toc-I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e" href="#I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e">1.7 I cannot read this file although this format seems to be supported by ffmpeg.</a></li>
61     <li><a name="toc-Which-codecs-are-supported-by-Windows_003f" href="#Which-codecs-are-supported-by-Windows_003f">1.8 Which codecs are supported by Windows?</a></li>
62   </ul></li>
63   <li><a name="toc-Compilation" href="#Compilation">2. Compilation</a>
64   <ul class="toc">
65     <li><a name="toc-error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027" href="#error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027">2.1 <code>error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'</code></a></li>
66   </ul></li>
67   <li><a name="toc-Usage" href="#Usage">3. Usage</a>
68   <ul class="toc">
69     <li><a name="toc-ffmpeg-does-not-work_003b-what-is-wrong_003f" href="#ffmpeg-does-not-work_003b-what-is-wrong_003f">3.1 ffmpeg does not work; what is wrong?</a></li>
70     <li><a name="toc-How-do-I-encode-single-pictures-into-movies_003f" href="#How-do-I-encode-single-pictures-into-movies_003f">3.2 How do I encode single pictures into movies?</a></li>
71     <li><a name="toc-How-do-I-encode-movie-to-single-pictures_003f" href="#How-do-I-encode-movie-to-single-pictures_003f">3.3 How do I encode movie to single pictures?</a></li>
72     <li><a name="toc-Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f" href="#Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f">3.4 Why do I see a slight quality degradation with multithreaded MPEG* encoding?</a></li>
73     <li><a name="toc-How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f" href="#How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f">3.5 How can I read from the standard input or write to the standard output?</a></li>
74     <li><a name="toc-_002df-jpeg-doesn_0027t-work_002e" href="#g_t_002df-jpeg-doesn_0027t-work_002e">3.6 -f jpeg doesn&rsquo;t work.</a></li>
75     <li><a name="toc-Why-can-I-not-change-the-framerate_003f" href="#Why-can-I-not-change-the-framerate_003f">3.7 Why can I not change the framerate?</a></li>
76     <li><a name="toc-How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f" href="#How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f">3.8 How do I encode Xvid or DivX video with ffmpeg?</a></li>
77     <li><a name="toc-How-do-I-encode-videos-which-play-on-the-iPod_003f" href="#How-do-I-encode-videos-which-play-on-the-iPod_003f">3.9 How do I encode videos which play on the iPod?</a></li>
78     <li><a name="toc-How-do-I-encode-videos-which-play-on-the-PSP_003f" href="#How-do-I-encode-videos-which-play-on-the-PSP_003f">3.10 How do I encode videos which play on the PSP?</a></li>
79     <li><a name="toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f" href="#Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f">3.11 Which are good parameters for encoding high quality MPEG-4?</a></li>
80     <li><a name="toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f" href="#Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f">3.12 Which are good parameters for encoding high quality MPEG-1/MPEG-2?</a></li>
81     <li><a name="toc-Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f" href="#Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f">3.13 Interlaced video looks very bad when encoded with ffmpeg, what is wrong?</a></li>
82     <li><a name="toc-How-can-I-read-DirectShow-files_003f" href="#How-can-I-read-DirectShow-files_003f">3.14 How can I read DirectShow files?</a></li>
83     <li><a name="toc-How-can-I-join-video-files_003f" href="#How-can-I-join-video-files_003f">3.15 How can I join video files?</a></li>
84     <li><a name="toc-The-ffmpeg-program-does-not-respect-the-_002dmaxrate-setting_002c-some-frames-are-bigger-than-maxrate_002ffps_002e" href="#The-ffmpeg-program-does-not-respect-the-_002dmaxrate-setting_002c-some-frames-are-bigger-than-maxrate_002ffps_002e">3.16 The ffmpeg program does not respect the -maxrate setting, some frames are bigger than maxrate/fps.</a></li>
85     <li><a name="toc-I-want-CBR_002c-but-no-matter-what-I-do-frame-sizes-differ_002e" href="#I-want-CBR_002c-but-no-matter-what-I-do-frame-sizes-differ_002e">3.17 I want CBR, but no matter what I do frame sizes differ.</a></li>
86     <li><a name="toc-How-do-I-check-if-a-stream-is-CBR_003f" href="#How-do-I-check-if-a-stream-is-CBR_003f">3.18 How do I check if a stream is CBR?</a></li>
87   </ul></li>
88   <li><a name="toc-Development" href="#Development">4. Development</a>
89   <ul class="toc">
90     <li><a name="toc-Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f" href="#Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f">4.1 Are there examples illustrating how to use the FFmpeg libraries, particularly libavcodec and libavformat?</a></li>
91     <li><a name="toc-Can-you-support-my-C-compiler-XXX_003f" href="#Can-you-support-my-C-compiler-XXX_003f">4.2 Can you support my C compiler XXX?</a></li>
92     <li><a name="toc-Is-Microsoft-Visual-C_002b_002b-supported_003f" href="#Is-Microsoft-Visual-C_002b_002b-supported_003f">4.3 Is Microsoft Visual C++ supported?</a></li>
93     <li><a name="toc-Can-I-use-FFmpeg-or-libavcodec-under-Windows_003f" href="#Can-I-use-FFmpeg-or-libavcodec-under-Windows_003f">4.4 Can I use FFmpeg or libavcodec under Windows?</a></li>
94     <li><a name="toc-Can-you-add-automake_002c-libtool-or-autoconf-support_003f" href="#Can-you-add-automake_002c-libtool-or-autoconf-support_003f">4.5 Can you add automake, libtool or autoconf support?</a></li>
95     <li><a name="toc-Why-not-rewrite-ffmpeg-in-object_002doriented-C_002b_002b_003f" href="#Why-not-rewrite-ffmpeg-in-object_002doriented-C_002b_002b_003f">4.6 Why not rewrite ffmpeg in object-oriented C++?</a></li>
96     <li><a name="toc-Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f" href="#Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f">4.7 Why are the ffmpeg programs devoid of debugging symbols?</a></li>
97     <li><a name="toc-I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f" href="#I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f">4.8 I do not like the LGPL, can I contribute code under the GPL instead?</a></li>
98     <li><a name="toc-I-want-to-compile-xyz_002ec-alone-but-my-compiler-produced-many-errors_002e" href="#I-want-to-compile-xyz_002ec-alone-but-my-compiler-produced-many-errors_002e">4.9 I want to compile xyz.c alone but my compiler produced many errors.</a></li>
99     <li><a name="toc-I_0027m-using-libavcodec-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e" href="#I_0027m-using-libavcodec-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e">4.10 I&rsquo;m using libavcodec from within my C++ application but the linker complains about missing symbols which seem to be available.</a></li>
100     <li><a name="toc-I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f" href="#I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f">4.11 I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?</a></li>
101     <li><a name="toc-I-get-_0022No-compatible-shell-script-interpreter-found_002e_0022-in-MSys_002e" href="#I-get-_0022No-compatible-shell-script-interpreter-found_002e_0022-in-MSys_002e">4.12 I get &quot;No compatible shell script interpreter found.&quot; in MSys.</a></li>
102     <li><a name="toc-I-get-_0022_002e_002fconfigure_003a-line-_003cxxx_003e_003a-pr_003a-command-not-found_0022-in-MSys_002e" href="#I-get-_0022_002e_002fconfigure_003a-line-_003cxxx_003e_003a-pr_003a-command-not-found_0022-in-MSys_002e">4.13 I get &quot;./configure: line &lt;xxx&gt;: pr: command not found&quot; in MSys.</a></li>
103     <li><a name="toc-Where-can-I-find-libav_002a-headers-for-Pascal_002fDelphi_003f" href="#Where-can-I-find-libav_002a-headers-for-Pascal_002fDelphi_003f">4.14 Where can I find libav* headers for Pascal/Delphi?</a></li>
104     <li><a name="toc-Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f" href="#Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f">4.15 Where is the documentation about ffv1, msmpeg4, asv1, 4xm?</a></li>
105     <li><a name="toc-How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f" href="#How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f">4.16 How do I feed H.263-RTP (and other codecs in RTP) to libavcodec?</a></li>
106     <li><a name="toc-AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-framerate_002e" href="#AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-framerate_002e">4.17 AVStream.r_frame_rate is wrong, it is much larger than the framerate.</a></li>
107   </ul>
108 </li>
109 </ul>
110 </div>
111
112 <hr size="1">
113 <a name="General-Questions"></a>
114 <h1 class="chapter"><a href="faq.html#toc-General-Questions">1. General Questions</a></h1>
115
116 <a name="When-will-the-next-FFmpeg-version-be-released_003f-_002f-Why-are-FFmpeg-releases-so-few-and-far-between_003f"></a>
117 <h2 class="section"><a href="faq.html#toc-When-will-the-next-FFmpeg-version-be-released_003f-_002f-Why-are-FFmpeg-releases-so-few-and-far-between_003f">1.1 When will the next FFmpeg version be released? / Why are FFmpeg releases so few and far between?</a></h2>
118
119 <p>Like most open source projects FFmpeg suffers from a certain lack of
120 manpower. For this reason the developers have to prioritize the work
121 they do and putting out releases is not at the top of the list, fixing
122 bugs and reviewing patches takes precedence. Please don&rsquo;t complain or
123 request more timely and/or frequent releases unless you are willing to
124 help out creating them.
125 </p>
126 <a name="I-have-a-problem-with-an-old-version-of-FFmpeg_003b-where-should-I-report-it_003f"></a>
127 <h2 class="section"><a href="faq.html#toc-I-have-a-problem-with-an-old-version-of-FFmpeg_003b-where-should-I-report-it_003f">1.2 I have a problem with an old version of FFmpeg; where should I report it?</a></h2>
128 <p>Nowhere. We do not support old FFmpeg versions in any way, we simply lack
129 the time, motivation and manpower to do so. If you have a problem with an
130 old version of FFmpeg, upgrade to the latest git snapshot. If you
131 still experience the problem, then you can report it according to the
132 guidelines in <a href="http://ffmpeg.org/bugreports.html">http://ffmpeg.org/bugreports.html</a>.
133 </p>
134 <a name="Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f"></a>
135 <h2 class="section"><a href="faq.html#toc-Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f">1.3 Why doesn&rsquo;t FFmpeg support feature [xyz]?</a></h2>
136
137 <p>Because no one has taken on that task yet. FFmpeg development is
138 driven by the tasks that are important to the individual developers.
139 If there is a feature that is important to you, the best way to get
140 it implemented is to undertake the task yourself or sponsor a developer.
141 </p>
142 <a name="FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f"></a>
143 <h2 class="section"><a href="faq.html#toc-FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f">1.4 FFmpeg does not support codec XXX. Can you include a Windows DLL loader to support it?</a></h2>
144
145 <p>No. Windows DLLs are not portable, bloated and often slow.
146 Moreover FFmpeg strives to support all codecs natively.
147 A DLL loader is not conducive to that goal.
148 </p>
149 <a name="My-bug-report_002fmail-to-ffmpeg_002ddevel_002fuser-has-not-received-any-replies_002e"></a>
150 <h2 class="section"><a href="faq.html#toc-My-bug-report_002fmail-to-ffmpeg_002ddevel_002fuser-has-not-received-any-replies_002e">1.5 My bug report/mail to ffmpeg-devel/user has not received any replies.</a></h2>
151
152 <p>Likely reasons
153 </p><ul>
154 <li> We are busy and haven&rsquo;t had time yet to read your report or
155 investigate the issue.
156 </li><li> You didn&rsquo;t follow <a href="http://ffmpeg.org/bugreports.html">http://ffmpeg.org/bugreports.html</a>.
157 </li><li> You didn&rsquo;t use git HEAD.
158 </li><li> You reported a segmentation fault without gdb output.
159 </li><li> You describe a problem but not how to reproduce it.
160 </li><li> It&rsquo;s unclear if you use ffmpeg as command line tool or use
161 libav* from another application.
162 </li><li> You speak about a video having problems on playback but
163 not what you use to play it.
164 </li><li> We have no faint clue what you are talking about besides
165 that it is related to FFmpeg.
166 </li></ul>
167
168 <a name="Is-there-a-forum-for-FFmpeg_003f-I-do-not-like-mailing-lists_002e"></a>
169 <h2 class="section"><a href="faq.html#toc-Is-there-a-forum-for-FFmpeg_003f-I-do-not-like-mailing-lists_002e">1.6 Is there a forum for FFmpeg? I do not like mailing lists.</a></h2>
170
171 <p>You may view our mailing lists with a more forum-alike look here:
172 <a href="http://dir.gmane.org/gmane.comp.video.ffmpeg.user">http://dir.gmane.org/gmane.comp.video.ffmpeg.user</a>,
173 but, if you post, please remember that our mailing list rules still apply there.
174 </p>
175 <a name="I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e"></a>
176 <h2 class="section"><a href="faq.html#toc-I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e">1.7 I cannot read this file although this format seems to be supported by ffmpeg.</a></h2>
177
178 <p>Even if ffmpeg can read the container format, it may not support all its
179 codecs. Please consult the supported codec list in the ffmpeg
180 documentation.
181 </p>
182 <a name="Which-codecs-are-supported-by-Windows_003f"></a>
183 <h2 class="section"><a href="faq.html#toc-Which-codecs-are-supported-by-Windows_003f">1.8 Which codecs are supported by Windows?</a></h2>
184
185 <p>Windows does not support standard formats like MPEG very well, unless you
186 install some additional codecs.
187 </p>
188 <p>The following list of video codecs should work on most Windows systems:
189 </p><dl compact="compact">
190 <dt> &lsquo;<samp>msmpeg4v2</samp>&rsquo;</dt>
191 <dd><p>.avi/.asf
192 </p></dd>
193 <dt> &lsquo;<samp>msmpeg4</samp>&rsquo;</dt>
194 <dd><p>.asf only
195 </p></dd>
196 <dt> &lsquo;<samp>wmv1</samp>&rsquo;</dt>
197 <dd><p>.asf only
198 </p></dd>
199 <dt> &lsquo;<samp>wmv2</samp>&rsquo;</dt>
200 <dd><p>.asf only
201 </p></dd>
202 <dt> &lsquo;<samp>mpeg4</samp>&rsquo;</dt>
203 <dd><p>Only if you have some MPEG-4 codec like ffdshow or Xvid installed.
204 </p></dd>
205 <dt> &lsquo;<samp>mpeg1video</samp>&rsquo;</dt>
206 <dd><p>.mpg only
207 </p></dd>
208 </dl>
209 <p>Note, ASF files often have .wmv or .wma extensions in Windows. It should also
210 be mentioned that Microsoft claims a patent on the ASF format, and may sue
211 or threaten users who create ASF files with non-Microsoft software. It is
212 strongly advised to avoid ASF where possible.
213 </p>
214 <p>The following list of audio codecs should work on most Windows systems:
215 </p><dl compact="compact">
216 <dt> &lsquo;<samp>adpcm_ima_wav</samp>&rsquo;</dt>
217 <dt> &lsquo;<samp>adpcm_ms</samp>&rsquo;</dt>
218 <dt> &lsquo;<samp>pcm_s16le</samp>&rsquo;</dt>
219 <dd><p>always
220 </p></dd>
221 <dt> &lsquo;<samp>libmp3lame</samp>&rsquo;</dt>
222 <dd><p>If some MP3 codec like LAME is installed.
223 </p></dd>
224 </dl>
225
226
227 <a name="Compilation"></a>
228 <h1 class="chapter"><a href="faq.html#toc-Compilation">2. Compilation</a></h1>
229
230 <a name="error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027"></a>
231 <h2 class="section"><a href="faq.html#toc-error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027">2.1 <code>error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'</code></a></h2>
232
233 <p>This is a bug in gcc. Do not report it to us. Instead, please report it to
234 the gcc developers. Note that we will not add workarounds for gcc bugs.
235 </p>
236 <p>Also note that (some of) the gcc developers believe this is not a bug or
237 not a bug they should fix:
238 <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203</a>.
239 Then again, some of them do not know the difference between an undecidable
240 problem and an NP-hard problem...
241 </p>
242 <a name="Usage"></a>
243 <h1 class="chapter"><a href="faq.html#toc-Usage">3. Usage</a></h1>
244
245 <a name="ffmpeg-does-not-work_003b-what-is-wrong_003f"></a>
246 <h2 class="section"><a href="faq.html#toc-ffmpeg-does-not-work_003b-what-is-wrong_003f">3.1 ffmpeg does not work; what is wrong?</a></h2>
247
248 <p>Try a <code>make distclean</code> in the ffmpeg source directory before the build. If this does not help see
249 (<a href="http://ffmpeg.org/bugreports.html">http://ffmpeg.org/bugreports.html</a>).
250 </p>
251 <a name="How-do-I-encode-single-pictures-into-movies_003f"></a>
252 <h2 class="section"><a href="faq.html#toc-How-do-I-encode-single-pictures-into-movies_003f">3.2 How do I encode single pictures into movies?</a></h2>
253
254 <p>First, rename your pictures to follow a numerical sequence.
255 For example, img1.jpg, img2.jpg, img3.jpg,...
256 Then you may run:
257 </p>
258 <table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
259 </pre></td></tr></table>
260
261 <p>Notice that &lsquo;<samp>%d</samp>&rsquo; is replaced by the image number.
262 </p>
263 <p>&lsquo;<tt>img%03d.jpg</tt>&rsquo; means the sequence &lsquo;<tt>img001.jpg</tt>&rsquo;, &lsquo;<tt>img002.jpg</tt>&rsquo;, etc...
264 </p>
265 <p>If you have large number of pictures to rename, you can use the
266 following command to ease the burden. The command, using the bourne
267 shell syntax, symbolically links all files in the current directory
268 that match <code>*jpg</code> to the &lsquo;<tt>/tmp</tt>&rsquo; directory in the sequence of
269 &lsquo;<tt>img001.jpg</tt>&rsquo;, &lsquo;<tt>img002.jpg</tt>&rsquo; and so on.
270 </p>
271 <table><tr><td>&nbsp;</td><td><pre class="example">  x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s &quot;$i&quot; /tmp/img&quot;$counter&quot;.jpg; x=$(($x+1)); done
272 </pre></td></tr></table>
273
274 <p>If you want to sequence them by oldest modified first, substitute
275 <code>$(ls -r -t *jpg)</code> in place of <code>*jpg</code>.
276 </p>
277 <p>Then run:
278 </p>
279 <table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
280 </pre></td></tr></table>
281
282 <p>The same logic is used for any image format that ffmpeg reads.
283 </p>
284 <a name="How-do-I-encode-movie-to-single-pictures_003f"></a>
285 <h2 class="section"><a href="faq.html#toc-How-do-I-encode-movie-to-single-pictures_003f">3.3 How do I encode movie to single pictures?</a></h2>
286
287 <p>Use:
288 </p>
289 <table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -i movie.mpg movie%d.jpg
290 </pre></td></tr></table>
291
292 <p>The &lsquo;<tt>movie.mpg</tt>&rsquo; used as input will be converted to
293 &lsquo;<tt>movie1.jpg</tt>&rsquo;, &lsquo;<tt>movie2.jpg</tt>&rsquo;, etc...
294 </p>
295 <p>Instead of relying on file format self-recognition, you may also use
296 </p><dl compact="compact">
297 <dt> &lsquo;<samp>-vcodec ppm</samp>&rsquo;</dt>
298 <dt> &lsquo;<samp>-vcodec png</samp>&rsquo;</dt>
299 <dt> &lsquo;<samp>-vcodec mjpeg</samp>&rsquo;</dt>
300 </dl>
301 <p>to force the encoding.
302 </p>
303 <p>Applying that to the previous example:
304 </p><table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -i movie.mpg -f image2 -vcodec mjpeg menu%d.jpg
305 </pre></td></tr></table>
306
307 <p>Beware that there is no &quot;jpeg&quot; codec. Use &quot;mjpeg&quot; instead.
308 </p>
309 <a name="Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f"></a>
310 <h2 class="section"><a href="faq.html#toc-Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f">3.4 Why do I see a slight quality degradation with multithreaded MPEG* encoding?</a></h2>
311
312 <p>For multithreaded MPEG* encoding, the encoded slices must be independent,
313 otherwise thread n would practically have to wait for n-1 to finish, so it&rsquo;s
314 quite logical that there is a small reduction of quality. This is not a bug.
315 </p>
316 <a name="How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f"></a>
317 <h2 class="section"><a href="faq.html#toc-How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f">3.5 How can I read from the standard input or write to the standard output?</a></h2>
318
319 <p>Use &lsquo;<tt>-</tt>&rsquo; as file name.
320 </p>
321 <a name="g_t_002df-jpeg-doesn_0027t-work_002e"></a>
322 <h2 class="section"><a href="faq.html#toc-_002df-jpeg-doesn_0027t-work_002e">3.6 -f jpeg doesn&rsquo;t work.</a></h2>
323
324 <p>Try &rsquo;-f image2 test%d.jpg&rsquo;.
325 </p>
326 <a name="Why-can-I-not-change-the-framerate_003f"></a>
327 <h2 class="section"><a href="faq.html#toc-Why-can-I-not-change-the-framerate_003f">3.7 Why can I not change the framerate?</a></h2>
328
329 <p>Some codecs, like MPEG-1/2, only allow a small number of fixed framerates.
330 Choose a different codec with the -vcodec command line option.
331 </p>
332 <a name="How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f"></a>
333 <h2 class="section"><a href="faq.html#toc-How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f">3.8 How do I encode Xvid or DivX video with ffmpeg?</a></h2>
334
335 <p>Both Xvid and DivX (version 4+) are implementations of the ISO MPEG-4
336 standard (note that there are many other coding formats that use this
337 same standard). Thus, use &rsquo;-vcodec mpeg4&rsquo; to encode in these formats. The
338 default fourcc stored in an MPEG-4-coded file will be &rsquo;FMP4&rsquo;. If you want
339 a different fourcc, use the &rsquo;-vtag&rsquo; option. E.g., &rsquo;-vtag xvid&rsquo; will
340 force the fourcc &rsquo;xvid&rsquo; to be stored as the video fourcc rather than the
341 default.
342 </p>
343 <a name="How-do-I-encode-videos-which-play-on-the-iPod_003f"></a>
344 <h2 class="section"><a href="faq.html#toc-How-do-I-encode-videos-which-play-on-the-iPod_003f">3.9 How do I encode videos which play on the iPod?</a></h2>
345
346 <dl compact="compact">
347 <dt> &lsquo;<samp>needed stuff</samp>&rsquo;</dt>
348 <dd><p>-acodec libfaac -vcodec mpeg4 width&lt;=320 height&lt;=240
349 </p></dd>
350 <dt> &lsquo;<samp>working stuff</samp>&rsquo;</dt>
351 <dd><p>mv4, title
352 </p></dd>
353 <dt> &lsquo;<samp>non-working stuff</samp>&rsquo;</dt>
354 <dd><p>B-frames
355 </p></dd>
356 <dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
357 <dd><p>ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 320x180 -metadata title=X output.mp4
358 </p></dd>
359 </dl>
360
361 <a name="How-do-I-encode-videos-which-play-on-the-PSP_003f"></a>
362 <h2 class="section"><a href="faq.html#toc-How-do-I-encode-videos-which-play-on-the-PSP_003f">3.10 How do I encode videos which play on the PSP?</a></h2>
363
364 <dl compact="compact">
365 <dt> &lsquo;<samp>needed stuff</samp>&rsquo;</dt>
366 <dd><p>-acodec libfaac -vcodec mpeg4 width*height&lt;=76800 width%16=0 height%16=0 -ar 24000 -r 30000/1001 or 15000/1001 -f psp
367 </p></dd>
368 <dt> &lsquo;<samp>working stuff</samp>&rsquo;</dt>
369 <dd><p>mv4, title
370 </p></dd>
371 <dt> &lsquo;<samp>non-working stuff</samp>&rsquo;</dt>
372 <dd><p>B-frames
373 </p></dd>
374 <dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
375 <dd><p>ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -ar 24000 -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp output.mp4
376 </p></dd>
377 <dt> &lsquo;<samp>needed stuff for H.264</samp>&rsquo;</dt>
378 <dd><p>-acodec libfaac -vcodec libx264 width*height&lt;=76800 width%16=0? height%16=0? -ar 48000 -coder 1 -r 30000/1001 or 15000/1001 -f psp
379 </p></dd>
380 <dt> &lsquo;<samp>working stuff for H.264</samp>&rsquo;</dt>
381 <dd><p>title, loop filter
382 </p></dd>
383 <dt> &lsquo;<samp>non-working stuff for H.264</samp>&rsquo;</dt>
384 <dd><p>CAVLC
385 </p></dd>
386 <dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
387 <dd><p>ffmpeg -i input -acodec libfaac -ab 128k -vcodec libx264 -b 1200k -ar 48000 -mbd 2 -coder 1 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp -flags loop -trellis 2 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 output.mp4
388 </p></dd>
389 <dt> &lsquo;<samp>higher resolution for newer PSP firmwares, width&lt;=480, height&lt;=272</samp>&rsquo;</dt>
390 <dd><p>-vcodec libx264 -level 21 -coder 1 -f psp
391 </p></dd>
392 <dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
393 <dd><p>ffmpeg -i input -acodec libfaac -ab 128k -ac 2 -ar 48000 -vcodec libx264 -level 21 -b 640k -coder 1 -f psp -flags +loop -trellis 2 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -g 250 -s 480x272 output.mp4
394 </p></dd>
395 </dl>
396
397 <a name="Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f"></a>
398 <h2 class="section"><a href="faq.html#toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f">3.11 Which are good parameters for encoding high quality MPEG-4?</a></h2>
399
400 <p>&rsquo;-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2&rsquo;,
401 things to try: &rsquo;-bf 2&rsquo;, &rsquo;-flags qprd&rsquo;, &rsquo;-flags mv0&rsquo;, &rsquo;-flags skiprd&rsquo;.
402 </p>
403 <a name="Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f"></a>
404 <h2 class="section"><a href="faq.html#toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f">3.12 Which are good parameters for encoding high quality MPEG-1/MPEG-2?</a></h2>
405
406 <p>&rsquo;-mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 100 -pass 1/2&rsquo;
407 but beware the &rsquo;-g 100&rsquo; might cause problems with some decoders.
408 Things to try: &rsquo;-bf 2&rsquo;, &rsquo;-flags qprd&rsquo;, &rsquo;-flags mv0&rsquo;, &rsquo;-flags skiprd.
409 </p>
410 <a name="Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f"></a>
411 <h2 class="section"><a href="faq.html#toc-Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f">3.13 Interlaced video looks very bad when encoded with ffmpeg, what is wrong?</a></h2>
412
413 <p>You should use &rsquo;-flags +ilme+ildct&rsquo; and maybe &rsquo;-flags +alt&rsquo; for interlaced
414 material, and try &rsquo;-top 0/1&rsquo; if the result looks really messed-up.
415 </p>
416 <a name="How-can-I-read-DirectShow-files_003f"></a>
417 <h2 class="section"><a href="faq.html#toc-How-can-I-read-DirectShow-files_003f">3.14 How can I read DirectShow files?</a></h2>
418
419 <p>If you have built FFmpeg with <code>./configure --enable-avisynth</code>
420 (only possible on MinGW/Cygwin platforms),
421 then you may use any file that DirectShow can read as input.
422 </p>
423 <p>Just create an &quot;input.avs&quot; text file with this single line ...
424 </p><table><tr><td>&nbsp;</td><td><pre class="example">  DirectShowSource(&quot;C:\path to your file\yourfile.asf&quot;)
425 </pre></td></tr></table>
426 <p>... and then feed that text file to ffmpeg:
427 </p><table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -i input.avs
428 </pre></td></tr></table>
429
430 <p>For ANY other help on Avisynth, please visit <a href="http://www.avisynth.org/">http://www.avisynth.org/</a>.
431 </p>
432 <a name="How-can-I-join-video-files_003f"></a>
433 <h2 class="section"><a href="faq.html#toc-How-can-I-join-video-files_003f">3.15 How can I join video files?</a></h2>
434
435 <p>A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow to join video files by
436 merely concatenating them.
437 </p>
438 <p>Hence you may concatenate your multimedia files by first transcoding them to
439 these privileged formats, then using the humble <code>cat</code> command (or the
440 equally humble <code>copy</code> under Windows), and finally transcoding back to your
441 format of choice.
442 </p>
443 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i input1.avi -sameq intermediate1.mpg
444 ffmpeg -i input2.avi -sameq intermediate2.mpg
445 cat intermediate1.mpg intermediate2.mpg &gt; intermediate_all.mpg
446 ffmpeg -i intermediate_all.mpg -sameq output.avi
447 </pre></td></tr></table>
448
449 <p>Notice that you should either use <code>-sameq</code> or set a reasonably high
450 bitrate for your intermediate and output files, if you want to preserve
451 video quality.
452 </p>
453 <p>Also notice that you may avoid the huge intermediate files by taking advantage
454 of named pipes, should your platform support it:
455 </p>
456 <table><tr><td>&nbsp;</td><td><pre class="example">mkfifo intermediate1.mpg
457 mkfifo intermediate2.mpg
458 ffmpeg -i input1.avi -sameq -y intermediate1.mpg &lt; /dev/null &amp;
459 ffmpeg -i input2.avi -sameq -y intermediate2.mpg &lt; /dev/null &amp;
460 cat intermediate1.mpg intermediate2.mpg |\
461 ffmpeg -f mpeg -i - -sameq -vcodec mpeg4 -acodec libmp3lame output.avi
462 </pre></td></tr></table>
463
464 <p>Similarly, the yuv4mpegpipe format, and the raw video, raw audio codecs also
465 allow concatenation, and the transcoding step is almost lossless.
466 When using multiple yuv4mpegpipe(s), the first line needs to be discarded
467 from all but the first stream. This can be accomplished by piping through
468 <code>tail</code> as seen below. Note that when piping through <code>tail</code> you
469 must use command grouping, <code>{  ;}</code>, to background properly.
470 </p>
471 <p>For example, let&rsquo;s say we want to join two FLV files into an output.flv file:
472 </p>
473 <table><tr><td>&nbsp;</td><td><pre class="example">mkfifo temp1.a
474 mkfifo temp1.v
475 mkfifo temp2.a
476 mkfifo temp2.v
477 mkfifo all.a
478 mkfifo all.v
479 ffmpeg -i input1.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - &gt; temp1.a &lt; /dev/null &amp;
480 ffmpeg -i input2.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - &gt; temp2.a &lt; /dev/null &amp;
481 ffmpeg -i input1.flv -an -f yuv4mpegpipe - &gt; temp1.v &lt; /dev/null &amp;
482 { ffmpeg -i input2.flv -an -f yuv4mpegpipe - &lt; /dev/null | tail -n +2 &gt; temp2.v ; } &amp;
483 cat temp1.a temp2.a &gt; all.a &amp;
484 cat temp1.v temp2.v &gt; all.v &amp;
485 ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
486        -f yuv4mpegpipe -i all.v \
487        -sameq -y output.flv
488 rm temp[12].[av] all.[av]
489 </pre></td></tr></table>
490
491 <a name="The-ffmpeg-program-does-not-respect-the-_002dmaxrate-setting_002c-some-frames-are-bigger-than-maxrate_002ffps_002e"></a>
492 <h2 class="section"><a href="faq.html#toc-The-ffmpeg-program-does-not-respect-the-_002dmaxrate-setting_002c-some-frames-are-bigger-than-maxrate_002ffps_002e">3.16 The ffmpeg program does not respect the -maxrate setting, some frames are bigger than maxrate/fps.</a></h2>
493
494 <p>Read the MPEG spec about video buffer verifier.
495 </p>
496 <a name="I-want-CBR_002c-but-no-matter-what-I-do-frame-sizes-differ_002e"></a>
497 <h2 class="section"><a href="faq.html#toc-I-want-CBR_002c-but-no-matter-what-I-do-frame-sizes-differ_002e">3.17 I want CBR, but no matter what I do frame sizes differ.</a></h2>
498
499 <p>You do not understand what CBR is, please read the MPEG spec.
500 Read about video buffer verifier and constant bitrate.
501 The one sentence summary is that there is a buffer and the input rate is
502 constant, the output can vary as needed.
503 </p>
504 <a name="How-do-I-check-if-a-stream-is-CBR_003f"></a>
505 <h2 class="section"><a href="faq.html#toc-How-do-I-check-if-a-stream-is-CBR_003f">3.18 How do I check if a stream is CBR?</a></h2>
506
507 <p>To quote the MPEG-2 spec:
508 &quot;There is no way to tell that a bitstream is constant bitrate without
509 examining all of the vbv_delay values and making complicated computations.&quot;
510 </p>
511
512 <a name="Development"></a>
513 <h1 class="chapter"><a href="faq.html#toc-Development">4. Development</a></h1>
514
515 <a name="Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f"></a>
516 <h2 class="section"><a href="faq.html#toc-Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f">4.1 Are there examples illustrating how to use the FFmpeg libraries, particularly libavcodec and libavformat?</a></h2>
517
518 <p>Yes. Read the Developers Guide of the FFmpeg documentation. Alternatively,
519 examine the source code for one of the many open source projects that
520 already incorporate FFmpeg at (<a href="projects.html">projects.html</a>).
521 </p>
522 <a name="Can-you-support-my-C-compiler-XXX_003f"></a>
523 <h2 class="section"><a href="faq.html#toc-Can-you-support-my-C-compiler-XXX_003f">4.2 Can you support my C compiler XXX?</a></h2>
524
525 <p>It depends. If your compiler is C99-compliant, then patches to support
526 it are likely to be welcome if they do not pollute the source code
527 with <code>#ifdef</code>s related to the compiler.
528 </p>
529 <a name="Is-Microsoft-Visual-C_002b_002b-supported_003f"></a>
530 <h2 class="section"><a href="faq.html#toc-Is-Microsoft-Visual-C_002b_002b-supported_003f">4.3 Is Microsoft Visual C++ supported?</a></h2>
531
532 <p>No. Microsoft Visual C++ is not compliant to the C99 standard and does
533 not - among other things - support the inline assembly used in FFmpeg.
534 If you wish to use MSVC++ for your
535 project then you can link the MSVC++ code with libav* as long as
536 you compile the latter with a working C compiler. For more information, see
537 the <em>Microsoft Visual C++ compatibility</em> section in the FFmpeg
538 documentation.
539 </p>
540 <p>There have been efforts to make FFmpeg compatible with MSVC++ in the
541 past. However, they have all been rejected as too intrusive, especially
542 since MinGW does the job adequately. None of the core developers
543 work with MSVC++ and thus this item is low priority. Should you find
544 the silver bullet that solves this problem, feel free to shoot it at us.
545 </p>
546 <p>We strongly recommend you to move over from MSVC++ to MinGW tools.
547 </p>
548 <a name="Can-I-use-FFmpeg-or-libavcodec-under-Windows_003f"></a>
549 <h2 class="section"><a href="faq.html#toc-Can-I-use-FFmpeg-or-libavcodec-under-Windows_003f">4.4 Can I use FFmpeg or libavcodec under Windows?</a></h2>
550
551 <p>Yes, but the Cygwin or MinGW tools <em>must</em> be used to compile FFmpeg.
552 Read the <em>Windows</em> section in the FFmpeg documentation to find more
553 information.
554 </p>
555 <p>To get help and instructions for building FFmpeg under Windows, check out
556 the FFmpeg Windows Help Forum at
557 <a href="http://ffmpeg.arrozcru.org/">http://ffmpeg.arrozcru.org/</a>.
558 </p>
559 <a name="Can-you-add-automake_002c-libtool-or-autoconf-support_003f"></a>
560 <h2 class="section"><a href="faq.html#toc-Can-you-add-automake_002c-libtool-or-autoconf-support_003f">4.5 Can you add automake, libtool or autoconf support?</a></h2>
561
562 <p>No. These tools are too bloated and they complicate the build.
563 </p>
564 <a name="Why-not-rewrite-ffmpeg-in-object_002doriented-C_002b_002b_003f"></a>
565 <h2 class="section"><a href="faq.html#toc-Why-not-rewrite-ffmpeg-in-object_002doriented-C_002b_002b_003f">4.6 Why not rewrite ffmpeg in object-oriented C++?</a></h2>
566
567 <p>FFmpeg is already organized in a highly modular manner and does not need to
568 be rewritten in a formal object language. Further, many of the developers
569 favor straight C; it works for them. For more arguments on this matter,
570 read &quot;Programming Religion&quot; at (<a href="http://www.tux.org/lkml/#s15">http://www.tux.org/lkml/#s15</a>).
571 </p>
572 <a name="Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f"></a>
573 <h2 class="section"><a href="faq.html#toc-Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f">4.7 Why are the ffmpeg programs devoid of debugging symbols?</a></h2>
574
575 <p>The build process creates ffmpeg_g, ffplay_g, etc. which contain full debug
576 information. Those binaries are stripped to create ffmpeg, ffplay, etc. If
577 you need the debug information, use the *_g versions.
578 </p>
579 <a name="I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f"></a>
580 <h2 class="section"><a href="faq.html#toc-I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f">4.8 I do not like the LGPL, can I contribute code under the GPL instead?</a></h2>
581
582 <p>Yes, as long as the code is optional and can easily and cleanly be placed
583 under #if CONFIG_GPL without breaking anything. So for example a new codec
584 or filter would be OK under GPL while a bug fix to LGPL code would not.
585 </p>
586 <a name="I-want-to-compile-xyz_002ec-alone-but-my-compiler-produced-many-errors_002e"></a>
587 <h2 class="section"><a href="faq.html#toc-I-want-to-compile-xyz_002ec-alone-but-my-compiler-produced-many-errors_002e">4.9 I want to compile xyz.c alone but my compiler produced many errors.</a></h2>
588
589 <p>Common code is in its own files in libav* and is used by the individual
590 codecs. They will not work without the common parts, you have to compile
591 the whole libav*. If you wish, disable some parts with configure switches.
592 You can also try to hack it and remove more, but if you had problems fixing
593 the compilation failure then you are probably not qualified for this.
594 </p>
595 <a name="I_0027m-using-libavcodec-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e"></a>
596 <h2 class="section"><a href="faq.html#toc-I_0027m-using-libavcodec-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e">4.10 I&rsquo;m using libavcodec from within my C++ application but the linker complains about missing symbols which seem to be available.</a></h2>
597
598 <p>FFmpeg is a pure C project, so to use the libraries within your C++ application
599 you need to explicitly state that you are using a C library. You can do this by
600 encompassing your FFmpeg includes using <code>extern &quot;C&quot;</code>.
601 </p>
602 <p>See <a href="http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3">http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3</a>
603 </p>
604 <a name="I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f"></a>
605 <h2 class="section"><a href="faq.html#toc-I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f">4.11 I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?</a></h2>
606
607 <p>You have to implement a URLProtocol, see &lsquo;<tt>libavformat/file.c</tt>&rsquo; in
608 FFmpeg and &lsquo;<tt>libmpdemux/demux_lavf.c</tt>&rsquo; in MPlayer sources.
609 </p>
610 <a name="I-get-_0022No-compatible-shell-script-interpreter-found_002e_0022-in-MSys_002e"></a>
611 <h2 class="section"><a href="faq.html#toc-I-get-_0022No-compatible-shell-script-interpreter-found_002e_0022-in-MSys_002e">4.12 I get &quot;No compatible shell script interpreter found.&quot; in MSys.</a></h2>
612
613 <p>The standard MSys bash (2.04) is broken. You need to install 2.05 or later.
614 </p>
615 <a name="I-get-_0022_002e_002fconfigure_003a-line-_003cxxx_003e_003a-pr_003a-command-not-found_0022-in-MSys_002e"></a>
616 <h2 class="section"><a href="faq.html#toc-I-get-_0022_002e_002fconfigure_003a-line-_003cxxx_003e_003a-pr_003a-command-not-found_0022-in-MSys_002e">4.13 I get &quot;./configure: line &lt;xxx&gt;: pr: command not found&quot; in MSys.</a></h2>
617
618 <p>The standard MSys install doesn&rsquo;t come with pr. You need to get it from the coreutils package.
619 </p>
620 <a name="Where-can-I-find-libav_002a-headers-for-Pascal_002fDelphi_003f"></a>
621 <h2 class="section"><a href="faq.html#toc-Where-can-I-find-libav_002a-headers-for-Pascal_002fDelphi_003f">4.14 Where can I find libav* headers for Pascal/Delphi?</a></h2>
622
623 <p>see <a href="http://www.iversenit.dk/dev/ffmpeg-headers/">http://www.iversenit.dk/dev/ffmpeg-headers/</a>
624 </p>
625 <a name="Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f"></a>
626 <h2 class="section"><a href="faq.html#toc-Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f">4.15 Where is the documentation about ffv1, msmpeg4, asv1, 4xm?</a></h2>
627
628 <p>see <a href="http://www.ffmpeg.org/~michael/">http://www.ffmpeg.org/~michael/</a>
629 </p>
630 <a name="How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f"></a>
631 <h2 class="section"><a href="faq.html#toc-How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f">4.16 How do I feed H.263-RTP (and other codecs in RTP) to libavcodec?</a></h2>
632
633 <p>Even if peculiar since it is network oriented, RTP is a container like any
634 other. You have to <em>demux</em> RTP before feeding the payload to libavcodec.
635 In this specific case please look at RFC 4629 to see how it should be done.
636 </p>
637 <a name="AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-framerate_002e"></a>
638 <h2 class="section"><a href="faq.html#toc-AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-framerate_002e">4.17 AVStream.r_frame_rate is wrong, it is much larger than the framerate.</a></h2>
639
640 <p>r_frame_rate is NOT the average framerate, it is the smallest framerate
641 that can accurately represent all timestamps. So no, it is not
642 wrong if it is larger than the average!
643 For example, if you have mixed 25 and 30 fps content, then r_frame_rate
644 will be 150.
645 </p>
646 <hr size="1">
647 <p>
648  <font size="-1">
649   This document was generated by <em>Kyle Schwarz</em> on <em>June 10, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
650  </font>
651  <br>
652
653 </p>
654 </body>
655 </html>