mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-01 13:02:35 +08:00
874f1e8833
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@9716 af4574ff-66df-0310-9fd7-8a98e5e911e0
409 lines
16 KiB
XML
409 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 "dc665cc599a739e3c5262ccdac13d129">
|
|
<!ENTITY ffmpeg-size "5.5 MB">
|
|
<!ENTITY ffmpeg-buildsize "209 MB">
|
|
<!ENTITY ffmpeg-time "3.2 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>
|
|
|
|
<!-- xine-lib and everything else that I've tried will not compile against
|
|
current FFmpeg from git
|
|
<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> -->
|
|
|
|
&lfs71_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">FFmpeg Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
<para role="recommended">
|
|
<xref linkend="yasm"/>
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
<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>
|
|
<xref linkend="xvid"/>,
|
|
<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://libgsm.sourcearchive.com/">GSM</ulink>,
|
|
<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://xavs.sourceforge.net/">libxavs</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://connect.creativelabs.com/openal/default.aspx">OpenAL</ulink>,
|
|
<ulink url="http://tipok.org.ua/node/17">libaacplus</ulink>,
|
|
<ulink url="http://code.google.com/p/libass/">libass</ulink>,
|
|
<ulink url="http://www.celt-codec.org/">libcelt</ulink>,
|
|
<ulink url="http://ftp.gnu.org/pub/gnu/libcdio/">libcdio</ulink>,
|
|
<ulink
|
|
url="http://sourceforge.net/projects/opencvlibrary/">libopencv</ulink>,
|
|
<ulink url="http://sourceforge.net/projects/libdc1394/">libdc1394</ulink>,
|
|
<ulink url="http://linuxtv.org/downloads/v4l-utils/">libv4l2</ulink>,
|
|
<ulink url="http://www.openjpeg.org">OpenJPEG</ulink>
|
|
(<application>FFmpeg</application> includes code for it's own jpeg2000
|
|
encoder and decoder which is enabled by default),
|
|
<xref linkend="speex"/>,
|
|
<xref linkend="gnutls"/>,
|
|
<xref linkend="openssl"/>,
|
|
<xref linkend="sdl"/> and
|
|
<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>mkdir build &&
|
|
cd build &&
|
|
../configure --prefix=/usr --enable-shared --disable-static --enable-gpl &&
|
|
make</userinput></screen>
|
|
|
|
<para>The <application>FFmpeg</application> source contains a tool called
|
|
<command>qt-faststart</command> that can modify QuickTime formatted movies
|
|
(mov or mp4) so that the header information is located at the beginning of
|
|
the file instead of the end. This allows video players to begin playing the
|
|
content before the entire file has been downloaded. An example of where
|
|
this is useful for preparing videos before uploading them to YouTube. If
|
|
need <command>qt-faststart</command>, you can compile it with gcc:</para>
|
|
|
|
<screen><userinput>gcc ../tools/qt-faststart.c -o qt-faststart</userinput></screen>
|
|
|
|
<para>If you have <xref linkend="doxygen"/> installed and wish to create
|
|
the API documentation (takes about 150 MB of space), issue the command
|
|
<command>doxygen</command>.</para>
|
|
|
|
<para>This package does not come with a test suite.</para>
|
|
|
|
<para>Now, as the <systemitem class="username">root</systemitem>
|
|
user:</para>
|
|
|
|
<screen role="root"><userinput>make install &&
|
|
make install-man &&
|
|
mkdir /usr/share/doc/ffmpeg-&ffmpeg-version; &&
|
|
cp ../doc/*.txt /usr/share/doc/ffmpeg-&ffmpeg-version;</userinput></screen>
|
|
|
|
<para>If you used <command>doxygen</command> to create the API
|
|
documentation, install it by issuing the following commands as the
|
|
<systemitem class="username">root</systemitem> user:</para>
|
|
|
|
<screen role="root"><userinput>mkdir /usr/share/doc/ffmpeg-&ffmpeg-version;/api &&
|
|
cp -v doxy/* /usr/share/doc/ffmpeg-&ffmpeg-version;/api</userinput></screen>
|
|
|
|
<para>If you compiled <command>qt-faststart</command> install it as the
|
|
<systemitem class="username">root</systemitem> user:</para>
|
|
|
|
<screen role="root"><userinput>cp qt-faststart /usr/bin</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<para><command>mkdir build</command> and <command>cd build</command>:
|
|
This ensures that we compile the <application>FFmpeg</application> object
|
|
files in a separate directory to the source files.</para>
|
|
|
|
<para><option>--enable-shared</option>: This switch is needed to
|
|
build the shared libraries, otherwise only static libraries are built
|
|
and installed.</para>
|
|
|
|
<para><option>--disable-static</option>: This switch prevents the static
|
|
libraries from being built.</para>
|
|
|
|
<para><option>--enable-gpl</option>: This switch enables the
|
|
use of GPL code and permits support for postprocessing, swscale and many
|
|
other features.</para>
|
|
|
|
<para><option>--enable-<replaceable><codec></replaceable></option>:
|
|
<application>FFmpeg</application> comes with code to compile decoders for
|
|
almost every codec you could think of. The only reason to enable a specific
|
|
codec (and make <application>FFmpeg</application> link to the prerequisite
|
|
shared library installed on your system) is to make ffmpeg compile an
|
|
<emphasis>encoder</emphasis> for that codec. Encoding video is a
|
|
specialist job. If that is what you want to do with
|
|
<command>ffmpeg</command>, study the output of <command>configure
|
|
--help</command>. Remember, the dependencies all install their own encoders
|
|
(that are often better than <application>FFmpeg</application>'s).
|
|
<application>FFmpeg</application> is an excellent collection of decoders.
|
|
If you just want to use <application>FFmpeg</application> to watch video or
|
|
listen to music (via other applications like
|
|
<application>Gstreamer</application>) then you will not benefit from
|
|
linking it to another library.</para>
|
|
|
|
<para><option>--disable-yasm</option>: use this option if you've not
|
|
installed yasm and you want what configure describes as "a crippled
|
|
build".</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 <command>ffserver</command> configuration file
|
|
at <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, ffserver and qt-faststart</seg>
|
|
<seg>libavcodec.so, libavdevice.so, libavfilter.so, libavformat.so,
|
|
libavutil.so, libpostproc.so, and libswscale.so</seg>
|
|
<seg>/usr/include/libavcodec, /usr/include/libavdevice,
|
|
/usr/include/libavfilter, /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="ffprobe">
|
|
<term><command>ffprobe</command></term>
|
|
<listitem>
|
|
<para>gathers information from multimedia streams and prints it in
|
|
a human and machine-readable fashion.</para>
|
|
<indexterm zone="ffmpeg ffprobe">
|
|
<primary sortas="b-ffprobe">ffprobe</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="qt-faststart">
|
|
<term><command>qt-faststart</command></term>
|
|
<listitem>
|
|
<para>moves the index file to the front of quicktime (mov/mp4)
|
|
videos.</para>
|
|
<indexterm zone="ffmpeg qt-faststart">
|
|
<primary sortas="b-qt-faststart">qt-faststart</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="libavcodec">
|
|
<term><filename class="libraryfile">libavcodec.so</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</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="libavdevice">
|
|
<term><filename class="libraryfile">libavdevice.so</filename></term>
|
|
<listitem>
|
|
<para>is the <application>FFmpeg</application> device handling
|
|
library.</para>
|
|
<indexterm zone="ffmpeg libavdevice">
|
|
<primary sortas="c-libavdevice">libavdevice.so</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="libavfilter">
|
|
<term><filename class="libraryfile">libavfilter.so</filename></term>
|
|
<listitem>
|
|
<para>is a library of filters that can alter video or audio between
|
|
the decoder and the encoder (or output).</para>
|
|
<indexterm zone="ffmpeg libavfilter">
|
|
<primary sortas="c-libavfilter">libavfilter.so</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="libavformat">
|
|
<term><filename class="libraryfile">libavformat.so</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</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="libavutil">
|
|
<term><filename class="libraryfile">libavutil.so</filename></term>
|
|
<listitem>
|
|
<para>is the <application>FFmpeg</application> utility library.</para>
|
|
<indexterm zone="ffmpeg libavutil">
|
|
<primary sortas="c-libavutil">libavutil.so</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">
|
|
<term><filename class="libraryfile">libpostproc.so</filename></term>
|
|
<listitem>
|
|
<para>is the <application>FFmpeg</application> post processing
|
|
library.</para>
|
|
<indexterm zone="ffmpeg libpostproc">
|
|
<primary sortas="c-libpostproc">libpostproc.so</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="libswscale">
|
|
<term><filename class="libraryfile">libswscale.so</filename></term>
|
|
<listitem>
|
|
<para>is the <application>FFmpeg</application> image rescaling
|
|
library.</para>
|
|
<indexterm zone="ffmpeg libswscale">
|
|
<primary sortas="c-libswscale">libswscale.so</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</sect2>
|
|
</sect1>
|