Build FFmpeg for iOS
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
- Click on the ZIP icon to download https://github.com/mansr/gas-preprocessor.
- Copy gas-preprocessor.pl to /usr/bin directory.
- 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的更多相关文章
- How to Build FFmpeg for Android
http://www.roman10.net/how-to-build-ffmpeg-for-android/ ffmpeg is an open-source platform for record ...
- ffmpeg for iOS
链接: ios ffmpeg 实时视频压缩(主要是H264) 最简单的基于FFmpeg的移动端例子:IOS 视频转码器 iOS下使用FFMPEG的一些总结 iOS配置FFmpeg框架 iOS上使用高大 ...
- FFmpeg for ios架构:中级
FFmpeg这部分想了非常久,也没找到比較好的解说方式.本来想像其他博客一样.对着代码一行行的分析.但后来感觉不太现实,FFmpeg应用在IOS上怎么说代码最少也有个5.6k行(包含音视频.业务逻辑) ...
- 编译FFmpeg for iOS
2项依赖: gas-preprocessor(见附录:gas-preprocessor简介) yasm 1.2.0 如果要集成x264和fdk_aac,需要先编译x264和fdk_aac. Usage ...
- FFmpeg编译iOS静态库
第一步:下载gas-preprocessor 1.1 下载https://github.com/libav/gas-preprocessor 1.2 拷贝 gas-preprocessor.pl 到 ...
- 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), ...
- ffmpeg在iOS的使用 - iFrameExtractor源码解析
http://www.cocoachina.com/ios/20150914/13284.html iFrameExtractor地址:https://github.com/lajos/iFrameE ...
- 编译ffmpeg(iOS)
一,x264库的编译 首先到http://www.videolan.org/developers/x264.html下载x264的库,然后解压,修改文件夹名称为x264 二,下载ffmpeg2 ...
- iOS平台基于ffmpeg的视频直播技术揭秘
现在非常流行直播,相信很多人都跟我一样十分好奇这个技术是如何实现的,正好最近在做一个ffmpeg的项目,发现这个工具很容易就可以做直播,下面来给大家分享下技术要点: 首先你得编译出ffmpeg运行所需 ...
随机推荐
- 大数据系列修炼-Scala课程07
由于昨天下班后有点困,就没有来及写博客,今天会把它补上!把这个习惯坚持下去! 关于Scala高阶函数详解 1.Scala高阶函数代码实现:高阶函数就是在我们函数中套用函数 2.高阶函数代码详解:高阶函 ...
- IMSDroid遇到注册问题(蘼1S 计3等一下 Android4.4)
最近的研究视频通话,开源项目IMSDroid编译测试,这实在是不幸的,饭1 Android4.1和大米3 Android4.4该系统不是对生命和死亡登记.... .后来通过大神日志分析和建议.发现改变 ...
- crawler_Docker_解决用 JavaScript 框架开发的 Web 站点抓取
[转载,后续补上实践case] 有了 Docker,用 JavaScript 框架开发的 Web 站点也能很好地支持网络爬虫的内容抓取 [编者的话]Prerender 服务能够为网络爬虫提供预先渲染的 ...
- linux_inux中find批量删除空文件及空文件夹脚本
1.{}和之间有一个空格 2.find . -name 之间也有空格 3.exec 是一个后续的命令,{}内的内容代表前面查找出来的文件 linux下批量删除空文件(大小等于0的文件)的方法 rm - ...
- 【Swift初见】Swift词典
顾名思义.当我们仰望的时候,我们将基于索引查找我们需要找到的资源.在swift这同样适用,每个对象包括字典key和value.我们key为了找到当前这个key相应的value.与数组不同的是,字典项字 ...
- 前端学习笔记(zepto或jquery)——对li标签的相关操作(四)
对li标签的相关操作——五种方式给奇数项li标签设置样式 demo演示: 1 2 3 4 5 6 7 // 详解: 通常我们为多个li添加样式时常用的是使用filter,但我们在第三节中可以看到fil ...
- UVa 740 - Baudot Data Communication Code
称号:目前编码,他们shift键被按下,并提出,对应的两个编码,其中,2相应的编码shift操作. 给你适当的编码值.寻求相应的字符串. 分析:模拟.字符串. 简单题,标记shift的升降分类处理就可 ...
- What is HHVM?
What is HHVM? HHVM is an open-source virtual machine designed for executing programs written in Hack ...
- SVN:One or more files are in a conflicted state
解决代码冲突 如果commit时出现"You have to update your work copy first."红色警告,说明版本库中的此文件已经被其他人修改了. 请先点& ...
- APACHE启动失败是SYSTEM对apache目录没权限导致
表现如下: Apache: 1.The Apache service named reported the following error:>>> (OS 5)拒绝访问. : htt ...