xcode FFMPEG iOS 7 库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19341770/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:05:24  来源:igfitidea点击:

FFMPEG iOS 7 Library

iosxcodeffmpegios7xcode5

提问by Destiny Dawn

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 architectureFFMPEG integration on iphone/ ipad projectand https://github.com/lajos/iFrameExtractorfew of the many.

我试过阅读很多教程。我在谷歌上花了几个小时,在 stackoverflow 上尝试回答。到目前为止,我已阅读:尝试为 iPhoneOS 平台编译 FFMPEG 库,在 iphone/ipad 项目https://github.com/lajos/iFrameExtractor 中使用 armv6 和 arv7 架构FFMPEG 集成

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:

我正在尝试为 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
[email protected] 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":

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

回答by Michelle Cannon

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

要使用 Mooncatventures(我们的)ffmpegdecoderFramework,请进入构建设置,单击 arch 并删除 armv7s。

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

您还必须仅将构建活动架构更改为否。在此处输入图片说明

回答by Taiko

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

mientus 的这个答案对我有用: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.

支持 iOS7 和 XCode5 的通用 ffmpeg 库:

安装气体预处理器

点击 ZIP 图标下载 https://github.com/mansr/gas-preprocessor。将 gas-preprocessor.pl 复制到 /usr/bin 目录。通过为所有人设置读写权限来更改 gas-preprocessor.pl 的权限。

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

运行 sh build-ffmpeg.sh。