source: multimedia/videoutils/ffmpeg.xml@ 37dfd42

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

Merge previous revision on ffmpeg from trunk as well.

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

  • Property mode set to 100644
File size: 22.3 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 "9e6163b09b7b9331b834d80874c2c0ff">
10 <!ENTITY ffmpeg-size "7.1 MB">
11 <!ENTITY ffmpeg-buildsize "130 MB (additional 866 MB for docs and 1902 MB to run the FATE tests)">
12 <!ENTITY ffmpeg-time "3.5 SBU (additional 1.1 SBU for docs and 4.8 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 The fate-suite tests include comparisons with installed files, and should
208 not be run before the package is installed. Therefore, if you desire to
209 run them, instructions are given further below.
210 </para>
211
212 <para>
213 Now, as the <systemitem class="username">root</systemitem> user:
214 </para>
215
216<screen role="root"><userinput>make install &amp;&amp;
217install -v -m755 tools/qt-faststart /usr/bin &amp;&amp;
218install -v -m644 doc/*.txt \
219 /usr/share/doc/ffmpeg-&ffmpeg-version;</userinput></screen>
220
221 <para>
222 If PDF and Postscript documentations were built, issue the following
223 commands, as the <systemitem class="username">root</systemitem> user, to
224 install them:
225 </para>
226
227<screen role="root"><userinput>install -v -m644 doc/*.pdf \
228 /usr/share/doc/ffmpeg-&ffmpeg-version; &amp;&amp;
229install -v -m644 doc/*.ps \
230 /usr/share/doc/ffmpeg-&ffmpeg-version;</userinput></screen>
231
232 <para>
233 If you used <command>doxygen</command> to create the API documentation,
234 install it (another 300 MB of space) by issuing the following commands
235 as the <systemitem class="username">root</systemitem> user:
236 </para>
237
238<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/ffmpeg-&ffmpeg-version;/api &amp;&amp;
239cp -vr doc/doxy/html/* /usr/share/doc/ffmpeg-&ffmpeg-version;/api &amp;&amp;
240find /usr/share/doc/ffmpeg-&ffmpeg-version;/api -type f -exec chmod -c 0644 "{}" ";" &amp;&amp;
241find /usr/share/doc/ffmpeg-&ffmpeg-version;/api -type d -exec chmod -c 0755 "{}" ";"</userinput></screen>
242
243 <para>
244 To properly test the installation you must have <xref linkend="rsync"/>
245 installed and follow the instructions for the <ulink
246 url="http://www.ffmpeg.org/fate.html"> FFmpeg Automated Testing
247 Environment</ulink> (FATE). First, about 879 MB of sample files used to
248 run FATE are downloaded with the command:
249 </para>
250
251<screen><userinput>make fate-rsync SAMPLES=fate-suite/</userinput></screen>
252
253 <para>
254 The <filename class="directory">fate-suite</filename> directory is
255 created and the files are downloaded there. That command actually runs
256 <command>rsync -vrltLW --timeout=60 --contimeout=60
257 rsync://fate-suite.ffmpeg.org/fate-suite/ fate-suite/</command> command,
258 thus you may want to compress and keep this directory for testing again,
259 in another system, or when a new version of ffmpeg is launched. Then, you
260 unpack the sample files in the source directory, and run, again, the
261 <command>make</command> command above, to sync with the repository. Now,
262 the download size and time are drastically reduced. Estimated values in
263 "Package Information" do not include the download SBU. Next, FATE is
264 executed, with the commands (you obtain a number of tests greater than
265 2000):
266 </para>
267
268<screen><userinput>make fate SAMPLES=fate-suite/ | tee ../fate.log &amp;&amp;
269grep ^TEST ../fate.log | wc -l</userinput></screen>
270
271 </sect2>
272
273 <sect2 role="commands">
274 <title>Command Explanations</title>
275
276 <para>
277 <command>sed -i ... configure</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 <command>sed -i ... texi</command>: Fix some .texi files for
285 documentation builds.
286 </para>
287
288 <para>
289 <command>find ... ";"</command>: Fix permissions of documentation files
290 and directories.
291 </para>
292
293 <para>
294 <option>--enable-libfreetype</option>: Enables
295 <application>Freetype</application> support.
296 </para>
297
298 <para>
299 <parameter>--enable-gpl</parameter>: Enables the use of GPL code and
300 permits support for postprocessing, swscale and many other features.
301 </para>
302
303 <para>
304 <parameter>--enable-version3</parameter>: Enables the use of (L)GPL
305 version 3 code.
306 </para>
307
308 <para>
309 <parameter>--enable-nonfree</parameter>: Enables the use of nonfree code.
310 Note that the resulting libraries and binaries will be unredistributable.
311 </para>
312
313 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
314 href="../../xincludes/static-libraries.xml"/>
315
316 <para>
317 <parameter>--enable-shared</parameter>: Enables building shared
318 libraries, otherwise only static libraries are built and installed.
319 </para>
320
321 <para>
322 <parameter>--disable-debug</parameter>: Disables building debugging
323 symbols into the programs and libraries.
324 </para>
325
326 <para>
327 <parameter>--enable-libass</parameter>: Enables ASS/SSA subtitle format
328 rendering via <filename class="libraryfile">libass</filename>.
329 </para>
330
331 <para>
332 <parameter>--enable-libfdk-aac</parameter>: Enables currently the
333 highest-quality AAC audio encoding via <filename
334 class="libraryfile">libfdk-aac</filename>.
335 </para>
336
337 <para>
338 <parameter>--enable-libmp3lame</parameter>: Enables MP3 audio encoding
339 via <filename class="libraryfile">libmp3lame</filename>.
340 </para>
341
342 <para>
343 <parameter>--enable-libvorbis --enable-libtheora</parameter>: Enables
344 Theora video encoding via <filename
345 class="libraryfile">libvorbis</filename> and <filename
346 class="libraryfile">libtheora</filename>.
347 </para>
348
349 <para>
350 <parameter>--enable-libvorbis --enable-libvpx</parameter>: Enables WebM
351 encoding via <filename class="libraryfile">libvorbis</filename> and
352 <filename class="libraryfile">libvpx</filename>.
353 </para>
354
355 <para>
356 <parameter>--enable-libx264</parameter>: Enables high-quality
357 H.264/MPEG-4 AVC encoding via <filename
358 class="libraryfile">libx264</filename>.A
359 </para>
360
361 <para>
362 <parameter>--enable-x11grab</parameter>: Enables X11 grabbing.
363 </para>
364
365 <para>
366 <command>gcc tools/qt-faststart.c -o tools/qt-faststart</command>: This
367 builds the <command>qt-faststart</command> program which can modify
368 QuickTime formatted movies (<filename class="extension">.mov</filename>
369 or <filename class="extension">.mp4</filename>) so that the header
370 information is located at the beginning of the file instead of the end.
371 This allows the movie file to begin playing before the entire file has
372 been downloaded.
373 </para>
374
375 <note>
376 <para>
377 Support for most of the dependency packages requires using options
378 passed to the <command>configure</command> script. View the output
379 from <command>./configure --help</command> for complete information
380 about enabling dependency packages.
381 </para>
382 </note>
383
384 </sect2>
385
386 <sect2 role="configuration">
387 <title>Configuring FFmpeg</title>
388
389 <sect3 id="ffmpeg-config">
390 <title>Config Files</title>
391
392 <para>
393 <filename>/etc/ffserver.conf</filename> and
394 <filename>~/.ffmpeg/ffserver-config</filename>
395 </para>
396
397 <indexterm zone="ffmpeg ffmpeg-config">
398 <primary
399 sortas="e-AA.ffmpeg-ffserver-config">~/.ffmpeg/ffserver-config</primary>
400 </indexterm>
401
402 <indexterm zone="ffmpeg ffmpeg-config">
403 <primary sortas="e-etc-ffserver.conf">/etc/ffserver.conf</primary>
404 </indexterm>
405
406 <para>
407 You'll find a sample <command>ffserver</command> configuration file at
408 <filename>doc/ffserver.conf</filename> in the source tree.
409 </para>
410
411 </sect3>
412
413 </sect2>
414
415 <sect2 role="content">
416 <title>Contents</title>
417
418 <segmentedlist>
419 <segtitle>Installed Programs</segtitle>
420 <segtitle>Installed Libraries</segtitle>
421 <segtitle>Installed Directories</segtitle>
422
423 <seglistitem>
424 <seg>
425 ffmpeg, ffplay, ffprobe, ffserver, and
426 qt-faststart
427 </seg>
428 <seg>
429 libavcodec.so, libavdevice.so, libavfilter.so,
430 libavformat.so, libavutil.so, libpostproc.so,
431 libswresample, and libswscale.so
432 </seg>
433 <seg>
434 /usr/include/libavcodec,
435 /usr/include/libavdevice,
436 /usr/include/libavfilter,
437 /usr/include/libavformat,
438 /usr/include/libavutil,
439 /usr/include/libpostproc,
440 /usr/include/libswresample
441 /usr/include/libswscale,
442 /usr/share/ffmpeg, and
443 /usr/share/doc/ffmpeg-&ffmpeg-version;
444 </seg>
445 </seglistitem>
446 </segmentedlist>
447
448 <variablelist>
449 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
450 <?dbfo list-presentation="list"?>
451 <?dbhtml list-presentation="table"?>
452
453 <varlistentry id="ffmpeg-prog">
454 <term><command>ffmpeg</command></term>
455 <listitem>
456 <para>
457 is a command-line tool to convert video files, network streams and
458 input from a TV card to several video formats.
459 </para>
460 <indexterm zone="ffmpeg ffmpeg-prog">
461 <primary sortas="b-ffmpeg">ffmpeg</primary>
462 </indexterm>
463 </listitem>
464 </varlistentry>
465
466 <varlistentry id="ffplay">
467 <term><command>ffplay</command></term>
468 <listitem>
469 <para>
470 is a very simple and portable media player using the
471 <filename>ffmpeg</filename> libraries and the SDL library.
472 </para>
473 <indexterm zone="ffmpeg ffplay">
474 <primary sortas="b-ffplay">ffplay</primary>
475 </indexterm>
476 </listitem>
477 </varlistentry>
478
479 <varlistentry id="ffprobe">
480 <term><command>ffprobe</command></term>
481 <listitem>
482 <para>
483 gathers information from multimedia streams and prints it in a human
484 and machine-readable fashion.
485 </para>
486 <indexterm zone="ffmpeg ffprobe">
487 <primary sortas="b-ffprobe">ffprobe</primary>
488 </indexterm>
489 </listitem>
490 </varlistentry>
491
492 <varlistentry id="ffserver">
493 <term><command>ffserver</command></term>
494 <listitem>
495 <para>
496 is a streaming server for everything that <command>ffmpeg</command>
497 could use as input (files, streams, TV card input, webcam, etc).
498 </para>
499 <indexterm zone="ffmpeg ffserver">
500 <primary sortas="b-ffserver">ffserver</primary>
501 </indexterm>
502 </listitem>
503 </varlistentry>
504
505 <varlistentry id="qt-faststart">
506 <term><command>qt-faststart</command></term>
507 <listitem>
508 <para>
509 moves the index file to the front of quicktime (mov/mp4) videos.
510 </para>
511 <indexterm zone="ffmpeg qt-faststart">
512 <primary sortas="b-qt-faststart">qt-faststart</primary>
513 </indexterm>
514 </listitem>
515 </varlistentry>
516
517 <varlistentry id="libavcodec">
518 <term><filename class="libraryfile">libavcodec.so</filename></term>
519 <listitem>
520 <para>
521 is a library containing the <application>FFmpeg</application> codecs
522 (both encoding and decoding).
523 </para>
524 <indexterm zone="ffmpeg libavcodec">
525 <primary sortas="c-libavcodec">libavcodec.so</primary>
526 </indexterm>
527 </listitem>
528 </varlistentry>
529
530 <varlistentry id="libavdevice">
531 <term><filename class="libraryfile">libavdevice.so</filename></term>
532 <listitem>
533 <para>
534 is the <application>FFmpeg</application> device handling library.
535 </para>
536 <indexterm zone="ffmpeg libavdevice">
537 <primary sortas="c-libavdevice">libavdevice.so</primary>
538 </indexterm>
539 </listitem>
540 </varlistentry>
541
542 <varlistentry id="libavfilter">
543 <term><filename class="libraryfile">libavfilter.so</filename></term>
544 <listitem>
545 <para>
546 is a library of filters that can alter video or audio between the
547 decoder and the encoder (or output).
548 </para>
549 <indexterm zone="ffmpeg libavfilter">
550 <primary sortas="c-libavfilter">libavfilter.so</primary>
551 </indexterm>
552 </listitem>
553 </varlistentry>
554
555 <varlistentry id="libavformat">
556 <term><filename class="libraryfile">libavformat.so</filename></term>
557 <listitem>
558 <para>
559 is a library containing the file formats handling (mux and demux
560 code for several formats) used by <command>ffplay</command> as well
561 as allowing the generation of audio or video streams.
562 </para>
563 <indexterm zone="ffmpeg libavformat">
564 <primary sortas="c-libavformat">libavformat.so</primary>
565 </indexterm>
566 </listitem>
567 </varlistentry>
568
569 <varlistentry id="libavutil">
570 <term><filename class="libraryfile">libavutil.so</filename></term>
571 <listitem>
572 <para>
573 is the <application>FFmpeg</application> utility library.
574 </para>
575 <indexterm zone="ffmpeg libavutil">
576 <primary sortas="c-libavutil">libavutil.so</primary>
577 </indexterm>
578 </listitem>
579 </varlistentry>
580
581 <varlistentry id="libpostproc">
582 <term><filename class="libraryfile">libpostproc.so</filename></term>
583 <listitem>
584 <para>
585 is the <application>FFmpeg</application> post processing library.
586 </para>
587 <indexterm zone="ffmpeg libpostproc">
588 <primary sortas="c-libpostproc">libpostproc.so</primary>
589 </indexterm>
590 </listitem>
591 </varlistentry>
592
593 <varlistentry id="libswresample">
594 <term><filename class="libraryfile">libswresample.so</filename></term>
595 <listitem>
596 <para>
597 is the <application>FFmpeg</application> audio rescaling library,
598 it contains functions for converting audio sample formats.
599 </para>
600 <indexterm zone="ffmpeg libswresample">
601 <primary sortas="c-libswresample">libswresample.so</primary>
602 </indexterm>
603 </listitem>
604 </varlistentry>
605
606 <varlistentry id="libswscale">
607 <term><filename class="libraryfile">libswscale.so</filename></term>
608 <listitem>
609 <para>
610 is the <application>FFmpeg</application> image rescaling library.
611 </para>
612 <indexterm zone="ffmpeg libswscale">
613 <primary sortas="c-libswscale">libswscale.so</primary>
614 </indexterm>
615 </listitem>
616 </varlistentry>
617
618 </variablelist>
619
620 </sect2>
621
622</sect1>
Note: See TracBrowser for help on using the repository browser.