在 Mac 10.8 上安装 ffmpeg ios 库 armv7、armv7s、i386 和通用 [英] Installing ffmpeg ios libraries armv7, armv7s, i386 and universal on Mac with 10.8

查看:18
本文介绍了在 Mac 10.8 上安装 ffmpeg ios 库 armv7、armv7s、i386 和通用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 10.8 的 Mac 上安装最新的 ffmpeg ios 库 armv7、armv7s、i386 和通用库?

解决方案

几天后,我为这次安装制作了分步说明:

FFmpeg 构建说明 MAC 10.8 或更高

复制 ffmpeg-2.0.tar.bz2 (https://ffmpeg.org/releases/ffmpeg-1.0.7.ta​​r.bz2https://ffmpeg.org/download.html) 并解压到 Documents 文件夹

确保您在 Xcode 下拥有最新的命令行工具 >;偏好 >;下载 >;组件

安装气体预处理器

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

从 10.8 版开始的 xcrun 中的错误

打开终端并粘贴以下命令并按回车:

export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer/"

cd 到 ffmpeg-2 文件夹并粘贴以下命令并回车:

mkdir armv7mkdir armv7smkdir i386mkdir -p 通用/lib

要配置 armv7s 库,粘贴以下命令并回车:

./configure --prefix=armv7s --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" --extra-cflags="-arch armv7s -mfpu=neon -miphoneos-version-min=6.1" --extra-ldflags="-arch armv7s -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.1" --arch=arm --cpu=cortex-a9 --enable-图片

<块引用>

(注意与上面相同的规则:如果配置失败,请转到应用程序/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/并确保sdk文件夹是iPhoneOS6.1.sdk,如果没有改变配置命令以反映 iPhoneOSx.x.sdk 并更改所有目标到 x.x)

要构建和安装 armv7s 库,请粘贴以下命令并按 Enter:

make clean &&制作&&进行安装

要配置 i386(因此模拟器可以工作)库粘贴以下命令并按回车:

./configure --prefix=i386 --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc" --extra-cflags="-arch i386" --extra-ldflags="-arch i386 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk" --arch=i386 --cpu=i386 --enable-pic --disable-asm

<块引用>

(注意:这和前两个配置不是同一个命令命令,如果你只是向上箭头,这将失败)

要构建和安装 i386 库,请粘贴以下命令并按 Enter:

make clean &&制作&&进行安装

要制作通用库(即添加到 xcode 的库)粘贴以下命令并按回车:

cd armv7/lib对于 *.a 中的文件做cd ../..xcrun -sdk iphoneos lipo -output通用/lib/$file -create -arch armv7 armv7/lib/$file -arch armv7s armv7s/lib/$file -arch i386 i386/lib/$fileecho "已创建通用 $file."光盘 -完毕cd ../..

How can I install latest ffmpeg ios libraries armv7, armv7s, i386 and universal on Mac with 10.8?

After a couple of days I have made step by step instructions for this install:

FFmpeg Build Instructions MAC 10.8 or better

Copy ffmpeg-2.0.tar.bz2 (https://ffmpeg.org/releases/ffmpeg-1.0.7.tar.bz2, https://ffmpeg.org/download.html) and Unzip to Documents folder

Make sure you have the latest Command Line Tools under Xcode >; Preferences >; Downloads >; Components

Install gas-preprocessor

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

Bug in xcrun starting in version 10.8

open terminal and paste in following command and press enter:

export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer/"

cd to ffmpeg-2 folder and paste in following command and press enter:

mkdir armv7
mkdir armv7s
mkdir i386
mkdir -p universal/lib

To config armv7s library paste in following command and press enter:

./configure --prefix=armv7s --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" --extra-cflags="-arch armv7s -mfpu=neon -miphoneos-version-min=6.1" --extra-ldflags="-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.1" --arch=arm --cpu=cortex-a9 --enable-pic

(Note same rule as above: if config fails go to Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ and make sure that the sdk folder is iPhoneOS6.1.sdk, if not change the config command to reflect iPhoneOSx.x.sdk and change all targets to x.x)

To build and install armv7s library paste in following command and press enter:

make clean && make && make install

To config i386 (so simulator will work ) library paste in following command and press enter:

./configure --prefix=i386 --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc" --extra-cflags="-arch i386" --extra-ldflags="-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk" --arch=i386 --cpu=i386 --enable-pic --disable-asm

(Note: this is not the same command as the previous two config commands, if you just arrow up to them this will fail)

To build and install i386 library paste in following command and press enter:

make clean && make && make install

To make universal library ( which is the library added to xcode ) paste in following command and press enter:

cd armv7/lib
for file in *.a
do
cd ../..
xcrun -sdk iphoneos lipo -output universal/lib/$file  -create -arch armv7 armv7/lib/$file -arch armv7s armv7s/lib/$file -arch i386 i386/lib/$file
echo "Universal $file created."
cd -
done
cd ../..

这篇关于在 Mac 10.8 上安装 ffmpeg ios 库 armv7、armv7s、i386 和通用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆