]> git.sesse.net Git - casparcg/blob - ffmpeg 0.8/doc/faq.html
2.0. new dlls.
[casparcg] / ffmpeg 0.8 / 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 September 2, 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 master.
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.
249 If this does not help see
250 (<a href="http://ffmpeg.org/bugreports.html">http://ffmpeg.org/bugreports.html</a>).
251 </p>
252 <a name="How-do-I-encode-single-pictures-into-movies_003f"></a>
253 <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>
254
255 <p>First, rename your pictures to follow a numerical sequence.
256 For example, img1.jpg, img2.jpg, img3.jpg,...
257 Then you may run:
258 </p>
259 <table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
260 </pre></td></tr></table>
261
262 <p>Notice that &lsquo;<samp>%d</samp>&rsquo; is replaced by the image number.
263 </p>
264 <p>&lsquo;<tt>img%03d.jpg</tt>&rsquo; means the sequence &lsquo;<tt>img001.jpg</tt>&rsquo;, &lsquo;<tt>img002.jpg</tt>&rsquo;, etc...
265 </p>
266 <p>If you have large number of pictures to rename, you can use the
267 following command to ease the burden. The command, using the bourne
268 shell syntax, symbolically links all files in the current directory
269 that match <code>*jpg</code> to the &lsquo;<tt>/tmp</tt>&rsquo; directory in the sequence of
270 &lsquo;<tt>img001.jpg</tt>&rsquo;, &lsquo;<tt>img002.jpg</tt>&rsquo; and so on.
271 </p>
272 <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
273 </pre></td></tr></table>
274
275 <p>If you want to sequence them by oldest modified first, substitute
276 <code>$(ls -r -t *jpg)</code> in place of <code>*jpg</code>.
277 </p>
278 <p>Then run:
279 </p>
280 <table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
281 </pre></td></tr></table>
282
283 <p>The same logic is used for any image format that ffmpeg reads.
284 </p>
285 <a name="How-do-I-encode-movie-to-single-pictures_003f"></a>
286 <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>
287
288 <p>Use:
289 </p>
290 <table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -i movie.mpg movie%d.jpg
291 </pre></td></tr></table>
292
293 <p>The &lsquo;<tt>movie.mpg</tt>&rsquo; used as input will be converted to
294 &lsquo;<tt>movie1.jpg</tt>&rsquo;, &lsquo;<tt>movie2.jpg</tt>&rsquo;, etc...
295 </p>
296 <p>Instead of relying on file format self-recognition, you may also use
297 </p><dl compact="compact">
298 <dt> &lsquo;<samp>-vcodec ppm</samp>&rsquo;</dt>
299 <dt> &lsquo;<samp>-vcodec png</samp>&rsquo;</dt>
300 <dt> &lsquo;<samp>-vcodec mjpeg</samp>&rsquo;</dt>
301 </dl>
302 <p>to force the encoding.
303 </p>
304 <p>Applying that to the previous example:
305 </p><table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -i movie.mpg -f image2 -vcodec mjpeg menu%d.jpg
306 </pre></td></tr></table>
307
308 <p>Beware that there is no &quot;jpeg&quot; codec. Use &quot;mjpeg&quot; instead.
309 </p>
310 <a name="Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f"></a>
311 <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>
312
313 <p>For multithreaded MPEG* encoding, the encoded slices must be independent,
314 otherwise thread n would practically have to wait for n-1 to finish, so it&rsquo;s
315 quite logical that there is a small reduction of quality. This is not a bug.
316 </p>
317 <a name="How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f"></a>
318 <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>
319
320 <p>Use &lsquo;<tt>-</tt>&rsquo; as file name.
321 </p>
322 <a name="g_t_002df-jpeg-doesn_0027t-work_002e"></a>
323 <h2 class="section"><a href="faq.html#toc-_002df-jpeg-doesn_0027t-work_002e">3.6 -f jpeg doesn&rsquo;t work.</a></h2>
324
325 <p>Try &rsquo;-f image2 test%d.jpg&rsquo;.
326 </p>
327 <a name="Why-can-I-not-change-the-framerate_003f"></a>
328 <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>
329
330 <p>Some codecs, like MPEG-1/2, only allow a small number of fixed framerates.
331 Choose a different codec with the -vcodec command line option.
332 </p>
333 <a name="How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f"></a>
334 <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>
335
336 <p>Both Xvid and DivX (version 4+) are implementations of the ISO MPEG-4
337 standard (note that there are many other coding formats that use this
338 same standard). Thus, use &rsquo;-vcodec mpeg4&rsquo; to encode in these formats. The
339 default fourcc stored in an MPEG-4-coded file will be &rsquo;FMP4&rsquo;. If you want
340 a different fourcc, use the &rsquo;-vtag&rsquo; option. E.g., &rsquo;-vtag xvid&rsquo; will
341 force the fourcc &rsquo;xvid&rsquo; to be stored as the video fourcc rather than the
342 default.
343 </p>
344 <a name="How-do-I-encode-videos-which-play-on-the-iPod_003f"></a>
345 <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>
346
347 <dl compact="compact">
348 <dt> &lsquo;<samp>needed stuff</samp>&rsquo;</dt>
349 <dd><p>-acodec libfaac -vcodec mpeg4 width&lt;=320 height&lt;=240
350 </p></dd>
351 <dt> &lsquo;<samp>working stuff</samp>&rsquo;</dt>
352 <dd><p>mv4, title
353 </p></dd>
354 <dt> &lsquo;<samp>non-working stuff</samp>&rsquo;</dt>
355 <dd><p>B-frames
356 </p></dd>
357 <dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
358 <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
359 </p></dd>
360 </dl>
361
362 <a name="How-do-I-encode-videos-which-play-on-the-PSP_003f"></a>
363 <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>
364
365 <dl compact="compact">
366 <dt> &lsquo;<samp>needed stuff</samp>&rsquo;</dt>
367 <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
368 </p></dd>
369 <dt> &lsquo;<samp>working stuff</samp>&rsquo;</dt>
370 <dd><p>mv4, title
371 </p></dd>
372 <dt> &lsquo;<samp>non-working stuff</samp>&rsquo;</dt>
373 <dd><p>B-frames
374 </p></dd>
375 <dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
376 <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
377 </p></dd>
378 <dt> &lsquo;<samp>needed stuff for H.264</samp>&rsquo;</dt>
379 <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
380 </p></dd>
381 <dt> &lsquo;<samp>working stuff for H.264</samp>&rsquo;</dt>
382 <dd><p>title, loop filter
383 </p></dd>
384 <dt> &lsquo;<samp>non-working stuff for H.264</samp>&rsquo;</dt>
385 <dd><p>CAVLC
386 </p></dd>
387 <dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
388 <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
389 </p></dd>
390 <dt> &lsquo;<samp>higher resolution for newer PSP firmwares, width&lt;=480, height&lt;=272</samp>&rsquo;</dt>
391 <dd><p>-vcodec libx264 -level 21 -coder 1 -f psp
392 </p></dd>
393 <dt> &lsquo;<samp>example command line</samp>&rsquo;</dt>
394 <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
395 </p></dd>
396 </dl>
397
398 <a name="Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f"></a>
399 <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>
400
401 <p>&rsquo;-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2&rsquo;,
402 things to try: &rsquo;-bf 2&rsquo;, &rsquo;-flags qprd&rsquo;, &rsquo;-flags mv0&rsquo;, &rsquo;-flags skiprd&rsquo;.
403 </p>
404 <a name="Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f"></a>
405 <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>
406
407 <p>&rsquo;-mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 100 -pass 1/2&rsquo;
408 but beware the &rsquo;-g 100&rsquo; might cause problems with some decoders.
409 Things to try: &rsquo;-bf 2&rsquo;, &rsquo;-flags qprd&rsquo;, &rsquo;-flags mv0&rsquo;, &rsquo;-flags skiprd.
410 </p>
411 <a name="Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f"></a>
412 <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>
413
414 <p>You should use &rsquo;-flags +ilme+ildct&rsquo; and maybe &rsquo;-flags +alt&rsquo; for interlaced
415 material, and try &rsquo;-top 0/1&rsquo; if the result looks really messed-up.
416 </p>
417 <a name="How-can-I-read-DirectShow-files_003f"></a>
418 <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>
419
420 <p>If you have built FFmpeg with <code>./configure --enable-avisynth</code>
421 (only possible on MinGW/Cygwin platforms),
422 then you may use any file that DirectShow can read as input.
423 </p>
424 <p>Just create an &quot;input.avs&quot; text file with this single line ...
425 </p><table><tr><td>&nbsp;</td><td><pre class="example">  DirectShowSource(&quot;C:\path to your file\yourfile.asf&quot;)
426 </pre></td></tr></table>
427 <p>... and then feed that text file to ffmpeg:
428 </p><table><tr><td>&nbsp;</td><td><pre class="example">  ffmpeg -i input.avs
429 </pre></td></tr></table>
430
431 <p>For ANY other help on Avisynth, please visit the
432 <a href="http://www.avisynth.org/">Avisynth homepage</a>.
433 </p>
434 <a name="How-can-I-join-video-files_003f"></a>
435 <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>
436
437 <p>A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow to join video files by
438 merely concatenating them.
439 </p>
440 <p>Hence you may concatenate your multimedia files by first transcoding them to
441 these privileged formats, then using the humble <code>cat</code> command (or the
442 equally humble <code>copy</code> under Windows), and finally transcoding back to your
443 format of choice.
444 </p>
445 <table><tr><td>&nbsp;</td><td><pre class="example">ffmpeg -i input1.avi -sameq intermediate1.mpg
446 ffmpeg -i input2.avi -sameq intermediate2.mpg
447 cat intermediate1.mpg intermediate2.mpg &gt; intermediate_all.mpg
448 ffmpeg -i intermediate_all.mpg -sameq output.avi
449 </pre></td></tr></table>
450
451 <p>Notice that you should either use <code>-sameq</code> or set a reasonably high
452 bitrate for your intermediate and output files, if you want to preserve
453 video quality.
454 </p>
455 <p>Also notice that you may avoid the huge intermediate files by taking advantage
456 of named pipes, should your platform support it:
457 </p>
458 <table><tr><td>&nbsp;</td><td><pre class="example">mkfifo intermediate1.mpg
459 mkfifo intermediate2.mpg
460 ffmpeg -i input1.avi -sameq -y intermediate1.mpg &lt; /dev/null &amp;
461 ffmpeg -i input2.avi -sameq -y intermediate2.mpg &lt; /dev/null &amp;
462 cat intermediate1.mpg intermediate2.mpg |\
463 ffmpeg -f mpeg -i - -sameq -vcodec mpeg4 -acodec libmp3lame output.avi
464 </pre></td></tr></table>
465
466 <p>Similarly, the yuv4mpegpipe format, and the raw video, raw audio codecs also
467 allow concatenation, and the transcoding step is almost lossless.
468 When using multiple yuv4mpegpipe(s), the first line needs to be discarded
469 from all but the first stream. This can be accomplished by piping through
470 <code>tail</code> as seen below. Note that when piping through <code>tail</code> you
471 must use command grouping, <code>{  ;}</code>, to background properly.
472 </p>
473 <p>For example, let&rsquo;s say we want to join two FLV files into an output.flv file:
474 </p>
475 <table><tr><td>&nbsp;</td><td><pre class="example">mkfifo temp1.a
476 mkfifo temp1.v
477 mkfifo temp2.a
478 mkfifo temp2.v
479 mkfifo all.a
480 mkfifo all.v
481 ffmpeg -i input1.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - &gt; temp1.a &lt; /dev/null &amp;
482 ffmpeg -i input2.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - &gt; temp2.a &lt; /dev/null &amp;
483 ffmpeg -i input1.flv -an -f yuv4mpegpipe - &gt; temp1.v &lt; /dev/null &amp;
484 { ffmpeg -i input2.flv -an -f yuv4mpegpipe - &lt; /dev/null | tail -n +2 &gt; temp2.v ; } &amp;
485 cat temp1.a temp2.a &gt; all.a &amp;
486 cat temp1.v temp2.v &gt; all.v &amp;
487 ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
488        -f yuv4mpegpipe -i all.v \
489        -sameq -y output.flv
490 rm temp[12].[av] all.[av]
491 </pre></td></tr></table>
492
493 <a name="The-ffmpeg-program-does-not-respect-the-_002dmaxrate-setting_002c-some-frames-are-bigger-than-maxrate_002ffps_002e"></a>
494 <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>
495
496 <p>Read the MPEG spec about video buffer verifier.
497 </p>
498 <a name="I-want-CBR_002c-but-no-matter-what-I-do-frame-sizes-differ_002e"></a>
499 <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>
500
501 <p>You do not understand what CBR is, please read the MPEG spec.
502 Read about video buffer verifier and constant bitrate.
503 The one sentence summary is that there is a buffer and the input rate is
504 constant, the output can vary as needed.
505 </p>
506 <a name="How-do-I-check-if-a-stream-is-CBR_003f"></a>
507 <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>
508
509 <p>To quote the MPEG-2 spec:
510 &quot;There is no way to tell that a bitstream is constant bitrate without
511 examining all of the vbv_delay values and making complicated computations.&quot;
512 </p>
513
514 <a name="Development"></a>
515 <h1 class="chapter"><a href="faq.html#toc-Development">4. Development</a></h1>
516
517 <a name="Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f"></a>
518 <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>
519
520 <p>Yes. Read the Developers Guide of the FFmpeg documentation. Alternatively,
521 examine the source code for one of the many open source projects that
522 already incorporate FFmpeg at (<a href="projects.html">projects.html</a>).
523 </p>
524 <a name="Can-you-support-my-C-compiler-XXX_003f"></a>
525 <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>
526
527 <p>It depends. If your compiler is C99-compliant, then patches to support
528 it are likely to be welcome if they do not pollute the source code
529 with <code>#ifdef</code>s related to the compiler.
530 </p>
531 <a name="Is-Microsoft-Visual-C_002b_002b-supported_003f"></a>
532 <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>
533
534 <p>No. Microsoft Visual C++ is not compliant to the C99 standard and does
535 not - among other things - support the inline assembly used in FFmpeg.
536 If you wish to use MSVC++ for your
537 project then you can link the MSVC++ code with libav* as long as
538 you compile the latter with a working C compiler. For more information, see
539 the <em>Microsoft Visual C++ compatibility</em> section in the FFmpeg
540 documentation.
541 </p>
542 <p>There have been efforts to make FFmpeg compatible with MSVC++ in the
543 past. However, they have all been rejected as too intrusive, especially
544 since MinGW does the job adequately. None of the core developers
545 work with MSVC++ and thus this item is low priority. Should you find
546 the silver bullet that solves this problem, feel free to shoot it at us.
547 </p>
548 <p>We strongly recommend you to move over from MSVC++ to MinGW tools.
549 </p>
550 <a name="Can-I-use-FFmpeg-or-libavcodec-under-Windows_003f"></a>
551 <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>
552
553 <p>Yes, but the Cygwin or MinGW tools <em>must</em> be used to compile FFmpeg.
554 Read the <em>Windows</em> section in the FFmpeg documentation to find more
555 information.
556 </p>
557 <p>To get help and instructions for building FFmpeg under Windows, check out
558 the FFmpeg Windows Help Forum at
559 <a href="http://ffmpeg.arrozcru.org/">http://ffmpeg.arrozcru.org/</a>.
560 </p>
561 <a name="Can-you-add-automake_002c-libtool-or-autoconf-support_003f"></a>
562 <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>
563
564 <p>No. These tools are too bloated and they complicate the build.
565 </p>
566 <a name="Why-not-rewrite-ffmpeg-in-object_002doriented-C_002b_002b_003f"></a>
567 <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>
568
569 <p>FFmpeg is already organized in a highly modular manner and does not need to
570 be rewritten in a formal object language. Further, many of the developers
571 favor straight C; it works for them. For more arguments on this matter,
572 read <a href="http://www.tux.org/lkml/#s15">&quot;Programming Religion&quot;</a>.
573 </p>
574 <a name="Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f"></a>
575 <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>
576
577 <p>The build process creates ffmpeg_g, ffplay_g, etc. which contain full debug
578 information. Those binaries are stripped to create ffmpeg, ffplay, etc. If
579 you need the debug information, use the *_g versions.
580 </p>
581 <a name="I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f"></a>
582 <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>
583
584 <p>Yes, as long as the code is optional and can easily and cleanly be placed
585 under #if CONFIG_GPL without breaking anything. So for example a new codec
586 or filter would be OK under GPL while a bug fix to LGPL code would not.
587 </p>
588 <a name="I-want-to-compile-xyz_002ec-alone-but-my-compiler-produced-many-errors_002e"></a>
589 <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>
590
591 <p>Common code is in its own files in libav* and is used by the individual
592 codecs. They will not work without the common parts, you have to compile
593 the whole libav*. If you wish, disable some parts with configure switches.
594 You can also try to hack it and remove more, but if you had problems fixing
595 the compilation failure then you are probably not qualified for this.
596 </p>
597 <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>
598 <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>
599
600 <p>FFmpeg is a pure C project, so to use the libraries within your C++ application
601 you need to explicitly state that you are using a C library. You can do this by
602 encompassing your FFmpeg includes using <code>extern &quot;C&quot;</code>.
603 </p>
604 <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>
605 </p>
606 <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>
607 <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>
608
609 <p>You have to implement a URLProtocol, see &lsquo;<tt>libavformat/file.c</tt>&rsquo; in
610 FFmpeg and &lsquo;<tt>libmpdemux/demux_lavf.c</tt>&rsquo; in MPlayer sources.
611 </p>
612 <a name="I-get-_0022No-compatible-shell-script-interpreter-found_002e_0022-in-MSys_002e"></a>
613 <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>
614
615 <p>The standard MSys bash (2.04) is broken. You need to install 2.05 or later.
616 </p>
617 <a name="I-get-_0022_002e_002fconfigure_003a-line-_003cxxx_003e_003a-pr_003a-command-not-found_0022-in-MSys_002e"></a>
618 <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>
619
620 <p>The standard MSys install doesn&rsquo;t come with pr. You need to get it from the coreutils package.
621 </p>
622 <a name="Where-can-I-find-libav_002a-headers-for-Pascal_002fDelphi_003f"></a>
623 <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>
624
625 <p>see <a href="http://www.iversenit.dk/dev/ffmpeg-headers/">http://www.iversenit.dk/dev/ffmpeg-headers/</a>
626 </p>
627 <a name="Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f"></a>
628 <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>
629
630 <p>see <a href="http://www.ffmpeg.org/~michael/">http://www.ffmpeg.org/~michael/</a>
631 </p>
632 <a name="How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f"></a>
633 <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>
634
635 <p>Even if peculiar since it is network oriented, RTP is a container like any
636 other. You have to <em>demux</em> RTP before feeding the payload to libavcodec.
637 In this specific case please look at RFC 4629 to see how it should be done.
638 </p>
639 <a name="AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-framerate_002e"></a>
640 <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>
641
642 <p>r_frame_rate is NOT the average framerate, it is the smallest framerate
643 that can accurately represent all timestamps. So no, it is not
644 wrong if it is larger than the average!
645 For example, if you have mixed 25 and 30 fps content, then r_frame_rate
646 will be 150.
647 </p>
648 <hr size="1">
649 <p>
650  <font size="-1">
651   This document was generated by <em>Kyle Schwarz</em> on <em>September 2, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
652  </font>
653  <br>
654
655 </p>
656 </body>
657 </html>