ffmpeg iOS 编译
编译模拟器版本
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 编译的更多相关文章
- iOS编译FFmpeg、kxmovie实现视频播放 (转载)
由于FFmpeg开源框架的功能非常强大,可以播放的视频种类很多,同时添加第三方库kxmovie,实现视频播放,真的是爽爆了,因此今天来说一下关于FFmpeg在iOS手机上的一些配置过程,配置工具,还有 ...
- 为iOS编译FFmpeg静态库
为iOS编译FFmpeg静态库 环境:OS X Yosemite (版本10.10.5) Xcode (Version 7.1.1 (7B1005)) 一.资料准备: (1)ffmpeg源 ...
- Xamarin.iOS编译出错
Xamarin.iOS编译出错 错误信息:C:/Program Files(x86)/Reference Assemblies/Microsoft/Framework/Xamarin.iOS/v1.0 ...
- Xamarin.iOS编译时无法连接苹果系统
Xamarin.iOS编译时无法连接苹果系统 错误信息:Unable to connect to Address=’***.***.***.***’ with User=’***’ 即使Vis ...
- 【转】iOS编译OpenSSL静态库(使用脚本自动编译)
原文网址:https://www.jianshu.com/p/651513cab181 本篇文章为大家推荐两个脚本,用来iOS系统下编译OpenSSL通用库,如果想了解编译具体过程,请参看<iO ...
- iOS 编译过程原理(2)
一.前言 <iOS编译过程的原理和应用>文章介绍了 iOS 编译相关基础知识和简单应用,但也很有多问题都没有解释清楚: Clang 和 LLVM 究竟是什么 源文件到机器码的细节 Link ...
- iOS 编译过程原理(1)
一.前言 一般可以将编程语言分为两种,编译语言和直译式语言. 像 C++.Objective-C 都是编译语言.编译语言在执行的时候,必须先通过编译器生成机器码,机器码可以直接在 CPU 上执行,所以 ...
- iOS 编译64位FFMPEG
最近因为公司项目需要捣腾FFMPEG,所以看了一下资料,现在编译成功了,记录一下. 我自己发现大概有两种方式 二者共同部分 安装装yasm或者(MAcport,我用的是yasm,这里只记录yasm的) ...
- iOS开发ffmpeg SDK 编译和集成
FFmpeg是一套可以用来记录.转换数字音频.视频,并能将其转化为流的开源计算机程序.它提供了录制.转换以及流化音视频的完整解决方案.同时,FFmpeg是一套跨平台的方案,所以我们可以在iOS开发中使 ...
随机推荐
- NetCat使用手册
简介: 在网络工具中有“瑞士军刀”美誉的NetCat(以下简称nc),在我们用了N年了至今仍是爱不释手.因为它短小精悍(这个用在它身上很适合,现在有人已经将其修改成大约10K左右,而且功能不减少) ...
- php qr生成二维码
二维码就是用在平面上用特定的几何图形记录数据信息的,QR码是常见的一种二维码.推荐使用生成QR码的php类库PHP QR Code. 例子: <?php ini_set('display_e ...
- MapReduce数据流
图4.5细节化的Hadoop MapReduce数据流 图4.5展示了流线水中的更多机制.虽然只有2个节点,但相同的流水线可以复制到跨越大量节点的系统上.下去的几个段落会详细讲述MapReduce程序 ...
- Tomcat工作原理
http://www.cnblogs.com/shootercheng/p/5838645.html
- android ping网络是否成功
public static boolean pingHost(String str) { //str 为要ping的IP地址 boolean result = false; try { Process ...
- Oracle表变化趋势追踪记录
#DBA_HIST_SEG_STAT可以看出对象的使用趋势,构造如下SQL查询出每个时间段内数据库对象的增长量,其中DB_BLOCK_CHANGES_DELTA为块个数 select c.SNAP_I ...
- ORACLE DG之参数详解
1.DB_NAME 数据库名字,需要保持同一个Data Guard中所有数据库DB_NAME相同. 主库和备库相同 DB_NAME='chicago' DB_NAME='chicago' 2.DB_U ...
- 程序员定制的中州韵(rime)windows版(小狼毫)微软双拼输入法
小狼毫所有的配置都是在用户文件夹下完成的 用户文件夹在win7的开始菜单的小狼毫文件夹中可以找到 所有设置希望生效须用小狼毫开始菜单中的重新部署来更新配置 -> weasel.custom.ya ...
- python爬虫-urllib模块
urllib 模块是一个高级的 web 交流库,其核心功能就是模仿web浏览器等客户端,去请求相应的资源,并返回一个类文件对象.urllib 支持各种 web 协议,例如:HTTP.FTP.Gophe ...
- VC下的人人对弈五子棋(dos)
#include"stdio.h"#include"stdlib.h"#include"string.h"#include "io ...