3

I've tried reading many tutorials. I've spent hours on google, and stackoverflow trying answer. So far I've read: Trying to compile the FFMPEG libraries for iPhoneOS platform with armv6 and arv7 architecture FFMPEG integration on iphone/ ipad project and https://github.com/lajos/iFrameExtractor few of the many.

I'm trying to build this library for iOS 7/Xcode 5 compatibility but it's not working. A common error I'd get is:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
yasm/nasm not found or too old. Use --disable-yasm for a crippled build.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.

I'd also get many more once that is finished. Such as:

rm: illegal option -- .
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file
make: *** [clean] Error 64

I've mostly tried using this command to start, but it always crashes on "make clean":

./configure \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='/usr/local/bin/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/iPhoneOS7.0.sdk \
--target-os=darwin \
--arch=arm \
--cpu=cortex-a8 \
--extra-cflags='-arch armv7' \
--extra-ldflags='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk' \
--prefix=compiled/armv7 \
--enable-cross-compile \
--enable-nonfree \
--enable-gpl \
--disable-armv5te \
--disable-swscale-alpha \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-asm \
--disable-debug
Community
  • 1
  • 1
Destiny Dawn
  • 1,457
  • 3
  • 15
  • 29
  • 1
    most developers usually wait for ffmpeg.org to update their asm code for new chips, meantime you do know that armv7 compiles will work just fine on the iphone 5s. as far as I know no one has attempted a 64bit build of ffmpeg yet, its just way to eary. – Michelle Cannon Oct 13 '13 at 04:17
  • How could I compile it with iOS 6.0SDK then? And how would I download the framework for it into Xcode 5? If possible – Destiny Dawn Oct 13 '13 at 04:27
  • [http://stackoverflow.com/questions/19092796/build-ffmpeg-with-xcode-5][1] [1]: http://stackoverflow.com/questions/19092796/build-ffmpeg-with-xcode-5 Please look at these answers, maybe there are helpful. – Andreas Bachmaier Oct 14 '13 at 06:54
  • again I am not sure what you are asking for contact me directly if you like, you can check out a tutorial on our page here www.streammore.tv – Michelle Cannon Oct 14 '13 at 17:53
  • @AndreasBachmaier I've tried using ffmpeg4ios but it hasn't seemed to work.. – Destiny Dawn Oct 16 '13 at 23:35
  • Dawn please give us an idea what you are trying to accomplish, I mean beyond just trying to bluild ffmpeg. – Michelle Cannon Oct 17 '13 at 01:14
  • @MichelleCannon well, after learning how to use the FFmpegDecoder.framework I'm getting this error when I try to build the project, if you can help me fix it, that should accomplish me trying to use the iFrameExtractor framework. 'ld: file is universal (2 slices) but does not contain a(n) armv7s slice:' – Destiny Dawn Oct 17 '13 at 01:36
  • yes , until ffmpeg.org comes out with a STABLE ffmpeg that builds for armv7s you need to go into settings and remove that slice, but it should have no overall effect over performance of your app. We only use versions of ffmpeg that pass our testing not every experimental one we find, if you like please use our contact info here or the form at www.streammore.tv, we are getting ready to release new versions of everything with new ios 7 features and I would be more than happy to share some of that – Michelle Cannon Oct 17 '13 at 16:17

2 Answers2

5

To use the mooncatventures (our) ffmpegdecoderFramework, go into build settings click on the arch and remove the armv7s.

you must also change build active architechure only to no.enter image description here

Michelle Cannon
  • 1,341
  • 8
  • 8
3

This answer from mientus worked for me : https://stackoverflow.com/a/19370679/661720

Support universal ffmpeg library for iOS7 and XCode5:

Install gas-preprocessor

Click on the ZIP icon to download https://github.com/mansr/gas-preprocessor. Copy gas-preprocessor.pl to /usr/bin directory. Change permission of gas-preprocessor.pl by setting the privilege to Read & Write for all.

Download my shell script from: https://gist.github.com/m1entus/6983547

Run sh build-ffmpeg.sh.

Community
  • 1
  • 1
Taiko
  • 1,351
  • 1
  • 19
  • 35