简体   繁体   中英

iFrameExtractor fails to build library for armv7 using XCode 4.3.3 & iOS 5.1

I have downloaded code to build with XCode 4.3.3 for iOS 5.1 from this link - https://github.com/lajos/iFrameExtractor I am successfully able to build the libraries for FFmpeg using build_universal script. But it always builds the libraries for X86_64 architecture. Checked with lipo -info command.

Also tried the build script from the link - http://stexgroup.com/blog/ffmpeg-for-iphone-ios-xcode4.3-build-script . It also builds libraries for X86_64 architecture.

I changed the scripts as per this post - problem compiling ffmpeg for iFrameExtractor

But nothing is working for me.

The build script for armv7 [iFrameExtractor] is as following

./configure \
--disable-bzlib --disable-doc \
--disable-ffmpeg --disable-ffplay \
--disable-ffserver --disable-mmx \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--enable-cross-compile --target-os=darwin \
--arch=arm --cpu=cortex-a8 --enable-pic \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk \
--extra-ldflags="-arch armv7 -    L//Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib" \
--extra-cflags="-arch armv7"

Can anybody guide me what can be the issue, considering the same thing is working for everyone else?

With the following scripts i am able to build the libraries. These scripts are modified version of scripts share by Far Pointer in this link - problem compiling ffmpeg for iFrameExtractor

armv6

#!/bin/tcsh -f

if (! -d armv6) mkdir armv6
if (! -d lib) mkdir lib

rm armv6/*.a

make clean

./configure \
--disable-bzlib --disable-doc \
--disable-ffmpeg --disable-ffplay \
--disable-ffserver --disable-mmx \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--enable-cross-compile --target-os=darwin \
--arch=arm --cpu=arm1176jzf-s \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk \
--extra-ldflags="-arch armv6 -L//Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/system" \
--extra-cflags="-arch armv6"

make

mv libavcodec/libavcodec.a armv6/
mv libavdevice/libavdevice.a armv6/
mv libavformat/libavformat.a armv6/
mv libavutil/libavutil.a armv6/
mv libswscale/libswscale.a armv6/

rm lib/*.a

cp armv6/*.a lib/

armv7

#!/bin/tcsh -f

if (! -d armv7) mkdir armv7
if (! -d lib) mkdir lib

rm armv7/*.a

make clean

./configure \
--disable-bzlib --disable-doc \
--disable-ffmpeg --disable-ffplay \
--disable-ffserver --disable-mmx \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--enable-cross-compile --target-os=darwin \
--arch=arm --cpu=cortex-a8 --enable-pic \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk \
--extra-ldflags="-arch armv7 -    L//Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/system" \
--extra-cflags="-arch armv7"

make

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/

rm lib/*.a

cp armv7/*.a lib/

i386

#!/bin/tcsh -f

if (! -d i386) mkdir i386
if (! -d lib) mkdir lib

rm i386/*.a

make clean

./configure \
--disable-bzlib --disable-doc \
--disable-ffmpeg --disable-ffplay \
--disable-ffserver --disable-mmx \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor/gas-preprocessor.pl     /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk \
--extra-ldflags="-arch i386 -L//Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/system" \
--extra-cflags="-arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -O0 -fasm-blocks -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2"

make

mv libavcodec/libavcodec.a i386/
mv libavdevice/libavdevice.a i386/
mv libavformat/libavformat.a i386/
mv libavutil/libavutil.a i386/
mv libswscale/libswscale.a i386/

rm lib/*.a

cp i386/*.a lib/

Now the problem is that all the scripts build libraries for armv6 architecture. Does anyone encounter such problem?

You can try this framework if you like

https://github.com/mooncatventures-group/ffmpegDecoder

and our framextractor started with iframeextrator as a base but then diverged to use avfoundation

https://github.com/mooncatventures-group/FFPlayer-tests

There is also no reason you just can substitute our ffmpeg framework for the ffmpeg build in iframeextractor

{
#import <Foundation/Foundation.h>

#include <ffmpegdecoder/libavformat/avformat.h>
#include <ffmpegdecoder/libswscale/swscale.h>
}

the framework is based on ffmpeg 8.3 , which we find to be a bit more stable for the current version especially for ip camera feeds. their are some mods, these are in ffmpeg.zip file in the frames-test project.

I have posted how to integrate ffmpeg in all versions of ios. just check it

FFMPEG integration on iphone/ ipad project

finally we will get ffmpeg universal library and #include files. add it to your project and follow those steps given in that link. iframeextractor is working fine for me

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM