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

kde5-14686 systemd-13485
Last change on this file since 3cf61ed8 was 3cf61ed8, checked in by Christopher Gregory <cjg@…>, 10 years ago

Merge ffmpeg update from trunk.

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

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