source: multimedia/videoutils/ffmpeg.xml@ 3f3b0a23

systemd-11177
Last change on this file since 3f3b0a23 was 3f3b0a23, checked in by Krejzi <krejzi@…>, 10 years ago

Merged trunk.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@13906 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 21.8 KB
Line 
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 "651e5e82360baba41e4d1e426b4897f6">
10 <!ENTITY ffmpeg-size "7.1 MB">
11 <!ENTITY ffmpeg-buildsize "119 MB (additional 764 MB for docs and 1813 MB to run the FATE tests)">
12 <!ENTITY ffmpeg-time "3.4 SBU (additional 1.2 SBU for docs and 7.2 SBU to run the FATE tests, after sample files are downloaded)">
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>
33 <application>FFmpeg</application> is a solution to record, convert and
34 stream audio and video. It is a very fast video and audio converter and it
35 can also acquire from a live audio/video source. Designed to be intuitive,
36 the command-line interface (<command>ffmpeg</command>) tries to figure out
37 all the parameters, when possible. <application>FFmpeg</application> can
38 also convert from any sample rate to any other, and resize video on the
39 fly with a high quality polyphase filter.
40 <application>FFmpeg</application> can use a Video4Linux compatible video
41 source and any Open Sound System audio source.
42 </para>
43
44 &lfs75_checked;
45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
49 <para>
50 Download (HTTP): <ulink url="&ffmpeg-download-http;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download (FTP): <ulink url="&ffmpeg-download-ftp;"/>
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download MD5 sum: &ffmpeg-md5sum;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Download size: &ffmpeg-size;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated disk space required: &ffmpeg-buildsize;
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 Estimated build time: &ffmpeg-time;
76 </para>
77 </listitem>
78 </itemizedlist>
79
80 <bridgehead renderas="sect3">FFmpeg Dependencies</bridgehead>
81
82 <bridgehead renderas="sect4">Recommended</bridgehead>
83 <para role="recommended">
84 <xref linkend="yasm"/>,
85 <xref linkend="libass"/>,
86 <xref linkend="fdk-aac"/>,
87 <xref linkend="lame"/>,
88 <xref linkend="libtheora"/>,
89 <xref linkend="libvorbis"/>,
90 <xref linkend="libvpx"/>, and
91 <xref linkend="x264"/>
92 </para>
93
94 <bridgehead renderas="sect4">Recommended for desktop use</bridgehead>
95 <para>
96 <xref linkend="x-window-system"/>,
97 <xref linkend="alsa-lib"/>,
98 <xref linkend="sdl"/>,
99 <xref linkend="libva"/> and
100 <xref linkend="libvdpau"/> (with the corresponding driver package)
101 </para>
102
103 <bridgehead renderas="sect4">Optional</bridgehead>
104 <para role="optional">
105 <xref linkend="faac"/>,
106 <xref linkend="freetype2"/>,
107 <xref linkend="libwebp"/>,
108 <xref linkend="openjpeg"/>,
109 <xref linkend="pulseaudio"/>,
110 <xref linkend="speex"/>,
111 <xref linkend="xvid"/>,
112 <xref linkend="openssl"/>,
113 <xref linkend="fontconfig"/>,
114 <xref linkend="gnutls"/>,
115 <xref linkend="opus"/>,
116<!-- <ulink url="http://www.piksel.org/frei0r">frei0r</ulink>,-->
117 <ulink url="https://files.dyne.org/frei0r/snapshots/">frei0r</ulink>,
118 <ulink url="http://xhevc.com/en/hevc/decoder/download.jsp">HEVC/H.265</ulink>,
119 <ulink url="http://www.ladspa.org/">LADSPA</ulink>,
120 <ulink url="http://www.libssh.org/">libssh</ulink>,
121 <ulink url="http://zapping.sourceforge.net/ZVBI/">ZVBI</ulink>,
122 <ulink url="http://tipok.org.ua/node/17">libaacplus</ulink>,
123 <ulink url="http://www.videolan.org/developers/libbluray.html">libbluray</ulink>,
124 <ulink url="http://caca.zoy.org/">libcaca</ulink>,
125 <ulink url="http://www.celt-codec.org/">libcelt</ulink>,
126 <ulink url="http://ftp.gnu.org/pub/gnu/libcdio/">libcdio</ulink>,
127 <ulink url="http://sourceforge.net/projects/libdc1394">libdc1394</ulink>,
128 <ulink url="http://www.speech.cs.cmu.edu/flite/">Flite</ulink>,
129 <ulink url="http://www.quut.com/gsm/">GSM</ulink>,
130 <ulink url="https://ieee1394.wiki.kernel.org/index.php/Libraries">libiec61883</ulink>,
131 <ulink url="https://github.com/dekkers/libilbc">libilbc</ulink>,
132 <ulink url="http://sourceforge.net/projects/modplug-xmms/">libmodplug</ulink>,
133 <ulink url="https://github.com/Distrotech/libnut">libnut</ulink> (Git checkout),
134 <ulink url="http://sourceforge.net/projects/opencore-amr">OpenCore AMR</ulink>,
135 <ulink url="http://opencv.org/">OpenCV</ulink>,
136 <ulink url="http://rtmpdump.mplayerhq.hu/">librtmp</ulink>,
137 <ulink url="http://diracvideo.org/">Schroedinger</ulink>,
138 <ulink url="http://www.twolame.org/">TwoLAME</ulink>,
139 <ulink url="http://linuxtv.org/downloads/v4l-utils/">Video4Linux</ulink>,
140 <ulink url="http://sourceforge.net/projects/opencore-amr/files/vo-aacenc/">vo-aaenc</ulink>,
141 <ulink url="http://sourceforge.net/projects/opencore-amr/files/vo-amrwbenc/">vo-amrwbenc</ulink>,
142 <ulink url="http://xavs.sourceforge.net/">libxavs</ulink> (SVN checkout),
143 <ulink url="http://kcat.strangesoft.net/openal-releases/">OpenAL</ulink>,
144 <ulink url="http://www.nongnu.org/texi2html">texi2html</ulink> (to build HTML documentation), and
145 <ulink url="http://www.videolan.org/developers/x265.html">x265 (H.265/MPEG-H HEVC)</ulink>
146 </para>
147
148 <para condition="html" role="usernotes">
149 User Notes: <ulink url="&blfs-wiki;/ffmpeg"/>
150 </para>
151 </sect2>
152
153 <sect2 role="installation">
154 <title>Installation of FFmpeg</title>
155
156<!--<para>
157 If <application>Xorg</application> is installed in a prefix other
158 than <filename class='directory'>/usr</filename>, the build will fail. Fix
159 this by issuing the following command:
160 </para>
161
162<screen><userinput>export LIBRARY_PATH=$XORG_PREFIX/lib</userinput></screen>
163-->
164 <para>
165 Install <application>FFmpeg</application> by running the following
166 commands:
167 </para>
168
169<screen><userinput>sed -i 's/-lflite"/-lflite -lasound"/' configure &amp;&amp;
170./configure --prefix=/usr \
171 --enable-gpl \
172 --enable-version3 \
173 --enable-nonfree \
174 --disable-static \
175 --enable-shared \
176 --disable-debug \
177 --enable-libass \
178 --enable-libfdk-aac \
179 --enable-libmp3lame \
180 --enable-libtheora \
181 --enable-libvorbis \
182 --enable-libvpx \
183 --enable-libx264 \
184 --enable-x11grab &amp;&amp;
185make &amp;&amp;
186gcc tools/qt-faststart.c -o tools/qt-faststart</userinput></screen>
187<!--
188unset LIBRARY_PATH</userinput></screen>-->
189
190 <para>
191 HTML documentation was built in the previous step if
192 <ulink url="http://www.nongnu.org/texi2html">texi2html</ulink> is
193 installed. If the HTML was built (check for any
194 <filename class="extension">.html</filename> files in the
195 <filename class="directory">doc</filename> directory) and you have
196 <xref linkend="texlive"/> installed and wish to build PDF and
197 Postscript versions of the documentation, issue the following commands:
198 </para>
199
200<screen><userinput>pushd doc &amp;&amp;
201for DOCNAME in `basename -s .html *.html`
202do
203 texi2pdf -b $DOCNAME.texi &amp;&amp;
204 texi2dvi -b $DOCNAME.texi &amp;&amp;
205 dvips -o $DOCNAME.ps \
206 $DOCNAME.dvi
207done &amp;&amp;
208popd &amp;&amp;
209unset DOCNAME</userinput></screen>
210
211 <para>
212 If you have <xref linkend="doxygen"/> installed and wish to create the API
213 documentation (takes about 350 MB of space), issue the command
214 <command>doxygen doc/Doxyfile</command>.
215 </para>
216
217 <para>
218 To properly test the installation you must have <xref linkend="rsync"/>
219 installed and follow the instructions for the
220 <ulink url="http://www.ffmpeg.org/fate.html">
221 FFmpeg Automated Testing Environment</ulink> (FATE). First, over 760 MB
222 of sample files used to run FATE are downloaded with the command:
223 </para>
224
225<screen><userinput>make fate-rsync SAMPLES=fate-suite/</userinput></screen>
226
227 <para>
228 The <filename class="directory">fate-suite</filename> directory is
229 created and the files are downloaded there. That command actually runs
230 <command>rsync -vrltLW --timeout=60 --contimeout=60 rsync://fate-suite.ffmpeg.org/fate-suite/ fate-suite/</command>
231 command, thus you may want to compress and keep this directory for
232 testing again, in another system, or when a new version of ffmpeg is
233 launched. Then, you unpack the sample files in the source directory, and
234 run, again, the <command>make</command> command above, to sync with the
235 repository. Now, the download size and time are drastically reduced.
236 Estimated values in "Package Information" do not include the download
237 SBU. Next, FATE is executed, with the commands (you obtain a number of
238 tests greater than 1900):
239 </para>
240
241<screen><userinput>make fate SAMPLES=fate-suite/ | tee ../fate.log &amp;&amp;
242grep ^TEST ../fate.log | wc -l</userinput></screen>
243
244 <para>
245 Now, as the <systemitem class="username">root</systemitem> user:
246 </para>
247
248<screen role="root"><userinput>make install &amp;&amp;
249install -v -m755 tools/qt-faststart /usr/bin &amp;&amp;
250install -v -m755 -d /usr/share/doc/ffmpeg &amp;&amp;
251install -v -m644 doc/*.txt \
252 /usr/share/doc/ffmpeg</userinput></screen>
253
254 <para>
255 If HTML documentation was built, issue the following command to install it:
256 </para>
257
258<screen role="root"><userinput>install -v -m644 doc/*.html \
259 /usr/share/doc/ffmpeg</userinput></screen>
260
261 <para>
262 If you used <command>doxygen</command> to create the API documentation,
263 install it (another 300 MB of space) by issuing the following commands
264 as the <systemitem class="username">root</systemitem> user:
265 </para>
266
267<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/ffmpeg/api &amp;&amp;
268install -v -m644 doc/doxy/html/* \
269 /usr/share/doc/ffmpeg/api</userinput></screen>
270
271 </sect2>
272
273 <sect2 role="commands">
274 <title>Command Explanations</title>
275
276 <para>
277 <command>sed -i ...</command>: This command adds the
278 <application>ALSA</application> library to the
279 <application>Flite</application> <envar>LDFLAGS</envar> variable and
280 enables the discovery of <application>Flite</application>.
281 </para>
282
283 <para>
284 <option>--enable-libfreetype</option>: Enables
285 <application>Freetype</application> support.
286 </para>
287
288 <para>
289 <parameter>--enable-gpl</parameter>: Enables the use of GPL code and
290 permits support for postprocessing, swscale and many other features.
291 </para>
292
293 <para>
294 <parameter>--enable-version3</parameter>: Enables the use of (L)GPL
295 version 3 code.
296 </para>
297
298 <para>
299 <parameter>--enable-nonfree</parameter>: Enables the use of nonfree
300 code. Note that the resulting libraries and binaries will be
301 unredistributable.
302 </para>
303
304 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
305 href="../../xincludes/static-libraries.xml"/>
306
307 <para>
308 <parameter>--enable-shared</parameter>: Enables building shared libraries,
309 otherwise only static libraries are built and installed.
310 </para>
311
312 <para>
313 <parameter>--disable-debug</parameter>: Disables building debugging
314 symbols into the programs and libraries.
315 </para>
316
317 <para>
318 <parameter>--enable-libass</parameter>: Enables ASS/SSA subtitle format
319 rendering via <filename class="libraryfile">libass</filename>.
320 </para>
321
322 <para>
323 <parameter>--enable-libfdk-aac</parameter>: Enables currently the
324 highest-quality AAC audio encoding via <filename
325 class="libraryfile">libfdk-aac</filename>.
326 </para>
327
328 <para>
329 <parameter>--enable-libmp3lame</parameter>: Enables MP3 audio encoding via
330 <filename class="libraryfile">libmp3lame</filename>.
331 </para>
332
333 <para>
334 <parameter>--enable-libvorbis --enable-libtheora</parameter>: Enables
335 Theora video encoding via <filename
336 class="libraryfile">libvorbis</filename> and <filename
337 class="libraryfile">libtheora</filename>.
338 </para>
339
340 <para>
341 <parameter>--enable-libvorbis --enable-libvpx</parameter>: Enables WebM
342 encoding via <filename class="libraryfile">libvorbis</filename> and
343 <filename class="libraryfile">libvpx</filename>.
344 </para>
345
346 <para>
347 <parameter>--enable-libx264</parameter>: Enables high-quality H.264/MPEG-4
348 AVC encoding via <filename class="libraryfile">libx264</filename>.
349 </para>
350
351 <para>
352 <parameter>--enable-x11grab</parameter>: Enables X11 grabbing.
353 </para>
354
355 <para>
356 <command>gcc tools/qt-faststart.c -o tools/qt-faststart</command>:
357 This builds the <command>qt-faststart</command> program which can
358 modify QuickTime formatted movies
359 (<filename class="extension">.mov</filename> or
360 <filename class="extension">.mp4</filename>) so that the header information
361 is located at the beginning of the file instead of the end. This allows
362 the movie file to begin playing before the entire file has been downloaded.
363 </para>
364
365 <note>
366 <para>
367 Support for most of the dependency packages requires using options
368 passed to the <command>configure</command> script. View the output
369 from <command>./configure --help</command> for complete information
370 about enabling dependency packages.
371 </para>
372 </note>
373
374 </sect2>
375
376 <sect2 role="configuration">
377 <title>Configuring FFmpeg</title>
378
379 <sect3 id="ffmpeg-config">
380 <title>Config Files</title>
381
382 <para>
383 <filename>/etc/ffserver.conf</filename> and
384 <filename>~/.ffmpeg/ffserver-config</filename>
385 </para>
386
387 <indexterm zone="ffmpeg ffmpeg-config">
388 <primary
389 sortas="e-AA.ffmpeg-ffserver-config">~/.ffmpeg/ffserver-config</primary>
390 </indexterm>
391
392 <indexterm zone="ffmpeg ffmpeg-config">
393 <primary sortas="e-etc-ffserver.conf">/etc/ffserver.conf</primary>
394 </indexterm>
395
396 <para>
397 You'll find a sample <command>ffserver</command> configuration file at
398 <filename>doc/ffserver.conf</filename> in the source tree.
399 </para>
400
401 </sect3>
402
403 </sect2>
404
405 <sect2 role="content">
406 <title>Contents</title>
407
408 <segmentedlist>
409 <segtitle>Installed Programs</segtitle>
410 <segtitle>Installed Libraries</segtitle>
411 <segtitle>Installed Directories</segtitle>
412
413 <seglistitem>
414 <seg>
415 ffmpeg, ffplay, ffprobe, ffserver, and
416 qt-faststart
417 </seg>
418 <seg>
419 libavcodec.so, libavdevice.so, libavfilter.so,
420 libavformat.so, libavutil.so, libpostproc.so,
421 libswresample, and libswscale.so
422 </seg>
423 <seg>
424 /usr/include/libavcodec,
425 /usr/include/libavdevice,
426 /usr/include/libavfilter,
427 /usr/include/libavformat,
428 /usr/include/libavutil,
429 /usr/include/libpostproc,
430 /usr/include/libswresample
431 /usr/include/libswscale,
432 /usr/share/ffmpeg, and
433 /usr/share/doc/ffmpeg
434 </seg>
435 </seglistitem>
436 </segmentedlist>
437
438 <variablelist>
439 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
440 <?dbfo list-presentation="list"?>
441 <?dbhtml list-presentation="table"?>
442
443 <varlistentry id="ffmpeg-prog">
444 <term><command>ffmpeg</command></term>
445 <listitem>
446 <para>
447 is a command-line tool to convert video files, network streams and
448 input from a TV card to several video formats.
449 </para>
450 <indexterm zone="ffmpeg ffmpeg-prog">
451 <primary sortas="b-ffmpeg">ffmpeg</primary>
452 </indexterm>
453 </listitem>
454 </varlistentry>
455
456 <varlistentry id="ffplay">
457 <term><command>ffplay</command></term>
458 <listitem>
459 <para>
460 is a very simple and portable media player using the
461 <filename>ffmpeg</filename> libraries and the SDL library.
462 </para>
463 <indexterm zone="ffmpeg ffplay">
464 <primary sortas="b-ffplay">ffplay</primary>
465 </indexterm>
466 </listitem>
467 </varlistentry>
468
469 <varlistentry id="ffprobe">
470 <term><command>ffprobe</command></term>
471 <listitem>
472 <para>
473 gathers information from multimedia streams and prints it in a human
474 and machine-readable fashion.
475 </para>
476 <indexterm zone="ffmpeg ffprobe">
477 <primary sortas="b-ffprobe">ffprobe</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
481
482 <varlistentry id="ffserver">
483 <term><command>ffserver</command></term>
484 <listitem>
485 <para>
486 is a streaming server for everything that <command>ffmpeg</command>
487 could use as input (files, streams, TV card input, webcam, etc).
488 </para>
489 <indexterm zone="ffmpeg ffserver">
490 <primary sortas="b-ffserver">ffserver</primary>
491 </indexterm>
492 </listitem>
493 </varlistentry>
494
495 <varlistentry id="qt-faststart">
496 <term><command>qt-faststart</command></term>
497 <listitem>
498 <para>
499 moves the index file to the front of quicktime (mov/mp4) videos.
500 </para>
501 <indexterm zone="ffmpeg qt-faststart">
502 <primary sortas="b-qt-faststart">qt-faststart</primary>
503 </indexterm>
504 </listitem>
505 </varlistentry>
506
507 <varlistentry id="libavcodec">
508 <term><filename class="libraryfile">libavcodec.so</filename></term>
509 <listitem>
510 <para>
511 is a library containing the <application>FFmpeg</application> codecs
512 (both encoding and decoding).
513 </para>
514 <indexterm zone="ffmpeg libavcodec">
515 <primary sortas="c-libavcodec">libavcodec.so</primary>
516 </indexterm>
517 </listitem>
518 </varlistentry>
519
520 <varlistentry id="libavdevice">
521 <term><filename class="libraryfile">libavdevice.so</filename></term>
522 <listitem>
523 <para>
524 is the <application>FFmpeg</application> device handling library.
525 </para>
526 <indexterm zone="ffmpeg libavdevice">
527 <primary sortas="c-libavdevice">libavdevice.so</primary>
528 </indexterm>
529 </listitem>
530 </varlistentry>
531
532 <varlistentry id="libavfilter">
533 <term><filename class="libraryfile">libavfilter.so</filename></term>
534 <listitem>
535 <para>
536 is a library of filters that can alter video or audio between the
537 decoder and the encoder (or output).
538 </para>
539 <indexterm zone="ffmpeg libavfilter">
540 <primary sortas="c-libavfilter">libavfilter.so</primary>
541 </indexterm>
542 </listitem>
543 </varlistentry>
544
545 <varlistentry id="libavformat">
546 <term><filename class="libraryfile">libavformat.so</filename></term>
547 <listitem>
548 <para>
549 is a library containing the file formats handling (mux and demux
550 code for several formats) used by <command>ffplay</command> as well
551 as allowing the generation of audio or video streams.
552 </para>
553 <indexterm zone="ffmpeg libavformat">
554 <primary sortas="c-libavformat">libavformat.so</primary>
555 </indexterm>
556 </listitem>
557 </varlistentry>
558
559 <varlistentry id="libavutil">
560 <term><filename class="libraryfile">libavutil.so</filename></term>
561 <listitem>
562 <para>
563 is the <application>FFmpeg</application> utility library.
564 </para>
565 <indexterm zone="ffmpeg libavutil">
566 <primary sortas="c-libavutil">libavutil.so</primary>
567 </indexterm>
568 </listitem>
569 </varlistentry>
570
571 <varlistentry id="libpostproc">
572 <term><filename class="libraryfile">libpostproc.so</filename></term>
573 <listitem>
574 <para>
575 is the <application>FFmpeg</application> post processing library.
576 </para>
577 <indexterm zone="ffmpeg libpostproc">
578 <primary sortas="c-libpostproc">libpostproc.so</primary>
579 </indexterm>
580 </listitem>
581 </varlistentry>
582
583 <varlistentry id="libswresample">
584 <term><filename class="libraryfile">libswresample.so</filename></term>
585 <listitem>
586 <para>
587 is the <application>FFmpeg</application> audio rescaling library,
588 it contains functions for converting audio sample formats.
589 </para>
590 <indexterm zone="ffmpeg libswresample">
591 <primary sortas="c-libswresample">libswresample.so</primary>
592 </indexterm>
593 </listitem>
594 </varlistentry>
595
596 <varlistentry id="libswscale">
597 <term><filename class="libraryfile">libswscale.so</filename></term>
598 <listitem>
599 <para>
600 is the <application>FFmpeg</application> image rescaling library.
601 </para>
602 <indexterm zone="ffmpeg libswscale">
603 <primary sortas="c-libswscale">libswscale.so</primary>
604 </indexterm>
605 </listitem>
606 </varlistentry>
607
608 </variablelist>
609
610 </sect2>
611
612</sect1>
Note: See TracBrowser for help on using the repository browser.