Permalink
Fetching contributors…
Cannot retrieve contributors at this time
63 lines (54 sloc) 3.04 KB
How to build:
* Setup git and yasm 1.1.x environment. The macports is easy solution.
* NOTICE: This build requires Leopard+Xcode 3.1, or SnowLeopard+Xcode 3.2.
* CoreVF framework should be installed prior to build.
* clone git repository first
$ cd your-working-directory
$ git clone git://github.com/MyCometG3/x264Encoder.git
* get latest libx264, tag rev.number, create symlink
$ cd repository-base-folder ### x264Encoder local repository
$ rm -rf x264.org; mv x264???? x264.org ### rename original x264 folder
$ git clone git://git.videolan.org/x264.git x264.new
$ cd x264.new
$ NEWNAME="x264`git rev-list HEAD | sort | wc -l | awk '{ print $1; }'`"
$ cd ..
$ mv x264.new ${NEWNAME} ### name would be x2641629 or so
$ rm x264; ln -s ${NEWNAME} x264 ### recreate symlink
$ cd x264 ### follow symlink
$ cat ../x264.*.diff | patch -p1 -d. ### apply patches
$ cp -pr ../x264.org/x264.xcodeproj . ### copy project file
* Get latest ffmpeg, tag rev.number, create symlink.
$ cd repository-base-folder ### x264Encoder local repository
$ rm -rf libav.org; mv libav????? libav.org ### rename original libav
$ git clone git://git.ffmpeg.org/ffmpeg.git ffmpeg.new
$ cd libav.new
$ NEWNAME="libav`git rev-list HEAD | sort | wc -l | awk '{ print $1; }'`"
$ cd ..
$ mv libav.new ${NEWNAME} ### name would be libav23501 or so
$ rm libav; ln -s ${NEWNAME} libav ### recreate symlink
$ cd libav ### follow symlink
$ cat ../ffmpeg.*.diff | patch -p1 -d. ### apply patches
$ cp -pr ../libav.org/libav.xcodeproj . ### copy project file
* build libx264.a using Xcode
$ cd repository-base-folder ### x264Encoder local repository
$ cd x264 ### follow symlink
$ xcodebuild -target "Build Universal" -configuration "Release"
$ ls -l *.a
* build libavcodec.a and others using Xcode
$ cd repository-base-folder ### x264Encoder local repository
$ cd libav ### follow symlink
$ xcodebuild -target "Build Universal" -configuration "Release"
$ ls -l *.a
* build UIbundle.bundle using Xcode.
$ cd repository-base-folder ### x264Encoder local repository
$ cd UIbundle
$ rm -rf build ; xcodebuild -target "UIbundle" -configuration "Release"
$ ls -ld *.bundle
* build x264Encoder.component using Xcode.
$ cd repository-base-folder ### x264Encoder local repository
$ cd source
$ # vi Info.plist ### Edit as is
$ # vi x264EncoderVersion.h ### Edit as is
$ rm -rf build ; xcodebuild -target "BuildAndCopy" -configuration "Release"
$ ls -ld ~/Library/QuickTime/x264Encoder.*
NOTE: Build target "Build and Copy" will copy stripped x264Encoder.component into /Users/XXX/Library/QuickTime/.