source: multimedia/videoutils/ffmpeg.xml@ 06eea232

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

Merged trunk.

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

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