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 "dc665cc599a739e3c5262ccdac13d129">
|
---|
10 | <!ENTITY ffmpeg-size "5.5 MB">
|
---|
11 | <!ENTITY ffmpeg-buildsize "209 MB">
|
---|
12 | <!ENTITY ffmpeg-time "3.2 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
|
---|
34 | can also acquire from a live audio/video source. Designed to be intuitive,
|
---|
35 | the command-line interface (<command>ffmpeg</command>) tries to figure out
|
---|
36 | all the parameters, when possible. <application>FFmpeg</application> can
|
---|
37 | also convert from any sample rate to any other, and resize video on the fly
|
---|
38 | with a high quality polyphase filter. <application>FFmpeg</application> can
|
---|
39 | use a video4linux compatible video source and any Open Sound System audio
|
---|
40 | source.</para>
|
---|
41 |
|
---|
42 | <!-- xine-lib and everything else that I've tried will not compile against
|
---|
43 | current FFmpeg from git
|
---|
44 | <para>The developers of this package do not make releases very often, so you
|
---|
45 | may wish to use a snapshot instead of this release. If you do that, you
|
---|
46 | must expect the acceptable <command>configure</command> switches, and the
|
---|
47 | dependencies, to change.</para> -->
|
---|
48 |
|
---|
49 | &lfs71_checked;
|
---|
50 |
|
---|
51 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
52 | <itemizedlist spacing="compact">
|
---|
53 | <listitem>
|
---|
54 | <para>Download (HTTP): <ulink url="&ffmpeg-download-http;"/></para>
|
---|
55 | </listitem>
|
---|
56 | <listitem>
|
---|
57 | <para>Download (FTP): <ulink url="&ffmpeg-download-ftp;"/></para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>Download MD5 sum: &ffmpeg-md5sum;</para>
|
---|
61 | </listitem>
|
---|
62 | <listitem>
|
---|
63 | <para>Download size: &ffmpeg-size;</para>
|
---|
64 | </listitem>
|
---|
65 | <listitem>
|
---|
66 | <para>Estimated disk space required: &ffmpeg-buildsize;</para>
|
---|
67 | </listitem>
|
---|
68 | <listitem>
|
---|
69 | <para>Estimated build time: &ffmpeg-time;</para>
|
---|
70 | </listitem>
|
---|
71 | </itemizedlist>
|
---|
72 |
|
---|
73 | <bridgehead renderas="sect3">FFmpeg Dependencies</bridgehead>
|
---|
74 |
|
---|
75 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
76 | <para role="recommended">
|
---|
77 | <xref linkend="yasm"/>
|
---|
78 | </para>
|
---|
79 |
|
---|
80 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
81 | <para role="optional">
|
---|
82 | <xref linkend="faad2"/>,
|
---|
83 | <xref linkend="lame"/>,
|
---|
84 | <xref linkend="libtheora"/>,
|
---|
85 | <xref linkend="libvorbis"/>,
|
---|
86 | <xref linkend="libvpx"/>,
|
---|
87 | <xref linkend="x-window-system"/>,
|
---|
88 | <ulink url="http://www.videolan.org/developers/x264.html">x264</ulink>
|
---|
89 | <xref linkend="xvid"/>,
|
---|
90 | <ulink url="http://www.penguin.cz/~utx/amr">AMR narrowband
|
---|
91 | (floating point)</ulink>,
|
---|
92 | <ulink url="http://www.penguin.cz/~utx/amr">AMR wideband</ulink>,
|
---|
93 | <xref linkend="faac"/>,
|
---|
94 | <xref linkend="freetype2"/>,
|
---|
95 | <ulink url="http://libgsm.sourcearchive.com/">GSM</ulink>,
|
---|
96 | <ulink url="http://sourceforge.net/projects/libdc1394">libdc1394</ulink>,
|
---|
97 | <ulink url="http://svn.mplayerhq.hu/nut/src/trunk/">libnut</ulink>
|
---|
98 | (SVN checkout),
|
---|
99 | <ulink url="http://xavs.sourceforge.net/">libxavs</ulink>
|
---|
100 | (SVN checkout),
|
---|
101 | <ulink url="http://sourceforge.net/projects/librtmp">librtmp</ulink>,
|
---|
102 | <ulink url="http://diracvideo.org/">libschroedinger</ulink>,
|
---|
103 | <ulink url="http://medialibrary.sourceforge.net/">MediaLibrary</ulink>,
|
---|
104 | <ulink
|
---|
105 | url="http://connect.creativelabs.com/openal/default.aspx">OpenAL</ulink>,
|
---|
106 | <ulink url="http://tipok.org.ua/node/17">libaacplus</ulink>,
|
---|
107 | <ulink url="http://code.google.com/p/libass/">libass</ulink>,
|
---|
108 | <ulink url="http://www.celt-codec.org/">libcelt</ulink>,
|
---|
109 | <ulink url="http://ftp.gnu.org/pub/gnu/libcdio/">libcdio</ulink>,
|
---|
110 | <ulink
|
---|
111 | url="http://sourceforge.net/projects/opencvlibrary/">libopencv</ulink>,
|
---|
112 | <ulink url="http://sourceforge.net/projects/libdc1394/">libdc1394</ulink>,
|
---|
113 | <ulink url="http://linuxtv.org/downloads/v4l-utils/">libv4l2</ulink>,
|
---|
114 | <ulink url="http://www.openjpeg.org">OpenJPEG</ulink>
|
---|
115 | (<application>FFmpeg</application> includes code for it's own jpeg2000
|
---|
116 | encoder and decoder which is enabled by default),
|
---|
117 | <xref linkend="speex"/>,
|
---|
118 | <xref linkend="gnutls"/>,
|
---|
119 | <xref linkend="openssl"/>,
|
---|
120 | <xref linkend="sdl"/> and
|
---|
121 | <ulink url="http://www.nongnu.org/texi2html">texi2html</ulink>
|
---|
122 | (to build HTML documentation).</para>
|
---|
123 |
|
---|
124 | <para condition="html" role="usernotes">User Notes:
|
---|
125 | <ulink url="&blfs-wiki;/ffmpeg"/></para>
|
---|
126 |
|
---|
127 | </sect2>
|
---|
128 |
|
---|
129 | <sect2 role="installation">
|
---|
130 | <title>Installation of FFmpeg</title>
|
---|
131 |
|
---|
132 | <para>Install <application>FFmpeg</application> by running the following
|
---|
133 | commands:</para>
|
---|
134 |
|
---|
135 | <screen><userinput>mkdir build &&
|
---|
136 | cd build &&
|
---|
137 | ../configure --prefix=/usr --enable-shared --disable-static --enable-gpl &&
|
---|
138 | make</userinput></screen>
|
---|
139 |
|
---|
140 | <para>The <application>FFmpeg</application> source contains a tool called
|
---|
141 | <command>qt-faststart</command> that can modify QuickTime formatted movies
|
---|
142 | (mov or mp4) so that the header information is located at the beginning of
|
---|
143 | the file instead of the end. This allows video players to begin playing the
|
---|
144 | content before the entire file has been downloaded. An example of where
|
---|
145 | this is useful for preparing videos before uploading them to YouTube. If
|
---|
146 | need <command>qt-faststart</command>, you can compile it with gcc:</para>
|
---|
147 |
|
---|
148 | <screen><userinput>gcc ../tools/qt-faststart.c -o qt-faststart</userinput></screen>
|
---|
149 |
|
---|
150 | <para>If you have <xref linkend="doxygen"/> installed and wish to create
|
---|
151 | the API documentation (takes about 150 MB of space), issue the command
|
---|
152 | <command>doxygen</command>.</para>
|
---|
153 |
|
---|
154 | <para>This package does not come with a test suite.</para>
|
---|
155 |
|
---|
156 | <para>Now, as the <systemitem class="username">root</systemitem>
|
---|
157 | user:</para>
|
---|
158 |
|
---|
159 | <screen role="root"><userinput>make install &&
|
---|
160 | make install-man &&
|
---|
161 | mkdir /usr/share/doc/ffmpeg-&ffmpeg-version; &&
|
---|
162 | cp ../doc/*.txt /usr/share/doc/ffmpeg-&ffmpeg-version;</userinput></screen>
|
---|
163 |
|
---|
164 | <para>If you used <command>doxygen</command> to create the API
|
---|
165 | documentation, install it by issuing the following commands as the
|
---|
166 | <systemitem class="username">root</systemitem> user:</para>
|
---|
167 |
|
---|
168 | <screen role="root"><userinput>mkdir /usr/share/doc/ffmpeg-&ffmpeg-version;/api &&
|
---|
169 | cp -v doxy/* /usr/share/doc/ffmpeg-&ffmpeg-version;/api</userinput></screen>
|
---|
170 |
|
---|
171 | <para>If you compiled <command>qt-faststart</command> install it as the
|
---|
172 | <systemitem class="username">root</systemitem> user:</para>
|
---|
173 |
|
---|
174 | <screen role="root"><userinput>cp qt-faststart /usr/bin</userinput></screen>
|
---|
175 |
|
---|
176 | </sect2>
|
---|
177 |
|
---|
178 | <sect2 role="commands">
|
---|
179 | <title>Command Explanations</title>
|
---|
180 |
|
---|
181 | <para><command>mkdir build</command> and <command>cd build</command>:
|
---|
182 | This ensures that we compile the <application>FFmpeg</application> object
|
---|
183 | files in a separate directory to the source files.</para>
|
---|
184 |
|
---|
185 | <para><option>--enable-shared</option>: This switch is needed to
|
---|
186 | build the shared libraries, otherwise only static libraries are built
|
---|
187 | and installed.</para>
|
---|
188 |
|
---|
189 | <para><option>--disable-static</option>: This switch prevents the static
|
---|
190 | libraries from being built.</para>
|
---|
191 |
|
---|
192 | <para><option>--enable-gpl</option>: This switch enables the
|
---|
193 | use of GPL code and permits support for postprocessing, swscale and many
|
---|
194 | other features.</para>
|
---|
195 |
|
---|
196 | <para><option>--enable-<replaceable><codec></replaceable></option>:
|
---|
197 | <application>FFmpeg</application> comes with code to compile decoders for
|
---|
198 | almost every codec you could think of. The only reason to enable a specific
|
---|
199 | codec (and make <application>FFmpeg</application> link to the prerequisite
|
---|
200 | shared library installed on your system) is to make ffmpeg compile an
|
---|
201 | <emphasis>encoder</emphasis> for that codec. Encoding video is a
|
---|
202 | specialist job. If that is what you want to do with
|
---|
203 | <command>ffmpeg</command>, study the output of <command>configure
|
---|
204 | --help</command>. Remember, the dependencies all install their own encoders
|
---|
205 | (that are often better than <application>FFmpeg</application>'s).
|
---|
206 | <application>FFmpeg</application> is an excellent collection of decoders.
|
---|
207 | If you just want to use <application>FFmpeg</application> to watch video or
|
---|
208 | listen to music (via other applications like
|
---|
209 | <application>Gstreamer</application>) then you will not benefit from
|
---|
210 | linking it to another library.</para>
|
---|
211 |
|
---|
212 | <para><option>--disable-yasm</option>: use this option if you've not
|
---|
213 | installed yasm and you want what configure describes as "a crippled
|
---|
214 | build".</para>
|
---|
215 |
|
---|
216 | </sect2>
|
---|
217 |
|
---|
218 | <sect2 role="configuration">
|
---|
219 | <title>Configuring FFmpeg</title>
|
---|
220 |
|
---|
221 | <sect3 id="ffmpeg-config">
|
---|
222 | <title>Config Files</title>
|
---|
223 |
|
---|
224 | <para><filename>/etc/ffserver.conf</filename> and
|
---|
225 | <filename>~/.ffmpeg/ffserver-config</filename></para>
|
---|
226 |
|
---|
227 | <indexterm zone="ffmpeg ffmpeg-config">
|
---|
228 | <primary
|
---|
229 | sortas="e-AA.ffmpeg-ffserver-config">~/.ffmpeg/ffserver-config</primary>
|
---|
230 | </indexterm>
|
---|
231 |
|
---|
232 | <indexterm zone="ffmpeg ffmpeg-config">
|
---|
233 | <primary sortas="e-etc-ffserver.conf">/etc/ffserver.conf</primary>
|
---|
234 | </indexterm>
|
---|
235 |
|
---|
236 | <para>You'll find a sample <command>ffserver</command> configuration file
|
---|
237 | at <filename>doc/ffserver.conf</filename> in the source tree.</para>
|
---|
238 |
|
---|
239 | </sect3>
|
---|
240 |
|
---|
241 | </sect2>
|
---|
242 |
|
---|
243 | <sect2 role="content">
|
---|
244 | <title>Contents</title>
|
---|
245 |
|
---|
246 | <segmentedlist>
|
---|
247 | <segtitle>Installed Programs</segtitle>
|
---|
248 | <segtitle>Installed Libraries</segtitle>
|
---|
249 | <segtitle>Installed Directories</segtitle>
|
---|
250 |
|
---|
251 | <seglistitem>
|
---|
252 | <seg>ffmpeg, ffplay, ffprobe, ffserver and qt-faststart</seg>
|
---|
253 | <seg>libavcodec.so, libavdevice.so, libavfilter.so, libavformat.so,
|
---|
254 | libavutil.so, libpostproc.so, and libswscale.so</seg>
|
---|
255 | <seg>/usr/include/libavcodec, /usr/include/libavdevice,
|
---|
256 | /usr/include/libavfilter, /usr/include/libavformat,
|
---|
257 | /usr/include/libavutil, /usr/include/postproc, /usr/include/libswscale,
|
---|
258 | /usr/share/ffmpeg, and /usr/share/doc/ffmpeg-&ffmpeg-version;</seg>
|
---|
259 | </seglistitem>
|
---|
260 | </segmentedlist>
|
---|
261 |
|
---|
262 | <variablelist>
|
---|
263 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
264 | <?dbfo list-presentation="list"?>
|
---|
265 | <?dbhtml list-presentation="table"?>
|
---|
266 |
|
---|
267 | <varlistentry id="ffmpeg-prog">
|
---|
268 | <term><command>ffmpeg</command></term>
|
---|
269 | <listitem>
|
---|
270 | <para>is a command-line tool to convert video files, network streams
|
---|
271 | and input from a TV card to several video formats.</para>
|
---|
272 | <indexterm zone="ffmpeg ffmpeg-prog">
|
---|
273 | <primary sortas="b-ffmpeg">ffmpeg</primary>
|
---|
274 | </indexterm>
|
---|
275 | </listitem>
|
---|
276 | </varlistentry>
|
---|
277 |
|
---|
278 | <varlistentry id="ffplay">
|
---|
279 | <term><command>ffplay</command></term>
|
---|
280 | <listitem>
|
---|
281 | <para>is a very simple and portable media player using the
|
---|
282 | <filename>ffmpeg</filename> libraries and the SDL library.</para>
|
---|
283 | <indexterm zone="ffmpeg ffplay">
|
---|
284 | <primary sortas="b-ffplay">ffplay</primary>
|
---|
285 | </indexterm>
|
---|
286 | </listitem>
|
---|
287 | </varlistentry>
|
---|
288 |
|
---|
289 | <varlistentry id="ffprobe">
|
---|
290 | <term><command>ffprobe</command></term>
|
---|
291 | <listitem>
|
---|
292 | <para>gathers information from multimedia streams and prints it in
|
---|
293 | a human and machine-readable fashion.</para>
|
---|
294 | <indexterm zone="ffmpeg ffprobe">
|
---|
295 | <primary sortas="b-ffprobe">ffprobe</primary>
|
---|
296 | </indexterm>
|
---|
297 | </listitem>
|
---|
298 | </varlistentry>
|
---|
299 |
|
---|
300 | <varlistentry id="ffserver">
|
---|
301 | <term><command>ffserver</command></term>
|
---|
302 | <listitem>
|
---|
303 | <para>is a streaming server for everything that
|
---|
304 | <command>ffmpeg</command> could use as input (files, streams, TV card
|
---|
305 | input, webcam, etc.).</para>
|
---|
306 | <indexterm zone="ffmpeg ffserver">
|
---|
307 | <primary sortas="b-ffserver">ffserver</primary>
|
---|
308 | </indexterm>
|
---|
309 | </listitem>
|
---|
310 | </varlistentry>
|
---|
311 |
|
---|
312 | <varlistentry id="qt-faststart">
|
---|
313 | <term><command>qt-faststart</command></term>
|
---|
314 | <listitem>
|
---|
315 | <para>moves the index file to the front of quicktime (mov/mp4)
|
---|
316 | videos.</para>
|
---|
317 | <indexterm zone="ffmpeg qt-faststart">
|
---|
318 | <primary sortas="b-qt-faststart">qt-faststart</primary>
|
---|
319 | </indexterm>
|
---|
320 | </listitem>
|
---|
321 | </varlistentry>
|
---|
322 |
|
---|
323 | <varlistentry id="libavcodec">
|
---|
324 | <term><filename class="libraryfile">libavcodec.so</filename></term>
|
---|
325 | <listitem>
|
---|
326 | <para>is a library containing the <application>FFmpeg</application>
|
---|
327 | codecs (both encoding and decoding).</para>
|
---|
328 | <indexterm zone="ffmpeg libavcodec">
|
---|
329 | <primary sortas="c-libavcodec">libavcodec.so</primary>
|
---|
330 | </indexterm>
|
---|
331 | </listitem>
|
---|
332 | </varlistentry>
|
---|
333 |
|
---|
334 | <varlistentry id="libavdevice">
|
---|
335 | <term><filename class="libraryfile">libavdevice.so</filename></term>
|
---|
336 | <listitem>
|
---|
337 | <para>is the <application>FFmpeg</application> device handling
|
---|
338 | library.</para>
|
---|
339 | <indexterm zone="ffmpeg libavdevice">
|
---|
340 | <primary sortas="c-libavdevice">libavdevice.so</primary>
|
---|
341 | </indexterm>
|
---|
342 | </listitem>
|
---|
343 | </varlistentry>
|
---|
344 |
|
---|
345 | <varlistentry id="libavfilter">
|
---|
346 | <term><filename class="libraryfile">libavfilter.so</filename></term>
|
---|
347 | <listitem>
|
---|
348 | <para>is a library of filters that can alter video or audio between
|
---|
349 | the decoder and the encoder (or output).</para>
|
---|
350 | <indexterm zone="ffmpeg libavfilter">
|
---|
351 | <primary sortas="c-libavfilter">libavfilter.so</primary>
|
---|
352 | </indexterm>
|
---|
353 | </listitem>
|
---|
354 | </varlistentry>
|
---|
355 |
|
---|
356 | <varlistentry id="libavformat">
|
---|
357 | <term><filename class="libraryfile">libavformat.so</filename></term>
|
---|
358 | <listitem>
|
---|
359 | <para>is a library containing the file formats handling (mux and demux
|
---|
360 | code for several formats) used by <command>ffplay</command> as well as
|
---|
361 | allowing the generation of audio or video streams.</para>
|
---|
362 | <indexterm zone="ffmpeg libavformat">
|
---|
363 | <primary sortas="c-libavformat">libavformat.so</primary>
|
---|
364 | </indexterm>
|
---|
365 | </listitem>
|
---|
366 | </varlistentry>
|
---|
367 |
|
---|
368 | <varlistentry id="libavutil">
|
---|
369 | <term><filename class="libraryfile">libavutil.so</filename></term>
|
---|
370 | <listitem>
|
---|
371 | <para>is the <application>FFmpeg</application> utility library.</para>
|
---|
372 | <indexterm zone="ffmpeg libavutil">
|
---|
373 | <primary sortas="c-libavutil">libavutil.so</primary>
|
---|
374 | </indexterm>
|
---|
375 | </listitem>
|
---|
376 | </varlistentry>
|
---|
377 |
|
---|
378 | <!-- Both mplayer and ffmpeg now create libpostproc. The validation
|
---|
379 | for the book is not impressed by that, and it falls apart without giving
|
---|
380 | any useful information if the id is changed to "libpostproc (from ffmpeg)"
|
---|
381 | or any other variant using spaces or parenthesis or square brackets, so
|
---|
382 | try this variant : mmm, bizarrely, it accepts this but drops everything
|
---|
383 | from the first hyphen, so that in longindex.html it looks just right (one
|
---|
384 | library, two packages) -->
|
---|
385 | <varlistentry id="libpostproc-from-ffmpeg">
|
---|
386 | <term><filename class="libraryfile">libpostproc.so</filename></term>
|
---|
387 | <listitem>
|
---|
388 | <para>is the <application>FFmpeg</application> post processing
|
---|
389 | library.</para>
|
---|
390 | <indexterm zone="ffmpeg libpostproc">
|
---|
391 | <primary sortas="c-libpostproc">libpostproc.so</primary>
|
---|
392 | </indexterm>
|
---|
393 | </listitem>
|
---|
394 | </varlistentry>
|
---|
395 |
|
---|
396 | <varlistentry id="libswscale">
|
---|
397 | <term><filename class="libraryfile">libswscale.so</filename></term>
|
---|
398 | <listitem>
|
---|
399 | <para>is the <application>FFmpeg</application> image rescaling
|
---|
400 | library.</para>
|
---|
401 | <indexterm zone="ffmpeg libswscale">
|
---|
402 | <primary sortas="c-libswscale">libswscale.so</primary>
|
---|
403 | </indexterm>
|
---|
404 | </listitem>
|
---|
405 | </varlistentry>
|
---|
406 | </variablelist>
|
---|
407 | </sect2>
|
---|
408 | </sect1>
|
---|