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 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.
Download (HTTP): http://downloads.sourceforge.net/ffmpeg/ffmpeg-0.4.9-pre1.tar.gz
Download MD5 sum: ea5587e3c66d50b1503b82ac4179c303
Download size: 1.6 MB
Estimated disk space required: 62.9 MB (built with all dependencies)
Estimated build time: 1.0 SBU
libvorbis-1.1.2, LAME-3.96.1, Imlib2-1.2.2, X Window System, SDL-1.2.11, FreeType-2.1.10, MPlayer-1.0pre7try2 (for the shared post-processing library), FAAC, FAAD2, AMR narrowband (floating point) or AMR naarrowband (fixed point), AMR wideband, and teTeX-3.0 (to build HTML documentation)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/ffmpeg
Install FFmpeg by running the following commands:
Review the doc/optimization.txt file in the source tree for information about optimizing the build.
patch -Np1 -i ../ffmpeg-0.4.9-pre1-gcc4-1.patch && patch -Np1 -i ../ffmpeg-0.4.9-pre1-amr_fixes-1.patch && sed -i "s/static uint64/const uint64/" \ libavcodec/liba52/resample_mmx.c && ./configure --prefix=/usr --enable-shared \ --enable-pthreads --disable-ffplay && make
If you have teTeX installed, the man pages and HTML documentation were built during the make process. Skip to the root user installation steps if you don't need other formats of the documentation, or issue any or all of the following commands to create the additional formats.
for DOCFILE in faq ffmpeg-doc ffplay-doc ffserver-doc hooks do texi2pdf -b $DOCFILE.texi texi2dvi -b $DOCFILE.texi dvips -o $DOCFILE.ps $DOCFILE.dvi makeinfo --plaintext --force -o $DOCFILE.txt $DOCFILE.texi done
If you do not have teTeX installed, use the following command to build the man pages:
make -C doc ff{mpeg,play,server}.1
This package does not come with a test suite that works.
Now, as the root user:
make install
If you have teTeX installed on your system, install the documentation by issuing the following commands as the root user (modify the command appropriately to reflect the documentation formats you've created):
install -v -m755 -d /usr/share/doc/ffmpeg-0.4.9-pre1 && install -v -m644 doc/*.{html,dvi,pdf,ps,txt} \ /usr/share/doc/ffmpeg-0.4.9-pre1
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. Also review the information at the end of the configure script (cat the file or view it using a text editor) for information about building support for the AMR codecs.
/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).
Last updated on 2007-01-15 17:25:53 -0600