View Single Post
Old 1st September 2010, 08:25   #3396  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
Quote:
Originally Posted by lucassp View Post
I'm also looking for a recent Mac build of x264 with ffms/lavf. Or at least a build tutorial. Thanks
For OSX,
A) install Xcode - it's on the OSX install disc or through Apple Developer Connection.
B) Install MacPorts (by following Parts 1 & 2 from http://davidbaumgold.com/tutorials/wine-mac/ - although if you want to go on to install wine feel free to).
C) Use MacPorts to install subversion, git-core, yasm, nasm, texi2html, automake, autoconf, libtool, pkg-config (might already be installed through Xcode...I can never seem to remember this), and I think that's it.



svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
svn checkout http://ffmpegsource.googlecode.com/svn/trunk/ ffms2
git clone git://git.videolan.org/x264.git

cd ffmpeg
./configure --prefix=$HOME/ffms2_build --enable-gpl --enable-version3 --enable-postproc --disable-encoders \
--disable-muxers --disable-debug --disable-network --disable-hwaccels --disable-indevs --disable-outdevs \
--extra-cflags="-march=pentium3"
make
make install

cd ../ffms2
./configure --prefix=$HOME/ffms2_build PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig
make
make install

cd ../x264
wget http://vfrmaniac.fushizen.eu/OtherSt.../mp4muxer.diff
patch -p1 < mp4muxer.diff
PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig ./configure --extra-cflags="-march=pentium3"
make
make install
make distclean

PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig ./configure --prefix=$HOME/x264-9bit \
--extra-cflags="-march=pentium3" --bit-depth=9
make
make install
make distclean

PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig ./configure --prefix=$HOME/x264-10bit \
--extra-cflags="-march=pentium3" --bit-depth=10
make
make install



All -march=pentium3 parts should be changed to the processor you actually have; refer to GCC's documentation for that list...-march=native could also be used if you'd rather not take the time to target your cpu explicitly and let GCC autodetect it.

The MSYS/MinGW instructions are pretty much identical to those - the only place they differ are that ffmpeg requires two additional options: --enable-memalign-hack and -U__STRICT_ANSI__ needs to be added to the cflags, like --extra-cflags"-U__STRICT_ANSI__ -march=pentium3".

EDIT: I forgot...I have read reports that ffmpeg won't build under Snow Leopard unless --disable-asm and --arch=x86_64 are also given. I'm not entirely sure because I can't remember if I've ever built without those options, so be aware of that as well.

Last edited by qyot27; 5th September 2010 at 23:32.
qyot27 is offline   Reply With Quote