A quick list of commands needed to build the best tools available for creating high-quality video intended for playback in the Flash player.
In case your system has not been used before to build applications from sources, there might be several tools and packages missing. In many cases even the required libraries are available, their devel packages are missing. ATrpms is a good source if your original distribution does not offer enough of multimedia related packages.
The sources are fetched with git, subversion and cvs.
git clone git://git.videolan.org/x264.git
cd x264
./configure --prefix=/usr/local/encoding \
--enable-shared \
--enable-visualize \
--extra-cflags="-I/usr/local/encoding/include" \
--extra-ldflags="-L/usr/local/encoding/lib"
FFmpeg is one of the most important pieces of software needed to encode audio and video freely, without any licenses or royalties. It’s hyper fast.
svn co svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --prefix=/usr/local/encoding \
--enable-frei0r \
--enable-gpl \
--enable-libdc1394 \
--enable-libdirac \
--enable-libfaac \
--enable-libgsm \
--enable-libmp3lame \
--enable-libnut \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-libopencv \
--enable-libopenjpeg \
--enable-libschroedinger \
--enable-libspeex \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libxvid \
--enable-nonfree \
--enable-postproc \
--enable-pthreads \
--enable-shared \
--enable-version3 \
--extra-cflags="-I/usr/local/encoding/include" \
--extra-libs="-L/usr/local/encoding/lib"
Mencoder, included with Mplayer, is provided here as a bonus, though it’s not strictly necessary. However, it offers the best media player known to the free software community.
wget https://www.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
tar jxf essential-20071007.tar.bz2
sudo mv essential-20071007 /usr/local/encoding/lib/codecs
svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd mplayer
./configure --prefix=/usr/local/encoding \
--enable-gui \
--enable-dynamic-plugins \
--extra-cflags="-I/usr/local/encoding/include" \
--extra-libs="-L/usr/local/encoding/lib"
Gpac includes MP4Box, a tool used to create mp4 files containing video, audio, and subtitle streams.
Fetch the source and compile accordingly:
svn co https://gpac.svn.sourceforge.net/svnroot/gpac/trunk/gpac gpac
cd gpac
./configure --prefix=/usr/local/encoding \
--extra-cflags="-I/usr/local/encoding/include" \
--extra-libs="-L/usr/local/encoding/lib"
The actual compiling and installation can be performed for all items above using the following commands:
make -j4
sudo make install
make distclean
On Mac OS, you might need to replace make with gmake to ensure correct tool usage. The last command cleans up the source files in case you decide to update and recompile them later.
The encoding commands will be detailed in another post.
