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