FFmpeg-svn_20070606

Introduction to FFmpeg

FFmpeg 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 (ffmpeg) tries to figure out all the parameters, when possible. FFmpeg can also convert from any sample rate to any other, and resize video on the fly with a high quality polyphase filter. FFmpeg can use a video4linux compatible video source and any Open Sound System audio source. The developers of this package do not create or distribute package tarballs any longer. BLFS created the tarball for this package by checking out from upstream SVN the FFmpeg code dated June 6, 2007.

Package Information

FFmpeg Dependencies

Optional

AMR narrowband (floating point), AMR wideband, FAAC-1.26, FAAD2-2.6.1, FreeType-2.3.7, GSM, Imlib2-1.4.0, LAME-3.97, liba52-0.7.4, libdc1394, libnut (SVN checkout), libvorbis-1.2.0, MediaLibrary, SDL-1.2.11, Theora, X Window System, x264, XviD-1.1.3, and teTeX-3.0 (to build HTML documentation)

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/ffmpeg

Installation of FFmpeg

Review the doc/optimization.txt file in the source tree for information about optimizing the build. Additionally, you may want to build the postprocessing library as other packages such as MPlayer-1.0rc1 and Transcode-1.0.3 can utilize it, and xine Libraries-1.1.12 depends on it. See the “Command Explanations” section for additional information.

Install FFmpeg by running the following commands:

./configure --prefix=/usr \
            --enable-shared \
            --enable-pthreads \
            --disable-ffplay &&
sed -i 's|/man|/share/man|' config.mak &&
make &&
texi2html --version >/dev/null 2>&1 || make doc/ff{mpeg,play,server}.1

If you have teTeX installed, the HTML documentation was built during the make process. If you wish to create additional formats of the documentation, you must have teTeX installed, then issue following commands:

cd doc &&
for DOCNAME in faq ffmpeg-doc hooks ffserver-doc ffplay-doc; do
    texi2dvi -b -p $DOCNAME.texi
    texi2dvi -b    $DOCNAME.texi
    dvips -o $DOCNAME.ps $DOCNAME.dvi
    if [ $DOCNAME = ffserver-doc ] || [ $DOCNAME = ffplay-doc ]; then \
        continue
    fi
    makeinfo --plaintext --force -o $DOCNAME.txt $DOCNAME.texi
done &&
cd .. &&
unset DOCNAME

If you have Doxygen-1.5.2 installed and wish to create the API documentation (takes about 100 MB of space), issue doxygen.

This package does not come with a test suite that works.

Now, as the root user:

make install &&
install -v -m755 -d        /usr/share/doc/ffmpeg-svn_20070606 &&
install -v -m644 doc/*.txt /usr/share/doc/ffmpeg-svn_20070606 &&
texi2html --version >/dev/null 2>&1 || make install-man

If you created additional formats of the documentation, install it by issuing the following commands as the root user:

install -v -m644 doc/*.{html,dvi,pdf,ps} \
    /usr/share/doc/ffmpeg-svn_20070606

If you created the API documentation, install it by issuing the following commands as the root user:

install -v -m755 -d /usr/share/doc/ffmpeg-svn_20070606/api &&
cp -v doxy/*        /usr/share/doc/ffmpeg-svn_20070606/api

Command Explanations

--enable-shared: This switch is needed to build the shared libraries, otherwise only static libraries are built and installed.

--enable-pthreads: This switch enables the build to link against the Posix threads library.

--disable-ffplay: Only installs the server part. ffplay requires X for building. Remove this option if X is installed.

--enable-<codec>: Review the available options and codecs using the ./configure --help command. You must explicitly enable each optional codec. Note that if you wish to build support for postprocessing, liba52, xvid, x264, libfaad2, x11grab or swscaler, you must pass --enable-gpl to the configure script.

--enable-pp: This switch enables postprocessing support.

--enable-gpl: This switch enables the use of GPL code for postprocessing support.

texi2html --version ...: These commands are used to check the presence of the teTeX package, and builds/installs the man pages if it is not found.

Configuring FFmpeg

Config Files

/etc/ffserver.conf and ~/.ffmpeg/ffserver-config

You'll find a sample ffserver configuration file at http://ffmpeg.sourceforge.net/sample.html (also doc/ffserver.conf in the source tree).

Contents

Installed Programs: ffmpeg, ffserver, and optionally, ffplay
Installed Libraries: libavcodec.{so,a}, libavformat.{so,a}, libavutil.{so,a}, video hook modules and optionally, libpostproc.{so,a}
Installed Directories: /usr/include/ffmpeg, /usr/include/postproc, /usr/lib/vhook, and /usr/share/doc/ffmpeg-svn_20070606

Short Descriptions

ffmpeg

is a command-line tool to convert video files, network streams and input from a TV card to several video formats.

ffplay

is a very simple and portable media player using the ffmpeg libraries and the SDL library.

ffserver

is a streaming server for everything that ffmpeg could use as input (files, streams, TV card input, webcam, etc.).

libavcodec.so

is a library containing the FFmpeg codecs (both encoding and decoding).

libavformat.so

is a library containing the file formats handling (mux and demux code for several formats) used by ffplay as well as allowing the generation of audio or video streams.

Last updated on 2008-05-09 08:00:42 -0500