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.

This package is known to build and work properly using an LFS-7.7 systemd platform.

Package Information

  • Download (HTTP): http://ffmpeg.org/releases/ffmpeg-2.7.1.tar.bz2

  • Download MD5 sum: f159c6d7eed8546b23e1a17325cbf1f8

  • Download size: 7.8 MB

  • Estimated disk space required: 135 MB (additional 1.0 GB to build and install Doxygen, PDF and Postscript documentation)

  • Estimated build time: 3.7 SBU

FFmpeg Dependencies


Recommended for desktop use

alsa-lib-1.0.29, libva-1.5.1 (with the corresponding driver package), libvdpau-1.1 (with the corresponding driver package), and SDL-1.2.15


FAAC-1.28, FriBidi-0.19.6, Fontconfig-2.11.1, libcdio-0.93 (to identify and play CDs), libwebp-0.4.3, OpenJPEG-1.5.2, OpenSSL-1.0.2d or GnuTLS-3.4.5, PulseAudio-7.0, Samba-4.3.0, Speex-1.2rc2, texlive-20150521 (or install-tl-unx) for PDF and PS documentation, v4l-utils-1.8.0, XviD-1.3.3, X Window System, Flite, frei0r, GSM, LADSPA, libaacplus, libbluray, libcaca, libcelt, libdc1394, libdca, libiec61883, libilbc, libmodplug, libnut (Git checkout), librtmp, libssh, libxavs (SVN checkout), OpenAL, OpenCore AMR, OpenCV, Schroedinger, texi2html (to build HTML documentation), TwoLAME, vo-aaenc, vo-amrwbenc, x265, and ZVBI

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

Installation of FFmpeg

Install FFmpeg by running the following commands:

sed -i 's/-lflite"/-lflite -lasound"/' configure &&
./configure --prefix=/usr        \
            --enable-gpl         \
            --enable-version3    \
            --enable-nonfree     \
            --disable-static     \
            --enable-shared      \
            --disable-debug      \
            --enable-libass      \
            --enable-libfdk-aac  \
            --enable-libfreetype \
            --enable-libmp3lame  \
            --enable-libopus     \
            --enable-libtheora   \
            --enable-libvorbis   \
            --enable-libvpx      \
            --enable-libx264     \
            --enable-x11grab     \
            --docdir=/usr/share/doc/ffmpeg-2.7.1 &&
make &&
gcc tools/qt-faststart.c -o tools/qt-faststart

If you have texlive-20150521 installed and want to build PDF and Postscript documentation, issue the following commands:

pushd doc &&
for DOCNAME in $(basename -s .html *.html)
    texi2pdf -b $DOCNAME.texi &&
    texi2dvi -b $DOCNAME.texi &&
    dvips -o    $DOCNAME.ps $DOCNAME.dvi
done &&
popd &&

If you have Doxygen-1.8.10 installed and want to build the API documentation, issue: doxygen doc/Doxyfile.

To test the results, issue make RUNNING_FATE= check.

Now, as the root user:

make install &&
install -v -m755 tools/qt-faststart /usr/bin &&
install -v -m644 doc/*.txt /usr/share/doc/ffmpeg-2.7.1

If the PDF and Postscript documentation was built, run the following commands as the root user to install it:

install -v -m644 doc/*.pdf /usr/share/doc/ffmpeg-2.7.1 &&
install -v -m644 doc/*.ps  /usr/share/doc/ffmpeg-2.7.1

If you used doxygen to build the API documentation, you can install it by running the following commands as the root user:

install -v -dm755 /usr/share/doc/ffmpeg-2.7.1/api &&
cp -rv doc/doxy/html/* /usr/share/doc/ffmpeg-2.7.1/api

Command Explanations

sed -i ... configure: This command adds the ALSA library to the Flite LDFLAGS variable and enables the discovery of Flite.

--enable-libfreetype: Enables Freetype support.

--enable-gpl: Enables the use of GPL code and permits support for postprocessing, swscale and many other features.

--enable-version3: Enables the use of (L)GPL version 3 code.

--enable-nonfree: Enables the use of nonfree code. Note that the resulting libraries and binaries will be unredistributable.

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-shared: Enables building shared libraries, otherwise only static libraries are built and installed.

--disable-debug: Disables building debugging symbols into the programs and libraries.

--enable-libass: Enables ASS/SSA subtitle format rendering via libass.

--enable-libfdk-aac: Enables currently the highest-quality AAC audio encoding via libfdk-aac.

--enable-libmp3lame: Enables MP3 audio encoding via libmp3lame.

--enable-libvorbis --enable-libtheora: Enables Theora video encoding via libvorbis and libtheora.

--enable-libvorbis --enable-libvpx: Enables WebM encoding via libvorbis and libvpx.

--enable-libx264: Enables high-quality H.264/MPEG-4 AVC encoding via libx264.

--enable-x11grab: Enables X11 grabbing.

--enable-openssl or --enable-gnutls: Enables HTTPS protocol for network streams.

gcc tools/qt-faststart.c -o tools/qt-faststart: This builds the qt-faststart program which 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 the movie file to begin playing before the entire file has been downloaded.



Support for most of the dependency packages requires using options passed to the configure script. View the output from ./configure --help for complete information about enabling dependency packages.

Configuring FFmpeg

Config Files

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

You'll find a sample ffserver configuration file at doc/ffserver.conf in the source tree.


Installed Programs: ffmpeg, ffplay, ffprobe, ffserver and qt-faststart
Installed Libraries: libavcodec.so, libavdevice.so, libavfilter.so, libavformat.so, libavutil.so, libpostproc.so, libswresample and libswscale.so
Installed Directories: /usr/include/{libavcodec,libavdevice,libavfilter,libavformat}, /usr/include/{libavutil,libpostproc,libswresample,libswscale}, /usr/share/doc/ffmpeg-2.7.1 and /usr/share/ffmpeg

Short Descriptions


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


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


gathers information from multimedia streams and prints it in a human and machine-readable fashion.


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


moves the index file to the front of quicktime (mov/mp4) videos.


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


is the FFmpeg device handling library.


is a library of filters that can alter video or audio between the decoder and the encoder (or output).


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.


is the FFmpeg utility library.


is the FFmpeg post processing library.


is the FFmpeg audio rescaling library, it contains functions for converting audio sample formats.


is the FFmpeg image rescaling library.

Last updated on 2015-07-31 23:26:22 -0500