glfs/multimedia/videoutils/ffmpeg.xml
Randy McMurchy f1e103ab0b Added new package TeX Live-20100722
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@8820 af4574ff-66df-0310-9fd7-8a98e5e911e0
2011-01-18 00:13:43 +00:00

397 lines
16 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY ffmpeg-download-http "http://ffmpeg.org/releases/ffmpeg-&ffmpeg-version;.tar.bz2">
<!ENTITY ffmpeg-download-ftp " ">
<!ENTITY ffmpeg-md5sum "4f5d732d25eedfb072251b5314ba2093">
<!ENTITY ffmpeg-size "3.5 MB">
<!ENTITY ffmpeg-buildsize "328 MB (built with recommended dependencies)">
<!ENTITY ffmpeg-time "2.1 SBU">
]>
<sect1 id="ffmpeg" xreflabel="FFmpeg-&ffmpeg-version;">
<?dbhtml filename="ffmpeg.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>FFmpeg-&ffmpeg-version;</title>
<indexterm zone="ffmpeg">
<primary sortas="a-FFmpeg">FFmpeg</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to FFmpeg</title>
<para><application>FFmpeg</application> is a solution to record, convert and
stream audio and video. It is a very fast video and audio converter and it can
also acquire from a live audio/video source. Designed to be intuitive, the
command-line interface (<command>ffmpeg</command>) tries to figure out all the
parameters, when possible. <application>FFmpeg</application> can also convert
from any sample rate to any other, and resize video on the fly with a high
quality polyphase filter. <application>FFmpeg</application> can use a
video4linux compatible video source and any Open Sound System audio
source.</para>
<para>The developers of this package do not make releases very often, so you
may wish to use a snapshot instead of this release. If you do that, you must
expect the acceptable <command>configure</command> switches, and the
dependencies, to change.</para>
&lfs67_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&ffmpeg-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&ffmpeg-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &ffmpeg-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &ffmpeg-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &ffmpeg-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &ffmpeg-time;</para>
</listitem>
</itemizedlist>
<!-- <bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Required patch: <ulink
url="&patch-root;/ffmpeg-&ffmpeg-version;-gcc4-1.patch"/></para>
</listitem>
<listitem>
<para>Required patch: <ulink
url="&patch-root;/ffmpeg-&ffmpeg-version;-amr_fixes-1.patch"/></para>
</listitem>
</itemizedlist> -->
<bridgehead renderas="sect3">FFmpeg Dependencies</bridgehead>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="faad2"/>,
<xref linkend="lame"/>,
<xref linkend="libtheora"/>,
<xref linkend="libvorbis"/>,
<xref linkend="libvpx"/>,
<xref linkend="x-window-system"/>,
<ulink url="http://www.videolan.org/developers/x264.html">x264</ulink>
(tested with the 20100615-2245 snapshot : x264 needs
<ulink url="http://www.tortall.net/projects/yasm/">yasm</ulink> unless you
configure it with <literal>--disable-asm</literal>),
<xref linkend="xvid"/></para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<ulink url="http://www.penguin.cz/~utx/amr">AMR narrowband (floating point)</ulink>,
<ulink url="http://www.penguin.cz/~utx/amr">AMR wideband</ulink>,
<xref linkend="faac"/>,
<xref linkend="freetype2"/>,
<ulink url="http://kbs.cs.tu-berlin.de/~jutta/gsm/">GSM</ulink>,
<xref linkend="imlib2"/>,
<xref linkend="liba52"/>,
<ulink url="http://sourceforge.net/projects/libdc1394">libdc1394</ulink>,
<ulink url="http://svn.mplayerhq.hu/nut/src/trunk/">libnut</ulink> (SVN checkout),
<ulink url="http://sourceforge.net/projects/librtmp">librtmp</ulink>,
<ulink url="http://diracvideo.org/">libschroedinger</ulink>,
<ulink url="http://medialibrary.sourceforge.net/">MediaLibrary</ulink>,
<ulink url="http://www.openjpeg.org">OpenJPEG</ulink>,
<xref linkend="sdl"/>,
<xref linkend="speex"/>,
<ulink url="http://www.tortall.net/projects/yasm/">yasm</ulink>, and
<xref linkend="tetex"/> or
<ulink url="http://www.nongnu.org/texi2html">texi2html</ulink>
(to build HTML documentation)</para>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/ffmpeg"/></para>
</sect2>
<sect2 role="installation">
<title>Installation of FFmpeg</title>
<para>Install <application>FFmpeg</application> by running the following
commands:</para>
<screen><userinput>sed -i 's/-number//' Makefile &amp;&amp;
./configure --prefix=/usr --enable-shared \
--enable-pthreads --enable-gpl \
--enable-swscale --enable-postproc \
--enable-libfaad --enable-libmp3lame \
--enable-libtheora --enable-libvorbis \
--enable-libvpx --enable-libx264 \
--enable-libxvid &amp;&amp;
make</userinput></screen>
<para>If you have <application>teTeX</application> or
<application>texi2html</application> installed, the HTML
documentation was built during the <command>make</command> process. If you
wish to create additional formats of the documentation, you must have
<application>teTeX</application> or <xref linkend="texlive"/> installed,
and issue the following commands:</para>
<screen><userinput>cd doc &amp;&amp;
for DOCNAME in faq ffmpeg-doc ffplay-doc ffprobe-doc ffserver-doc general libavfilter; do
texi2dvi -b -p $DOCNAME.texi
texi2dvi -b $DOCNAME.texi
dvips -o $DOCNAME.ps $DOCNAME.dvi
if [ $DOCNAME = ffserver-doc ] || [ $DOCNAME = ffplay-doc ] || [ $DOCNAME = ffprobe-doc ]; then \
continue
fi
makeinfo --plaintext --force -o $DOCNAME.txt $DOCNAME.texi
done &amp;&amp;
cd .. &amp;&amp;
unset DOCNAME</userinput></screen>
<para>If you have <xref linkend="doxygen"/> installed and wish to create
the API documentation (takes about 150 MB of space), issue
<command>doxygen</command>.</para>
<para>If you wish to run the tests, issue: <command>make check</command> -
that will take about 0.9 SBU and use another 365 MB of space.</para>
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>make install &amp;&amp;
install -v -m755 -d /usr/share/doc/ffmpeg-&ffmpeg-version; &amp;&amp;
install -v -m644 doc/*.txt /usr/share/doc/ffmpeg-&ffmpeg-version; &amp;&amp;
texi2html --version >/dev/null 2>&amp;1 || make install-man</userinput></screen>
<para>If you created additional formats of the documentation,
install it by issuing the following commands as the
<systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>install -v -m644 doc/*.{html,dvi,pdf,ps} \
/usr/share/doc/ffmpeg-&ffmpeg-version;</userinput></screen>
<para>If you created the API documentation, install it by issuing the
following commands as the
<systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/ffmpeg-&ffmpeg-version;/api &amp;&amp;
cp -v doxy/* /usr/share/doc/ffmpeg-&ffmpeg-version;/api</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para><parameter>sed -i 's/-number//' Makefile</parameter>: Recent versions
of gnu <command>texi2html</command> error out because
<command>-number</command> is now ambiguous (for number-footnote or
number-sections). Neither choice makes any difference to what is created
here, and the same is true with older versions of
<command>texi2html</command>, e.g. from application
<application>teTeX</application>.</para>
<para><parameter>--enable-shared</parameter>: This switch is needed to
build the shared libraries, otherwise only static libraries are built
and installed.</para>
<para><parameter>--enable-pthreads</parameter>: This switch enables the
build to link against the Posix threads library.</para>
<para><parameter>--enable-gpl</parameter>: This switch enables the
use of GPL code and permits support for postprocessing, swscale, liba54,
xvid, x264, libfaad2 and x11grab to be selected.</para>
<para><parameter>--enable-swscale</parameter>: This switch causes libswscale
to be built.</para>
<para><parameter>--enable-postprocessing</parameter>: This switch causes
libpostproc to be built.</para>
<para><option>--enable-<replaceable>&lt;codec&gt;</replaceable></option>: Review
the available options and codecs using the
<command>./configure --help</command> command. You must explicitly enable
each optional codec. If you have not installed some of the recommended
dependencies, do not enable those you have omitted.</para>
<para><option>--disable-ffplay</option>: Only installs the server part.
Use this option if <application>X</application> is not installed.</para>
<para><option>--disable-static</option>: This switch prevents the static
libraries from being built.</para>
<para><command>if [ $DOCNAME = ffserver-doc ] ...</command> These three
.texi files are rejected by <command>makeinfo</command> because of syntax
errors.</para>
</sect2>
<sect2 role="configuration">
<title>Configuring FFmpeg</title>
<sect3 id="ffmpeg-config">
<title>Config Files</title>
<para><filename>/etc/ffserver.conf</filename> and
<filename>~/.ffmpeg/ffserver-config</filename></para>
<indexterm zone="ffmpeg ffmpeg-config">
<primary sortas="e-AA.ffmpeg-ffserver-config">~/.ffmpeg/ffserver-config</primary>
</indexterm>
<indexterm zone="ffmpeg ffmpeg-config">
<primary sortas="e-etc-ffserver.conf">/etc/ffserver.conf</primary>
</indexterm>
<para>You'll find a sample ffserver configuration file at
<ulink url="http://ffmpeg.sourceforge.net/sample.html"/> (also
<filename>doc/ffserver.conf</filename> in the source tree).</para>
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>ffmpeg, ffplay, ffprobe, and ffserver</seg>
<seg>libavcodec.{so,a}, libavdevice.{so,a}, libavformat.{so,a},
libavutil.{so,a}, libpostproc.{so,a}, and libswscale.{so,a}</seg>
<seg>/usr/include/libavcodec, /usr/include/libavdevice,
/usr/include/libavformat, /usr/include/libavutil, /usr/include/postproc,
/usr/include/libswscale, /usr/share/ffmpeg, and
/usr/share/doc/ffmpeg-&ffmpeg-version;</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="ffmpeg-prog">
<term><command>ffmpeg</command></term>
<listitem>
<para>is a command-line tool to convert video files, network streams
and input from a TV card to several video formats.</para>
<indexterm zone="ffmpeg ffmpeg-prog">
<primary sortas="b-ffmpeg">ffmpeg</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="ffplay">
<term><command>ffplay</command></term>
<listitem>
<para>is a very simple and portable media player using the
<filename>ffmpeg</filename> libraries and the SDL library.</para>
<indexterm zone="ffmpeg ffplay">
<primary sortas="b-ffplay">ffplay</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="ffserver">
<term><command>ffserver</command></term>
<listitem>
<para>is a streaming server for everything that <command>ffmpeg</command>
could use as input (files, streams, TV card input, webcam, etc.).</para>
<indexterm zone="ffmpeg ffserver">
<primary sortas="b-ffserver">ffserver</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libavcodec">
<term><filename class='libraryfile'>libavcodec.{so,a}</filename></term>
<listitem>
<para>is a library containing the <application>FFmpeg</application>
codecs (both encoding and decoding).</para>
<indexterm zone="ffmpeg libavcodec">
<primary sortas="c-libavcodec">libavcodec.{so,a}</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libavdevice">
<term><filename class='libraryfile'>libavdevice.{so,a}</filename></term>
<listitem>
<para>is the <application>FFmpeg</application> device handling
library.</para>
<indexterm zone="ffmpeg libavdevice">
<primary sortas="c-libavdevice">libavdevice.{so,a}</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libavformat">
<term><filename class='libraryfile'>libavformat.{so,a}</filename></term>
<listitem>
<para>is a library containing the file formats handling (mux and demux code
for several formats) used by <command>ffplay</command> as well as
allowing the generation of audio or video streams.</para>
<indexterm zone="ffmpeg libavformat">
<primary sortas="c-libavformat">libavformat.{so,a}</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libavutil">
<term><filename class='libraryfile'>libavutil.{so,a}</filename></term>
<listitem>
<para>is the <application>FFmpeg</application> utility library.</para>
<indexterm zone="ffmpeg libavutil">
<primary sortas="c-libavutil">libavutil.{so,a}</primary>
</indexterm>
</listitem>
</varlistentry>
<!-- Both mplayer and ffmpeg now create libpostproc. The validation
for the book is not impressed by that, and it falls apart without giving
any useful information if the id is changed to "libpostproc (from ffmpeg)"
or any other variant using spaces or parenthesis or square brackets, so
try this variant : mmm, bizarrely, it accepts this but drops everything from
the first hyphen, so that in longindex.html it looks just right (one library,
two packages) -->
<varlistentry id="libpostproc-from-ffmpeg">
<term><filename class='libraryfile'>libpostproc.{so,a}</filename></term>
<listitem>
<para>is the <application>FFmpeg</application> post processing
library.</para>
<indexterm zone="ffmpeg libpostproc">
<primary sortas="c-libpostproc">libpostproc.{so,a}</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libswscale">
<term><filename class='libraryfile'>libswscale.{so,a}</filename></term>
<listitem>
<para>is the <application>FFmpeg</application> image rescaling
library.</para>
<indexterm zone="ffmpeg libswscale">
<primary sortas="c-libswscale">libswscale.{so,a}</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>