1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY ffmpeg-download-http "http://ffmpeg.org/releases/ffmpeg-&ffmpeg-version;.tar.bz2">
|
---|
8 | <!ENTITY ffmpeg-download-ftp " ">
|
---|
9 | <!ENTITY ffmpeg-md5sum "4f5d732d25eedfb072251b5314ba2093">
|
---|
10 | <!ENTITY ffmpeg-size "3.5 MB">
|
---|
11 | <!ENTITY ffmpeg-buildsize "328 MB (built with recommended dependencies)">
|
---|
12 | <!ENTITY ffmpeg-time "2.1 SBU">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="ffmpeg" xreflabel="FFmpeg-&ffmpeg-version;">
|
---|
16 | <?dbhtml filename="ffmpeg.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>FFmpeg-&ffmpeg-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="ffmpeg">
|
---|
26 | <primary sortas="a-FFmpeg">FFmpeg</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to FFmpeg</title>
|
---|
31 |
|
---|
32 | <para><application>FFmpeg</application> is a solution to record, convert and
|
---|
33 | stream audio and video. It is a very fast video and audio converter and it can
|
---|
34 | also acquire from a live audio/video source. Designed to be intuitive, the
|
---|
35 | command-line interface (<command>ffmpeg</command>) tries to figure out all the
|
---|
36 | parameters, when possible. <application>FFmpeg</application> can also convert
|
---|
37 | from any sample rate to any other, and resize video on the fly with a high
|
---|
38 | quality polyphase filter. <application>FFmpeg</application> can use a
|
---|
39 | video4linux compatible video source and any Open Sound System audio
|
---|
40 | source.</para>
|
---|
41 | <para>The developers of this package do not make releases very often, so you
|
---|
42 | may wish to use a snapshot instead of this release. If you do that, you must
|
---|
43 | expect the acceptable <command>configure</command> switches, and the
|
---|
44 | dependencies, to change.</para>
|
---|
45 |
|
---|
46 | &lfs67_checked;
|
---|
47 |
|
---|
48 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
49 | <itemizedlist spacing="compact">
|
---|
50 | <listitem>
|
---|
51 | <para>Download (HTTP): <ulink url="&ffmpeg-download-http;"/></para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>Download (FTP): <ulink url="&ffmpeg-download-ftp;"/></para>
|
---|
55 | </listitem>
|
---|
56 | <listitem>
|
---|
57 | <para>Download MD5 sum: &ffmpeg-md5sum;</para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>Download size: &ffmpeg-size;</para>
|
---|
61 | </listitem>
|
---|
62 | <listitem>
|
---|
63 | <para>Estimated disk space required: &ffmpeg-buildsize;</para>
|
---|
64 | </listitem>
|
---|
65 | <listitem>
|
---|
66 | <para>Estimated build time: &ffmpeg-time;</para>
|
---|
67 | </listitem>
|
---|
68 | </itemizedlist>
|
---|
69 |
|
---|
70 | <!-- <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
71 | <itemizedlist spacing="compact">
|
---|
72 | <listitem>
|
---|
73 | <para>Required patch: <ulink
|
---|
74 | url="&patch-root;/ffmpeg-&ffmpeg-version;-gcc4-1.patch"/></para>
|
---|
75 | </listitem>
|
---|
76 | <listitem>
|
---|
77 | <para>Required patch: <ulink
|
---|
78 | url="&patch-root;/ffmpeg-&ffmpeg-version;-amr_fixes-1.patch"/></para>
|
---|
79 | </listitem>
|
---|
80 | </itemizedlist> -->
|
---|
81 |
|
---|
82 | <bridgehead renderas="sect3">FFmpeg Dependencies</bridgehead>
|
---|
83 |
|
---|
84 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
85 | <para role="recommended">
|
---|
86 | <xref linkend="faad2"/>,
|
---|
87 | <xref linkend="lame"/>,
|
---|
88 | <xref linkend="libtheora"/>,
|
---|
89 | <xref linkend="libvorbis"/>,
|
---|
90 | <xref linkend="libvpx"/>,
|
---|
91 | <xref linkend="x-window-system"/>,
|
---|
92 | <ulink url="http://www.videolan.org/developers/x264.html">x264</ulink>
|
---|
93 | (tested with the 20100615-2245 snapshot),
|
---|
94 | <xref linkend="xvid"/></para>
|
---|
95 |
|
---|
96 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
97 | <para role="optional">
|
---|
98 | <ulink url="http://www.penguin.cz/~utx/amr">AMR narrowband (floating point)</ulink>,
|
---|
99 | <ulink url="http://www.penguin.cz/~utx/amr">AMR wideband</ulink>,
|
---|
100 | <xref linkend="faac"/>,
|
---|
101 | <xref linkend="freetype2"/>,
|
---|
102 | <ulink url="http://kbs.cs.tu-berlin.de/~jutta/gsm/">GSM</ulink>,
|
---|
103 | <xref linkend="imlib2"/>,
|
---|
104 | <xref linkend="liba52"/>,
|
---|
105 | <ulink url="http://sourceforge.net/projects/libdc1394">libdc1394</ulink>,
|
---|
106 | <ulink url="http://svn.mplayerhq.hu/nut/src/trunk/">libnut</ulink> (SVN checkout),
|
---|
107 | <ulink url="http://sourceforge.net/projects/librtmp">librtmp</ulink>,
|
---|
108 | <ulink url="http://diracvideo.org/">libschroedinger</ulink>,
|
---|
109 | <ulink url="http://medialibrary.sourceforge.net/">MediaLibrary</ulink>,
|
---|
110 | <ulink url="http://www.openjpeg.org">OpenJPEG</ulink>,
|
---|
111 | <xref linkend="sdl"/>,
|
---|
112 | <xref linkend="speex"/>,
|
---|
113 | <ulink url="http://www.tortall.net/projects/yasm/">yasm</ulink>, and
|
---|
114 | <xref linkend="tetex"/> or
|
---|
115 | <ulink url="http://www.nongnu.org/texi2html">texi2html</ulink>
|
---|
116 | (to build HTML documentation)</para>
|
---|
117 |
|
---|
118 | <para condition="html" role="usernotes">User Notes:
|
---|
119 | <ulink url="&blfs-wiki;/ffmpeg"/></para>
|
---|
120 |
|
---|
121 | </sect2>
|
---|
122 |
|
---|
123 | <sect2 role="installation">
|
---|
124 | <title>Installation of FFmpeg</title>
|
---|
125 |
|
---|
126 | <para>Install <application>FFmpeg</application> by running the following
|
---|
127 | commands:</para>
|
---|
128 |
|
---|
129 | <screen><userinput>sed -i 's/-number//' Makefile &&
|
---|
130 | ./configure --prefix=/usr --enable-shared \
|
---|
131 | --enable-pthreads --enable-gpl \
|
---|
132 | --enable-swscale --enable-postproc \
|
---|
133 | --enable-libfaad --enable-libmp3lame \
|
---|
134 | --enable-libtheora --enable-libvorbis \
|
---|
135 | --enable-libvpx --enable-libx264 \
|
---|
136 | --enable-libxvid &&
|
---|
137 | make</userinput></screen>
|
---|
138 |
|
---|
139 | <para>If you have <application>teTeX</application> or
|
---|
140 | <application>texi2html</application> installed, the HTML
|
---|
141 | documentation was built during the <command>make</command> process. If you
|
---|
142 | wish to create additional formats of the documentation, you must have
|
---|
143 | <application>teTeX</application> installed, and issue the following
|
---|
144 | commands:</para>
|
---|
145 |
|
---|
146 | <screen><userinput>cd doc &&
|
---|
147 | for DOCNAME in faq ffmpeg-doc ffplay-doc ffprobe-doc ffserver-doc general libavfilter; do
|
---|
148 | texi2dvi -b -p $DOCNAME.texi
|
---|
149 | texi2dvi -b $DOCNAME.texi
|
---|
150 | dvips -o $DOCNAME.ps $DOCNAME.dvi
|
---|
151 | if [ $DOCNAME = ffserver-doc ] || [ $DOCNAME = ffplay-doc ] || [ $DOCNAME = ffprobe-doc ]; then \
|
---|
152 | continue
|
---|
153 | fi
|
---|
154 | makeinfo --plaintext --force -o $DOCNAME.txt $DOCNAME.texi
|
---|
155 | done &&
|
---|
156 | cd .. &&
|
---|
157 | unset DOCNAME</userinput></screen>
|
---|
158 |
|
---|
159 | <para>If you have <xref linkend="doxygen"/> installed and wish to create
|
---|
160 | the API documentation (takes about 150 MB of space), issue
|
---|
161 | <command>doxygen</command>.</para>
|
---|
162 |
|
---|
163 | <para>If you wish to run the tests, issue: <command>make check</command> -
|
---|
164 | that will take about 0.9 SBU and use another 365 MB of space.</para>
|
---|
165 |
|
---|
166 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
167 |
|
---|
168 | <screen role="root"><userinput>make install &&
|
---|
169 | install -v -m755 -d /usr/share/doc/ffmpeg-&ffmpeg-version; &&
|
---|
170 | install -v -m644 doc/*.txt /usr/share/doc/ffmpeg-&ffmpeg-version; &&
|
---|
171 | texi2html --version >/dev/null 2>&1 || make install-man</userinput></screen>
|
---|
172 |
|
---|
173 | <para>If you created additional formats of the documentation,
|
---|
174 | install it by issuing the following commands as the
|
---|
175 | <systemitem class="username">root</systemitem> user:</para>
|
---|
176 |
|
---|
177 | <screen role="root"><userinput>install -v -m644 doc/*.{html,dvi,pdf,ps} \
|
---|
178 | /usr/share/doc/ffmpeg-&ffmpeg-version;</userinput></screen>
|
---|
179 |
|
---|
180 | <para>If you created the API documentation, install it by issuing the
|
---|
181 | following commands as the
|
---|
182 | <systemitem class="username">root</systemitem> user:</para>
|
---|
183 |
|
---|
184 | <screen role="root"><userinput>install -v -m755 -d /usr/share/doc/ffmpeg-&ffmpeg-version;/api &&
|
---|
185 | cp -v doxy/* /usr/share/doc/ffmpeg-&ffmpeg-version;/api</userinput></screen>
|
---|
186 |
|
---|
187 | </sect2>
|
---|
188 |
|
---|
189 | <sect2 role="commands">
|
---|
190 | <title>Command Explanations</title>
|
---|
191 |
|
---|
192 | <para><parameter>sed -i 's/-number//' Makefile</parameter>: Recent versions
|
---|
193 | of gnu <command>texi2html</command> error out because
|
---|
194 | <command>-number</command> is now ambiguous (for number-footnote or
|
---|
195 | number-sections). Neither choice makes any difference to what is created
|
---|
196 | here, and the same is true with older versions of
|
---|
197 | <command>texi2html</command>, e.g. from application
|
---|
198 | <application>teTeX</application>.</para>
|
---|
199 |
|
---|
200 | <para><parameter>--enable-shared</parameter>: This switch is needed to
|
---|
201 | build the shared libraries, otherwise only static libraries are built
|
---|
202 | and installed.</para>
|
---|
203 |
|
---|
204 | <para><parameter>--enable-pthreads</parameter>: This switch enables the
|
---|
205 | build to link against the Posix threads library.</para>
|
---|
206 |
|
---|
207 | <para><parameter>--enable-gpl</parameter>: This switch enables the
|
---|
208 | use of GPL code and permits support for postprocessing, swscale, liba54,
|
---|
209 | xvid, x264, libfaad2 and x11grab to be selected.</para>
|
---|
210 |
|
---|
211 | <para><parameter>--enable-swscale</parameter>: This switch causes libswscale
|
---|
212 | to be built.</para>
|
---|
213 |
|
---|
214 | <para><parameter>--enable-postprocessing</parameter>: This switch causes
|
---|
215 | libpostproc to be built.</para>
|
---|
216 |
|
---|
217 | <para><option>--enable-<replaceable><codec></replaceable></option>: Review
|
---|
218 | the available options and codecs using the
|
---|
219 | <command>./configure --help</command> command. You must explicitly enable
|
---|
220 | each optional codec. If you have not installed some of the recommended
|
---|
221 | dependencies, do not enable those you have omitted.</para>
|
---|
222 |
|
---|
223 | <para><option>--disable-ffplay</option>: Only installs the server part.
|
---|
224 | Use this option if <application>X</application> is not installed.</para>
|
---|
225 |
|
---|
226 | <para><option>--disable-static</option>: This switch prevents the static
|
---|
227 | libraries from being built.</para>
|
---|
228 |
|
---|
229 | <para><command>if [ $DOCNAME = ffserver-doc ] ...</command> These three
|
---|
230 | .texi files are rejected by <command>makeinfo</command> because of syntax
|
---|
231 | errors.</para>
|
---|
232 |
|
---|
233 | </sect2>
|
---|
234 |
|
---|
235 | <sect2 role="configuration">
|
---|
236 | <title>Configuring FFmpeg</title>
|
---|
237 |
|
---|
238 | <sect3 id="ffmpeg-config">
|
---|
239 | <title>Config Files</title>
|
---|
240 |
|
---|
241 | <para><filename>/etc/ffserver.conf</filename> and
|
---|
242 | <filename>~/.ffmpeg/ffserver-config</filename></para>
|
---|
243 |
|
---|
244 | <indexterm zone="ffmpeg ffmpeg-config">
|
---|
245 | <primary sortas="e-AA.ffmpeg-ffserver-config">~/.ffmpeg/ffserver-config</primary>
|
---|
246 | </indexterm>
|
---|
247 |
|
---|
248 | <indexterm zone="ffmpeg ffmpeg-config">
|
---|
249 | <primary sortas="e-etc-ffserver.conf">/etc/ffserver.conf</primary>
|
---|
250 | </indexterm>
|
---|
251 |
|
---|
252 | <para>You'll find a sample ffserver configuration file at
|
---|
253 | <ulink url="http://ffmpeg.sourceforge.net/sample.html"/> (also
|
---|
254 | <filename>doc/ffserver.conf</filename> in the source tree).</para>
|
---|
255 |
|
---|
256 | </sect3>
|
---|
257 |
|
---|
258 | </sect2>
|
---|
259 |
|
---|
260 | <sect2 role="content">
|
---|
261 | <title>Contents</title>
|
---|
262 |
|
---|
263 | <segmentedlist>
|
---|
264 | <segtitle>Installed Programs</segtitle>
|
---|
265 | <segtitle>Installed Libraries</segtitle>
|
---|
266 | <segtitle>Installed Directories</segtitle>
|
---|
267 |
|
---|
268 | <seglistitem>
|
---|
269 | <seg>ffmpeg, ffplay, ffprobe, and ffserver</seg>
|
---|
270 | <seg>libavcodec.{so,a}, libavdevice.{so,a}, libavformat.{so,a},
|
---|
271 | libavutil.{so,a}, libpostproc.{so,a}, and libswscale.{so,a}</seg>
|
---|
272 | <seg>/usr/include/libavcodec, /usr/include/libavdevice,
|
---|
273 | /usr/include/libavformat, /usr/include/libavutil, /usr/include/postproc,
|
---|
274 | /usr/include/libswscale, /usr/share/ffmpeg, and
|
---|
275 | /usr/share/doc/ffmpeg-&ffmpeg-version;</seg>
|
---|
276 | </seglistitem>
|
---|
277 | </segmentedlist>
|
---|
278 |
|
---|
279 | <variablelist>
|
---|
280 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
281 | <?dbfo list-presentation="list"?>
|
---|
282 | <?dbhtml list-presentation="table"?>
|
---|
283 |
|
---|
284 | <varlistentry id="ffmpeg-prog">
|
---|
285 | <term><command>ffmpeg</command></term>
|
---|
286 | <listitem>
|
---|
287 | <para>is a command-line tool to convert video files, network streams
|
---|
288 | and input from a TV card to several video formats.</para>
|
---|
289 | <indexterm zone="ffmpeg ffmpeg-prog">
|
---|
290 | <primary sortas="b-ffmpeg">ffmpeg</primary>
|
---|
291 | </indexterm>
|
---|
292 | </listitem>
|
---|
293 | </varlistentry>
|
---|
294 |
|
---|
295 | <varlistentry id="ffplay">
|
---|
296 | <term><command>ffplay</command></term>
|
---|
297 | <listitem>
|
---|
298 | <para>is a very simple and portable media player using the
|
---|
299 | <filename>ffmpeg</filename> libraries and the SDL library.</para>
|
---|
300 | <indexterm zone="ffmpeg ffplay">
|
---|
301 | <primary sortas="b-ffplay">ffplay</primary>
|
---|
302 | </indexterm>
|
---|
303 | </listitem>
|
---|
304 | </varlistentry>
|
---|
305 |
|
---|
306 | <varlistentry id="ffserver">
|
---|
307 | <term><command>ffserver</command></term>
|
---|
308 | <listitem>
|
---|
309 | <para>is a streaming server for everything that <command>ffmpeg</command>
|
---|
310 | could use as input (files, streams, TV card input, webcam, etc.).</para>
|
---|
311 | <indexterm zone="ffmpeg ffserver">
|
---|
312 | <primary sortas="b-ffserver">ffserver</primary>
|
---|
313 | </indexterm>
|
---|
314 | </listitem>
|
---|
315 | </varlistentry>
|
---|
316 |
|
---|
317 | <varlistentry id="libavcodec">
|
---|
318 | <term><filename class='libraryfile'>libavcodec.{so,a}</filename></term>
|
---|
319 | <listitem>
|
---|
320 | <para>is a library containing the <application>FFmpeg</application>
|
---|
321 | codecs (both encoding and decoding).</para>
|
---|
322 | <indexterm zone="ffmpeg libavcodec">
|
---|
323 | <primary sortas="c-libavcodec">libavcodec.{so,a}</primary>
|
---|
324 | </indexterm>
|
---|
325 | </listitem>
|
---|
326 | </varlistentry>
|
---|
327 |
|
---|
328 | <varlistentry id="libavdevice">
|
---|
329 | <term><filename class='libraryfile'>libavdevice.{so,a}</filename></term>
|
---|
330 | <listitem>
|
---|
331 | <para>is the <application>FFmpeg</application> device handling
|
---|
332 | library.</para>
|
---|
333 | <indexterm zone="ffmpeg libavdevice">
|
---|
334 | <primary sortas="c-libavdevice">libavdevice.{so,a}</primary>
|
---|
335 | </indexterm>
|
---|
336 | </listitem>
|
---|
337 | </varlistentry>
|
---|
338 |
|
---|
339 | <varlistentry id="libavformat">
|
---|
340 | <term><filename class='libraryfile'>libavformat.{so,a}</filename></term>
|
---|
341 | <listitem>
|
---|
342 | <para>is a library containing the file formats handling (mux and demux code
|
---|
343 | for several formats) used by <command>ffplay</command> as well as
|
---|
344 | allowing the generation of audio or video streams.</para>
|
---|
345 | <indexterm zone="ffmpeg libavformat">
|
---|
346 | <primary sortas="c-libavformat">libavformat.{so,a}</primary>
|
---|
347 | </indexterm>
|
---|
348 | </listitem>
|
---|
349 | </varlistentry>
|
---|
350 |
|
---|
351 | <varlistentry id="libavutil">
|
---|
352 | <term><filename class='libraryfile'>libavutil.{so,a}</filename></term>
|
---|
353 | <listitem>
|
---|
354 | <para>is the <application>FFmpeg</application> utility library.</para>
|
---|
355 | <indexterm zone="ffmpeg libavutil">
|
---|
356 | <primary sortas="c-libavutil">libavutil.{so,a}</primary>
|
---|
357 | </indexterm>
|
---|
358 | </listitem>
|
---|
359 | </varlistentry>
|
---|
360 |
|
---|
361 | <!-- Both mplayer and ffmpeg now create libpostproc. The validation
|
---|
362 | for the book is not impressed by that, and it falls apart without giving
|
---|
363 | any useful information if the id is changed to "libpostproc (from ffmpeg)"
|
---|
364 | or any other variant using spaces or parenthesis or square brackets, so
|
---|
365 | try this variant : mmm, bizarrely, it accepts this but drops everything from
|
---|
366 | the first hyphen, so that in longindex.html it looks just right (one library,
|
---|
367 | two packages) -->
|
---|
368 | <varlistentry id="libpostproc-from-ffmpeg">
|
---|
369 | <term><filename class='libraryfile'>libpostproc.{so,a}</filename></term>
|
---|
370 | <listitem>
|
---|
371 | <para>is the <application>FFmpeg</application> post processing
|
---|
372 | library.</para>
|
---|
373 | <indexterm zone="ffmpeg libpostproc">
|
---|
374 | <primary sortas="c-libpostproc">libpostproc.{so,a}</primary>
|
---|
375 | </indexterm>
|
---|
376 | </listitem>
|
---|
377 | </varlistentry>
|
---|
378 |
|
---|
379 | <varlistentry id="libswscale">
|
---|
380 | <term><filename class='libraryfile'>libswscale.{so,a}</filename></term>
|
---|
381 | <listitem>
|
---|
382 | <para>is the <application>FFmpeg</application> image rescaling
|
---|
383 | library.</para>
|
---|
384 | <indexterm zone="ffmpeg libswscale">
|
---|
385 | <primary sortas="c-libswscale">libswscale.{so,a}</primary>
|
---|
386 | </indexterm>
|
---|
387 | </listitem>
|
---|
388 | </varlistentry>
|
---|
389 |
|
---|
390 | </variablelist>
|
---|
391 |
|
---|
392 | </sect2>
|
---|
393 |
|
---|
394 | </sect1>
|
---|