FFmpeg Build Instructions MAC 10.8 or better

Copy ffmpeg-2.0.tar.bz2 (https://ffmpeg.org/releases/ffmpeg-1.0.7.tar.bz2https://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 armv7 library paste in following command and press enter:

./configure --prefix=armv7 --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 armv7 -mfpu=neon -miphoneos-version-min=6.1" --extra-ldflags="-arch armv7 -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: 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 armv7 library paste in following command and press enter:

make clean && make && make install

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 ../..

Build FFmpeg for iOS的更多相关文章

  1. How to Build FFmpeg for Android

    http://www.roman10.net/how-to-build-ffmpeg-for-android/ ffmpeg is an open-source platform for record ...

  2. ffmpeg for iOS

    链接: ios ffmpeg 实时视频压缩(主要是H264) 最简单的基于FFmpeg的移动端例子:IOS 视频转码器 iOS下使用FFMPEG的一些总结 iOS配置FFmpeg框架 iOS上使用高大 ...

  3. FFmpeg for ios架构:中级

    FFmpeg这部分想了非常久,也没找到比較好的解说方式.本来想像其他博客一样.对着代码一行行的分析.但后来感觉不太现实,FFmpeg应用在IOS上怎么说代码最少也有个5.6k行(包含音视频.业务逻辑) ...

  4. 编译FFmpeg for iOS

    2项依赖: gas-preprocessor(见附录:gas-preprocessor简介) yasm 1.2.0 如果要集成x264和fdk_aac,需要先编译x264和fdk_aac. Usage ...

  5. FFmpeg编译iOS静态库

    第一步:下载gas-preprocessor 1.1 下载https://github.com/libav/gas-preprocessor 1.2 拷贝 gas-preprocessor.pl 到 ...

  6. How to build ffmpeg with hardware accelerated codecs for Android x86

    In order to build a complete ffmpeg with hardware acceleration for Intel platform (XXX lake + Atom), ...

  7. ffmpeg在iOS的使用 - iFrameExtractor源码解析

    http://www.cocoachina.com/ios/20150914/13284.html iFrameExtractor地址:https://github.com/lajos/iFrameE ...

  8. 编译ffmpeg(iOS)

    一,x264库的编译 首先到http://www.videolan.org/developers/x264.html下载x264的库,然后解压,修改文件夹名称为x264     二,下载ffmpeg2 ...

  9. iOS平台基于ffmpeg的视频直播技术揭秘

    现在非常流行直播,相信很多人都跟我一样十分好奇这个技术是如何实现的,正好最近在做一个ffmpeg的项目,发现这个工具很容易就可以做直播,下面来给大家分享下技术要点: 首先你得编译出ffmpeg运行所需 ...

随机推荐

  1. 【转】细说 Form (表单)

    阅读目录 开始 简单的表单,简单的处理方式 表单提交,成功控件 多提交按钮的表单 上传文件的表单 MVC Controller中多个自定义类型的传入参数 F5刷新问题并不是WebForms的错 以Aj ...

  2. 信号量机制DOWN操作和UP操作的详细说明

    DOWN操作:linux内核.信号DOWN例如,下面的操作: void down(struct semaphore *sem); //不间断 int down_interruptible(struct ...

  3. Swift # 异常处理

    面向轨道编程 - Swift 中的异常处理 问题 在开发过程中,异常处理算是比较常见的问题了. 举一个比较常见的例子:用户修改注册的邮箱,大概分为以下几个步骤: 接收到一个用户的请求:我要修改邮箱地址 ...

  4. WebService它CXF注释错误(两)

    WebService它CXF注解 1.详细报错例如以下 五月 04, 2014 11:24:12 下午 org.apache.cxf.wsdl.service.factory.ReflectionSe ...

  5. 备份IIS httpd.ini 重写规则,兼容大部分版本号IISserver

    IISserver已经非常少,差点儿要退出市场了.nginx成为市场的主流. 备份一个httpd.ini,全部内容例如以下: [ISAPI_Rewrite] # 3600 = 1 hour Cache ...

  6. 10. IDENTITY属性使用小结

    原文:10. IDENTITY属性使用小结 从SQL Server 2012开始有了Sequence,简单用列如下: CREATE SEQUENCE TestSeq START INCREMENT ; ...

  7. angularJS之站在jQuery的肩膀上

    jQuery:用更少的代码,实现更强悍的功能 托互联网日新月异发展的福,浏览器变成了人们接入互联网的入口,而JavaScript 这个曾经的小语种,终于成功地站到了舞台的中央,唤起了开发者的兴趣. 浏 ...

  8. IS2009制作Oracle 静默安装包(一)感谢空白先生特许授权

    原文:IS2009制作Oracle 静默安装包(一)感谢空白先生特许授权 上一篇: MyEclipse中消除frame引起的“the file XXX can not be found.Please ...

  9. 快速构建Windows 8风格应用25-数据绑定

    原文:快速构建Windows 8风格应用25-数据绑定 本篇博文主要介绍如何将UI元素与数据进行绑定.数据绑定的方向.数据更改通知.数据转换.数据绑定支持的绑定方案. 数据绑定是一种简单方式来显示数据 ...

  10. Spring IOC之依赖

    一个标准的企业级应用不只有一个对象组成.即使是最简单的引用也会有个相互作用的对象以使最终呈现 在用户面前的是个连贯一致的引用. 1依赖注入 依赖注入(DI)是一个对象定义他们依赖的过程,也就是说他们一 ...