编译模拟器版本
1 到https://github.com/yuvi/gas-preprocessor下载gas-preprocessor.p并拷贝到/usr/sbin目录中
2 下载ffmpeg源码。
http://ffmpeg.org/download.html
https://github.com/FFmpeg/FFmpeg
3 解压源码,cd到源码目录下
4 创建文件config_i386.sh,其内容如下

#!/bin/tcsh -f
set targetDir="../ffmpeg-libs/i386"
if (! -d $targetDir ) mkdir $targetDir rm -f $targetDir/*.a make clean #./configure --arch=i386 --extra-cflags='-arch i386' --extra-ldflags='-arch i386' --disable-encoders --disable-debug --disable-mmx ./configure \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' \
--nm="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/nm" \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk \
--target-os=darwin \
--arch=i386 \
--cpu=i386 \
--extra-cflags='-arch i386 -miphoneos-version-min=4.3 -mdynamic-no-pic' \
--extra-ldflags='-arch i386 -miphoneos-version-min=4.3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk' \
--prefix=compiled/i386 \
--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 make mv libavcodec/libavcodec.a $targetDir
mv libavdevice/libavdevice.a $targetDir
mv libavformat/libavformat.a $targetDir
mv libavutil/libavutil.a $targetDir
mv libswscale/libswscale.a $targetDir

5 执行config_i386.sh进行配置和编译
编译完成后,可以在$targetDir找到相应的静态库文件

编译真机版
前3步同上
第4步:创建文件config_armv7,其内容如下

#!/bin/tcsh -f
set targetDir="../ffmpeg-libs/armv7"
if (! -d $targetDir ) mkdir $targetDir rm -f $targetDir/*.a make clean ./configure \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--nm="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/nm" \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk \
--target-os=darwin \
--arch=arm \
--cpu=cortex-a8 \
--extra-cflags='-arch armv7 -miphoneos-version-min=4.3 -mdynamic-no-pic' \
--extra-ldflags='-arch armv7 -miphoneos-version-min=4.3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.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 make mv libavcodec/libavcodec.a $targetDir
mv libavformat/libavformat.a $targetDir
mv libavutil/libavutil.a $targetDir
mv libswscale/libswscale.a $targetDir

第5步:
执行config_armv7进行配置和编译,编译完成后可以在$targetDir找到相应的静态库文件

ffmpeg iOS 编译的更多相关文章

  1. iOS编译FFmpeg、kxmovie实现视频播放 (转载)

    由于FFmpeg开源框架的功能非常强大,可以播放的视频种类很多,同时添加第三方库kxmovie,实现视频播放,真的是爽爆了,因此今天来说一下关于FFmpeg在iOS手机上的一些配置过程,配置工具,还有 ...

  2. 为iOS编译FFmpeg静态库

    为iOS编译FFmpeg静态库 
 环境:OS X Yosemite (版本10.10.5) Xcode (Version 7.1.1 (7B1005)) 
 
 一.资料准备: (1)ffmpeg源 ...

  3. Xamarin.iOS编译出错

    Xamarin.iOS编译出错 错误信息:C:/Program Files(x86)/Reference Assemblies/Microsoft/Framework/Xamarin.iOS/v1.0 ...

  4. Xamarin.iOS编译时无法连接苹果系统

    Xamarin.iOS编译时无法连接苹果系统   错误信息:Unable to connect to Address=’***.***.***.***’ with User=’***’   即使Vis ...

  5. 【转】iOS编译OpenSSL静态库(使用脚本自动编译)

    原文网址:https://www.jianshu.com/p/651513cab181 本篇文章为大家推荐两个脚本,用来iOS系统下编译OpenSSL通用库,如果想了解编译具体过程,请参看<iO ...

  6. iOS 编译过程原理(2)

    一.前言 <iOS编译过程的原理和应用>文章介绍了 iOS 编译相关基础知识和简单应用,但也很有多问题都没有解释清楚: Clang 和 LLVM 究竟是什么 源文件到机器码的细节 Link ...

  7. iOS 编译过程原理(1)

    一.前言 一般可以将编程语言分为两种,编译语言和直译式语言. 像 C++.Objective-C 都是编译语言.编译语言在执行的时候,必须先通过编译器生成机器码,机器码可以直接在 CPU 上执行,所以 ...

  8. iOS 编译64位FFMPEG

    最近因为公司项目需要捣腾FFMPEG,所以看了一下资料,现在编译成功了,记录一下. 我自己发现大概有两种方式 二者共同部分 安装装yasm或者(MAcport,我用的是yasm,这里只记录yasm的) ...

  9. iOS开发ffmpeg SDK 编译和集成

    FFmpeg是一套可以用来记录.转换数字音频.视频,并能将其转化为流的开源计算机程序.它提供了录制.转换以及流化音视频的完整解决方案.同时,FFmpeg是一套跨平台的方案,所以我们可以在iOS开发中使 ...

随机推荐

  1. Cassandra 计数器counter类型和它的限制

    文档基础 Cassandra 2.* CQL3.1 翻译多数来自这个文档 更新于2015年9月7日,最后有参考资料 作为Cassandra的一种类型之一,Counter类型算是限制最多的一个.Coun ...

  2. PHP-PCRE正则表达式函数

    PCRE正则表达式函数 PCRE字符类 \\b        词边界 \\d        匹配任意数字 \\s        匹配任意空白,如TAB制表符或空格 \\t        匹配一个TAB ...

  3. linux下的循环命令写法

    直切正题 方法一:利用while do循环,举例,while true;do ls;sleep 1;done  解释,该命令为每秒执行ls查询命令,sleep 1 为每秒循环,其他命令可直接替换 ls ...

  4. 限制<input>输入内容 只允许数字 或者 字母

    只能输入数字: 有回显 <input onkeyup="value=value.replace(/[^\d]/g,'')"> 只能输入数字:无回显 <input ...

  5. 共享内存shared pool (3):Library cache

    Shared pool物理层面上由许多内存块(chunck)组成.从逻辑功能划分,Shared pool主要由三部分组成:Library cache,Dictionary cache和Control ...

  6. 在EF的code frist下写稳健的权限管理系统:数据库模型(二)

    先从数据库开始,因为是用EF的code frist,所以所有的设计都在解决项目中进行. 先是数据模型开始 我已经建立了四个模型,user,role,action,actiongroup user里面有 ...

  7. python之poplib库

    pop3能实现访问远程主机下载新的邮件或者下载后删掉这些邮件.不支持多信箱,也不能提供持久稳定的邮件认证.也就是说不能使用pop3来作为邮件同步协议. poplib支持多个认证方法.最普遍的是基本的用 ...

  8. Web Design:欧美人形剪影的404界面

    项目需求,必须得写个404界面,比较愁,因为网站属于那种电商+艺术品拍卖的网站,404界面不太好设计 很多时候网站直接代码报错输出404,不过设计过的404也有好处,比如改进用户体验.增强互动性之类的 ...

  9. eth0: error fetching interface information: Device not found

    转载,原文出处:http://zh888.blog.51cto.com/1684752/775447 亲测有效,感谢作者!!! ----------------------------分割线----- ...

  10. AppCan移动平台,开发者是这样用的……

    随着生活节奏的加快,每天各种压力山大,难免产生心理问题.然而穷的都要吃土了,又不想面对陌生人,怎么办? 近日,AppCan开发者樊星阳“一夜爆红”,引起猎云网的持续关注.起因是这样的,樊星阳利用App ...