source: multimedia/videoutils/ffmpeg.xml@ c012c1a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since c012c1a was c012c1a, checked in by Igor Živković <igor@…>, 11 years ago

clarify chosen ffmpeg configure switches

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@11945 af4574ff-66df-0310-9fd7-8a98e5e911e0

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