mdsh.com/wiki


RecentChanges

TextFormattingRules
AllWikiTopics
OrphanedWikiTopics
ToDoWikiTopics
WikiLockList
RSS
Export2HTML

WikiSearch

SetUsername

StartingPoints
Home
OSX:buildFFmpeg @Jun 3, 2011 4:32:28 PM

This is tested on Mac OS 10.6.7 (a Mac Book Pro and a MacMini)

Install Xcode 3 - you don't need to spend $5 on Xcode 4

xcode_3.2.6_and_ios_sdk_4.3.dmg

Install MacPorts

MacPorts-1.9.2-10.6-SnowLeopard.dmg

If you cannot rsync, for instance if you're in a corporation where its hard to get through firewalls, then edit /opt/local/etc/macports/sources.conf replacing the default entry at the end of the file

sudo vim /opt/local/etc/macports/sources.conf
[...]
#rsync://rsync.macports.org/release/ports/ [default]
http://www.macports.org/files/ports.tar.gz [default]


Sync the MacPorts sources, if you are in a corporation that has a proxy server you might need to set the http_proxy environment variable as I have done in this example:

sudo http_proxy=http://www-cache.reith.bbc.co.uk:80 /opt/local/bin/port -d sync

To access source files for building parts of FFmpeg, git might need access through a SOCKS proxy:

sudo http_proxy=http://www-cache.reith.bbc.co.uk:80 /opt/local/bin/port install tsocks

Then, when you have to do a git clone or a git pull do this instead:

tsocks git clone git:// OR
tsocks git pull


and edit /etc/tsocks.conf. For example, in a corporation you might need to add something like:

local = 132.0.0.0/255.0.0.0

to the local block near the top and change server and server_port to

server = 132.185.136.18
server_port = 1085


Build other libraries


Decide and create the place where you are going to do all your building, and set an environment variable so that it is easy to script the install:

export PREFIX=/usr/local
sudo mkdir $PREFIX/src
sudo chgrp staff $PREFIX/src
sudo chmod g+w $PREFIX/src



libx264


cd $PREFIX/src
git clone git://git.videolan.org/x264.git
cd x264


./configure \
--prefix=/usr/local \
--enable-shared


make
make install



PKG_CONFIG_PATH=/opt/local/lib/pkgconfig/ \
PATH=$PATH:/opt/local/bin/ \

./configure \
--prefix=$HOME/darwin-ppc \
--target-os=darwin \
--arch=ppc \
--extra-cflags="-O3 -arch ppc -mcpu=powerpc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \
--extra-ldflags="-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \
--enable-gpl \
--enable-nonfree \
--enable-runtime-cpudetect \
--enable-memalign-hack \
--enable-pthreads \
--enable-static \
--disable-shared \
--disable-indev=jack \
--disable-altivec


VeryQuickWiki Version 2.8.1 | Admin

All contents copyright mdsh.com (C) 2011-2023.