I am pleased to announce that FFMPEG can now be built unpatched
The iPhone. The process is still not entirely without pain, however.
Here's how it's done:
1. download and install the iPhone sdks 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
Clean build with a default installation of iPhone sdks 3.1 on OSX leopard.
Other versions may vary.
4A. For iPhone 3gs or iPod Touch 3G 32 GB/64 GB, 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
Architecture version. Failure to specify the exact CPU will give
Broken build.
For the iPhone 3gs and compatible iPods, -- enable-pic is required
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.
Export thanks to David Conrad for the gas-Preprocessor script,
Which this wocould not be possible.
--
M branch NS rullg branch 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.
Lipo-create-arch armv6 6/libavdevice. A-arch armv7 7/libavdevice. A-output all/libavdevice.
Lipo-create-arch armv6 6/libavformat. A-arch armv7 7/libavformat. A-output all/libavformat.
Lipo-create-arch armv6 6/libavutil. A-arch armv7 7/libavutil. A-output all/libavutil.
Lipo-create-arch armv6 6/libswscale. A-arch armv7 7/libswscale. A-output all/libswscale.