I'm trying to compile the ffmpeg by using the make and build files in iFrameExtractor example. firstly i tried to follow the readme file on the github, which only says to run the ./build_universal
in ffmpeg folder. it did not work
i then tried to follow the info in INSTALL without success. i then tried doing the stuff in INSTALL followed by the ./build_universal
which didn't work. All the *.a files that are imported to the project exists until the end of the build sequence. when the lipo commands in build_universal are run, which i guess concat the .a files for the different architectures(?). anyhow these leave the following errors:
lipo: specifed architecture type (armv6) for file (armv6/libavcodec.a) does not match it's cputype (16777223) and cpusubtype (3) (should be cputype (12) and cpusubtype (6))
lipo: specifed architecture type (armv6) for file (armv6/libavdevice.a) does not match it's cputype (16777223) and cpusubtype (3) (should be cputype (12) and cpusubtype (6))
lipo: specifed architecture type (armv6) for file (armv6/libavformat.a) does not match it's cputype (16777223) and cpusubtype (3) (should be cputype (12) and cpusubtype (6))
lipo: specifed architecture type (armv6) for file (armv6/libavutil.a) does not match it's cputype (16777223) and cpusubtype (3) (should be cputype (12) and cpusubtype (6))
lipo: specifed architecture type (armv6) for file (armv6/libswscale.a) does not match it's cputype (16777223) and cpusubtype (3) (should be cputype (12) and cpusubtype (6))
i can get the project to compile for simulator if i only use ./build_armv7
but if i run the universal the .a files are removed in the end. and only using doesn't work to build for iphone 4 .
After a week of trial and error, I was finally able to create the ffmpeg universal libraries and successfully compile and run iFrameExtractor for the device as well as the simulator.
To compile and run the project on your iPhone device OR simulator:
1) open Terminal
2) clone the repository: git clone git://github.com/lajos/iFrameExtractor.git
3) go to the ffmpeg folder in the project: cd iFrameExtractor/ffmpeg
4) run: ./configure
5) Edit the build scripts (build_armv6, build_armv7, build_i386) as follows:
These scripts assume you are using iOS SDK 5.0 on Xcode 4.2.
build_armv6:
build_armv7:
build_i386:
6) build the ffmpeg libraries: ./build_universal
7) open the xcode project and run it on your iPhone device or simulator
These steps work perfectly for me. I hope this will help others struggling to get the ffmpeg libraries working for iOS.
building FFMPEG for iOS 5.1
hope this will help you to build latest FFMPEG for iOS 5.1
note: you have to create build_* scripts first, to do this see code below
script for ARMV7 - create file build_armv7
script for ARMV6 - create file build_armv6
script for simulator - create file build_i386
script for universal build (will merge libraries into one universal) - create file build_universal
i downloaded the latest ffmpeg repository and used the following to compile only for armv6 and armv7. I couldn't get it working for i386, i receive errors that the cputype and subcputype are wrong. apparently the cputype is supposed to be x86 and subcputype should be intel.
anyhow i used the following build scripts to compile for the arm architectures:
build script:
and combine libs script:
then i import the .a files from BUILD-FOLDER/dist-uarch and it builds in xcode like a charm!