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. hightmaps 按地图上显示的统计数据

    离extjs 至 easyui 到html5到hightchars 再到hightmaps.Exjts和easyui很相似,extjs是重量级的,easyui轻量级的.比extjs容易上手.照着dem ...

  2. Struts2流程

    Struts2流程 1.client浏览器初始化时发出HTTP请求 2.依据web.xml配置,上述请求被FilterDispatcher接收 3.依据struts.xml配置,找到须要调用的Acti ...

  3. 微信公众平台企业号验证接口、回调 PHP版

    微信公众平台企业号验证接口.回调 PHP版,本人为了解决这个企业号的验证和发送消息的问题,整整研究了几天时间,由于微信企业号刚推出来,网上资料太少了!后来在一些朋友的帮助下和本人重复调试完好下,最终整 ...

  4. word 一些有用的技巧

    为了能够word入代码,而且具备代码高亮显示功能.这里我提供一个工具------Notepad++,它具备一般文本的功能,且具备编写代码的功能. 包含代码排版,高亮显示,加入和删除凝视等.  在  语 ...

  5. javascript系列之核心知识点(二)

    变量对象       变量对象是一个与执行上下文相关联的容器.它是一个和上下文密切结合的特殊对象,含有定义在上下文中的变量和函数声明.注意,函数表达式(和函数声明不同的)不包含在变量对象中. 变量对象 ...

  6. MAC 命令行工具(Command Line Tools)安装

    不过升级后安装命令行工具(Command Line Tools)时发现官网没有clt的下载安装包了,原来改了,使用命令在线安装. 打开终端,输入命令:xcode-select --install 选择 ...

  7. Dialog中显示倒计时,到时自己主动关闭

    这里直接用系统Dialog中加入了倒计时的显示,假设用自己定义Dialog会更美观: private TextView mOffTextView; private Handler mOffHandle ...

  8. php设计模式(一):简介及创建型模式

    我们分三篇文章来总结一下设计模式在PHP中的应用,这是第一篇创建型模式. 一.设计模式简介 首先我们来认识一下什么是设计模式: 设计模式是一套被反复使用.容易被他人理解的.可靠的代码设计经验的总结. ...

  9. IOS中 init和initialize

    一.init和initialize 1.方法类型 1> init属于对象方法,-开头 2> initialize属于类方法,+开头 2.调用时刻 1> init:每个对象初始化的时候 ...

  10. 使用gson和httpclient呼叫微信公众平台API

    吐槽:微信api很无语.有一部分xml.有一部分json. 最近看如何调用微信公众平台json有关api更方便.终于找到了httpcliect和gson对. 假设你有一个更好的办法,请告诉我. 了解如 ...