Share Coding

Tutorials, Problems, Stuffs …

Tag Archives: armv7

Building FFmpeg on XCode 4 (IOS5.0) for real iPhone only (armv7)

Using iFrameExtractor open source project for an example.

1. Install macport at

2. Open terminal type:

sudo port install pkgconfig

3. Terminal type: 

git clone

cd iFrameExtractor/ffmpeg


4. Install them by using macport if the commands told you that there are any missing packages

mkdir armv7

mkdir lib

./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='gas-preprocessor/ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --cpu=cortex-a8 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk' --enable-pic


mv libavcodec/libavcodec.a armv7/

mv libavdevice/libavdevice.a armv7/

mv libavformat/libavformat.a armv7/

mv libavutil/libavutil.a armv7/

mv libswscale/libswscale.a armv7/

cp armv7/*.a lib/

5. Open iFrameExtractor.xcodeproj and run with a REAL iPhone