Video utilities

This chapter always seems to be the favorite chapter. It's probably because there is a lot of satisfaction in playing your first video when you have spent so much time getting to that point. All those libraries, all the configurations and your reward is that you finally get to watch a movie. Not to worry though, there is always one more CODEC to install.


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.

Package information

FFmpeg dependencies

Installation of FFmpeg

Install FFmpeg by running the following commands:



Review the doc/optimization.txt file in the source tree for information about optimizing the build.

./configure --prefix=/usr --enable-shared \
    --enable-pthreads --disable-ffplay &&
make &&
make -C doc {ffmpeg,ffserver,ffplay}.1

Now, as the root user:

make install

If you have TeX installed and you wish to install the HTML documentation, run the following command as an unprivileged user:

make -C doc

Now, as the root user:

install -v -d -m755 /usr/share/doc/ffmpeg-0.4.9-pre1 &&
install -v -m644 doc/*.html /usr/share/doc/ffmpeg-0.4.9-pre1

Command explanations

--enable-shared: This switch is needed to build the libavcodec and libavformat shared libraries.

--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.

make -C doc {ffmpeg,ffserver,ffplay}.1: This builds the man pages which are installed by make install.



Linking the liba52 library using the --enable-a52 parameter to configure is known to break the build.

Configuring FFmpeg

Config files

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

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


Installed Programs: ffmpeg, ffserver and optionally, ffplay
Installed Libraries:, and video hook modules
Installed Directories: /usr/include/ffmpeg, /usr/lib/vhook and /usr/share/doc/ffmpeg-0.4.9-pre1

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.


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

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

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.