source: multimedia/videoutils/ffmpeg.xml@ 12cb8c2d

7.6-blfs 7.6-systemd kde5-14269 kde5-14686 systemd-13485
Last change on this file since 12cb8c2d was 12cb8c2d, checked in by Krejzi <krejzi@…>, 10 years ago

Checks and fixes.

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