I've now managed to compile ffmpeg with x264 library on Ubuntu 10.10 x64 as shared libraries, since ZoneMinder requires shared libraries.
I ran into problems where it said that I needed to recompile with -fPIC, and when I looked in the x264's config.mak file, it was included in the list of arguments.
Please note that these changes to the original guide by FakeOutdoorsman would only be necessary for x64 Linux installations!
Here's how I did it, with steps 1 - 2 given in the original post.
Install x264
3. Get the current source files, compile, and install.
Code:
cd
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-shared
Important part:
In config.mak, I moved -fPIC to the front.
eg.: 'CFLAGS=-Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -fPIC -s -fomit-frame-pointer -fno-tree-vectorize'
became: 'CFLAGS=-fPIC -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -s -fomit-frame-pointer -fno-tree-vectorize'.
Code:
make -j `grep -c ^processor /proc/cpuinfo`
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | \
cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | \
head -c 7`" --backup=no --deldoc=yes --fstrans=no --default
Install FFmpeg
4. Get the most current source files, compile, and install. Run "./configure --help" to see what other features you can enable/disable. Nightly FFmpeg snapshots are also available.
Code:
cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis \
--enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab \
--enable-shared --enable-pthreads
make -j `grep -c ^processor /proc/cpuinfo`
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | \
grep Revision | awk '{ print $NF }'`" --backup=no --deldoc=yes --fstrans=no \
--default
hash x264 ffmpeg ffplay
Thanks for FakeOutdoorsman for his great guide that I used as a foundation and for prupert's script that had the cool 'make `grep -c ^processor /proc/cpuinfo`' argument
Bookmarks