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

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

问题描述

如何在10.8之前安装最新的ffmpeg ios库armv7,armv7s,i386和通用版本?

解决方案

几天我已经为此安装一步一步的说明:



FFmpeg构建说明MAC 10.8或更好



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



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



安装气体预处理器


  1. 点击ZIP图标下载< a href =https://github.com/mansr/gas-preprocessor =nofollow> https://github.com/mansr/gas-preprocessor 。

  2. 将gas-preprocessor.pl复制到/ usr / bin目录。

  3. 通过将权限设置为读取&,更改gas-preprocessor.pl的权限。 $ / $>
    $ b

    从10.8版开始xcrun中的错误



    打开终端并粘贴以下命令,然后按Enter键:

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

    cd到ffmpeg-2文件夹并粘贴以下命令,然后按Enter键:

      mkdir armv7 
    mkdir armv7s
    mkdir i386
    mkdir -p通用/ lib

    要在以下命令中配置armv7s库,请按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 /开发者/平台/ iPhoneOS.platform / Developer / usr / bin / gcc--extra-cflags = -  arch armv7s -mfp u = 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 




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


    要在以下命令中构建并安装armv7s库粘贴,然后按Enter键:

     code> make clean&&制作&&要安装

    要配置i386(所以模拟器将工作)库粘贴到以下命令中,然后按Enter键: / p>

      ./ 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&& ;制作&& make install 

    要使通用库(这是添加到xcode中的库)粘贴以下命令并按输入:

      cd armv7 / lib 
    在* .a
    中的文件
    cd ../ ..
    xcrun -sdk iphoneos lipo -output通用/ lib / $文件-create -arch armv7 armv7 / lib / $ file -arch armv7s armv7s / lib / $ file -arch i386 i386 / lib / $文件
    echoUniversal $ file created。
    cd -
    done
    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 ../..
    

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

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