FFMPEG iOS 7库

我试过阅读很多教程。 我在google上花了好几个小时,而stackoverflow尝试回答。 到目前为止,我已经读过: 尝试使用armv6和arv7体系结构编译FFMPEG库以及 iphone / ipad项目和https://github.com/lajos/iFrameExtractor中的少数几个。

我正在尝试为iOS 7 / Xcode 5兼容性构建此库,但它无法正常工作。 我得到的一个常见错误是:

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. 

一旦完成,我还会得到更多。 如:

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

我大多尝试使用此命令启动,但它总是在“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 

要使用mooncatventures(我们的)ffmpegdecoderFramework,请进入构建设置,单击拱门并移除armv7s。

您还必须将构建活动的architechure更改为no。 在此处输入图像描述

mientus的回答为我工作: https ://stackoverflow.com/a/19370679/661720

支持iOS7和XCode5的通用ffmpeg库:

安装气体预处理器

单击ZIP图标下载https://github.com/mansr/gas-preprocessor 。 将gas-preprocessor.pl复制到/ usr / bin目录。 通过将权限设置为“读取和写入”来更改gas-preprocessor.pl的权限。

从以下url下载我的shell脚本: https : //gist.github.com/m1entus/6983547

运行sh build-ffmpeg.sh。