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.

FFmpeg-0.4.9-pre1

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

Optional

libvorbis-1.1.1, LAME-3.96.1, Imlib2-1.2.1, X (XFree86-4.5.0 or X.org-6.8.2), SDL-1.2.8, FreeType-2.1.10, MPlayer-1.0pre7 (for the shared post-processing library), FAAC, FAAD2 and TeX-3.0 (to build HTML documentation)

Installation of FFmpeg

Install FFmpeg by running the following commands:

[Note]

Note

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

sed -i -e "s/static uint64/const uint64/" \
    libavcodec/liba52/resample_mmx.c &&
./configure --prefix=/usr --enable-shared \
    --enable-pthreads --disable-ffplay &&
make

If you have TeX installed, the man pages and documentation were built during the make process. Skip to the root user installation steps. If you do not have TeX installed, use the following command to build the man pages:

make -C doc {ffmpeg,ffserver,ffplay}.1

Now, as the root user:

make install

If you have TeX installed (which caused the HTML documentation to be built earlier), install the documentation by issuing the following commands as the root user:

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

Command Explanations

sed -i -e "s/static uint64/const uint64/" libavcodec/liba52/resample_mmx.c: This command fixes an issue on machines with MMX capability and use GCC-3.4.x to compile in A52 support using the --enable-a52 parameter passed to the configure script.

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

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, libavformat.so, and video hook modules
Installed Directories: /usr/include/ffmpeg, /usr/lib/vhook, and /usr/share/doc/ffmpeg-0.4.9-pre1

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 2005-08-01 13:29:19 -0600