[FFmpeg-devel] [HOWTO] Building FFmpeg for iPhone
2010-10-20 10:57
441 查看
I am pleased to announce that FFmpeg can now be built unpatched for the iPhone. The process is still not entirely without pain, however. Here's how it's done: 1. Download and install the iPhone SDK 3.1. 2. Get the latest gas-preprocessor and install it in /usr/local/bin or some other directory in your $PATH. http://github.com/yuvi/gas-preprocessor/ 3. Get the latest FFmpeg from SVN (minimum r20151). 4. Configure FFmpeg with one of the following commands. These give a clean build with a default installation of iPhone SDK 3.1 on OSX Leopard. Other versions may vary. 4a. For iPhone 3GS or iPod Touch 3G 32GB/64GB, use this command: ./configure --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.2.1 --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.2.1' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk --enable-cross-compile --target-os=darwin --arch=arm --cpu=cortex-a8 --enable-pic 4b. For other iPhone or iPod Touch models, use this command: ./configure --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.2.1 --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.2.1' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk --enable-cross-compile --target-os=darwin --arch=arm --cpu=arm1176jzf-s 5. Run make. It is important to specify a correct --cpu option, and not merely an architecture version. Failure to specify the exact CPU will give a broken build. For the iPhone 3GS and compatible iPods, --enable-pic is required to avoid some nasty-looking linker warnings about relocations. I have not tested the builds on an iPhone/iPod, so there may still be remaining issues. Please report any problems you encounter. Many thanks to David Conrad for the gas-preprocessor script, without which this would not be possible. -- Måns Rullgård mans at mansr.com //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-October/076618.html http://github.com/lajos/iFrameExtractor ./configure --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1 --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk --enable-cross-compile --target-os=darwin --arch=arm --cpu=cortex-a8 --enable-pic ./configure --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1 --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk --enable-cross-compile --target-os=darwin --arch=arm --cpu=arm1176jzf-s lipo -create -arch armv6 6/libavcodec.a -arch armv7 7/libavcodec.a -output all/libavcodec.a lipo -create -arch armv6 6/libavdevice.a -arch armv7 7/libavdevice.a -output all/libavdevice.a lipo -create -arch armv6 6/libavformat.a -arch armv7 7/libavformat.a -output all/libavformat.a lipo -create -arch armv6 6/libavutil.a -arch armv7 7/libavutil.a -output all/libavutil.a lipo -create -arch armv6 6/libswscale.a -arch armv7 7/libswscale.a -output all/libswscale.a
相关文章推荐
- How to write Assembly code for the iPhone:
- How to Create a Provisioning Profile for iPhone
- How to Build FFmpeg for Android
- How to Create a Provisioning Profile for iPhone
- How to use iPhone with File I/O Functions: A Tutorial for Software Developers
- How to get the RGB values for a pixel on an image on the iphone
- (转载)XML Tutorial for iOS: How To Choose The Best XML Parser for Your iPhone Project
- How to get the latest FFmpeg binaries for Windows
- How to compile FFmpeg for Raspberry Pi (Raspbian)
- How to Build FFmpeg for Android
- How to Build FFmpeg for Android
- Building FFmpeg for iPhone
- How to Build FFmpeg for Android
- Script of Building ffmpeg for iPhone 4.0 SDK
- How To Choose The Best XML Parser for Your iPhone Project
- How to use iPhone with File I/O Functions: A Tutorial for Software Developers
- (转)How to Update Your Apps for the 4-Inch iPhone 5 Display
- How to Build FFmpeg for Android
- How To Use Box2D For Just Collision Detection with Cocos2D iPhone
- Building FFmpeg for iPhone