- 浏览: 25273 次
- 性别:
- 来自: 北京
最新评论
-
micallz:
绝知此事要躬行。
Git忽略文件(转载好文) -
lalakang:
提示找不到新项目的文件啊
ios如何在当前工程中添加编辑新建的FramesWork (两个ios工程联调同样适用 ) -
lalakang:
表示搞不对啊!!!
ios如何在当前工程中添加编辑新建的FramesWork (两个ios工程联调同样适用 )
模拟器与真机下ffmpeg的编译方法(总结版)
编译ffmepg模拟器版本:
1. 到https://github.com/gabriel/ffmpeg-iphone-build下载ffmpeg-iphone-build
2.先将gas-preprocessor.pl拷贝到/usr/sbin/目录中。
3.到ffmpeg官网上下载ffmpeg源码
4.在终端下定位到ffmpeg的目录运行
./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-avfilter --disable-debug --disable-encoders --enable-cross-compile --disable-decoders --disable-armv5te --enable-decoder=h264 --enable-pic --cc=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' --extra-ldflags=-L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/system --sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk --target-os=darwin --arch=i386 --cpu=i386 --extra-cflags='-arch i386' --extra-ldflags='-arch i386'
5.输入make命令
6.将libavcodec.a,libavdevice.a,libavformat.a,libavutil.a,libswscale.a到对应的目录下拷贝出来。
7.在项目中就可以使用了。可以参考开源示例iFrameExtractor (git clone git://github.com/lajos/iFrameExtractor.git)需要将该项目的ffmpeg文件夹库替换为你编译的ffmpeg源码文件夹,在ffmpeg目录下新建lib目录,将刚刚拷贝出来的静态库拷贝进去。打开项目,添加libbz2.1.0.dylib系统库文件。点击编译运行就可以使用了。
8.注意如果使用的是ffmpeg0.8.5的库的话iFrameExtractor中的codec_type需要修改为AVMEDIA_TYPE_VIDEO。(下同)
编译arm7版本,网上搜到的版本,完全按照以下步骤做就行了。可以编译出arm7的库。
1. 下载:
git clone git://github.com/lajos/iFrameExtractor.git
2. 编辑:
build_armv6和build_armv7,修改./configure后面的参数,主要是SDK版本.我的是4.3,修改为:
./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk --cpu=arm1176jzf-s --extra-cflags='-arch armv6' --extra-ldflags='-arch armv6'
3. 编译:
出错,提示:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc is unable to create an executable file.
C compiler test failed.
查看config.err文件,最后提示:
ld: file not found: /usr/lib/system/libcache.dylib for architecture armv7
collect2: ld returned 1 exit status
4. 重新修改configure参数为:
./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk --cpu=cortex-a8 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk' --enable-pic
5. 编译:
build_armv7
最后生成静态库,在lib目录和armv7目录.
6.用xcode打开iFrameExtractor.xcodeproj,现在编译会出错,需要修改几个地方:
左边选中工程,中间选中target,右面选中Build settings,在Architectures选项卡里面选择Architetures为Optimized(armv7),Base SDK为Latest iOS(iOS 4.3) Valid Architectures填写armv7.
编译目标选择iOS Device,当然,如果有连接电脑的设备,可以选择设备.
编译,提示:
Undefined symbols for architecture armv7:
"_BZ2_bzDecompressInit", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_BZ2_bzDecompressEnd", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_BZ2_bzDecompress", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
添加库libbz2.1.0.dylib,再次编译,OK通过
在ios5.0中编译ffmpeg。 到官网下载ffmpeg,然后在终端进入ffmpeg
./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --cpu=cortex-a8 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk' --enable-pic --enable-decoder=rawvideo --disable-asm
make进行编译。
然后将各个.a文件拷贝出来。
编译ffmepg模拟器版本:
1. 到https://github.com/gabriel/ffmpeg-iphone-build下载ffmpeg-iphone-build
2.先将gas-preprocessor.pl拷贝到/usr/sbin/目录中。
3.到ffmpeg官网上下载ffmpeg源码
4.在终端下定位到ffmpeg的目录运行
./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-avfilter --disable-debug --disable-encoders --enable-cross-compile --disable-decoders --disable-armv5te --enable-decoder=h264 --enable-pic --cc=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' --extra-ldflags=-L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/system --sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk --target-os=darwin --arch=i386 --cpu=i386 --extra-cflags='-arch i386' --extra-ldflags='-arch i386'
5.输入make命令
6.将libavcodec.a,libavdevice.a,libavformat.a,libavutil.a,libswscale.a到对应的目录下拷贝出来。
7.在项目中就可以使用了。可以参考开源示例iFrameExtractor (git clone git://github.com/lajos/iFrameExtractor.git)需要将该项目的ffmpeg文件夹库替换为你编译的ffmpeg源码文件夹,在ffmpeg目录下新建lib目录,将刚刚拷贝出来的静态库拷贝进去。打开项目,添加libbz2.1.0.dylib系统库文件。点击编译运行就可以使用了。
8.注意如果使用的是ffmpeg0.8.5的库的话iFrameExtractor中的codec_type需要修改为AVMEDIA_TYPE_VIDEO。(下同)
编译arm7版本,网上搜到的版本,完全按照以下步骤做就行了。可以编译出arm7的库。
1. 下载:
git clone git://github.com/lajos/iFrameExtractor.git
2. 编辑:
build_armv6和build_armv7,修改./configure后面的参数,主要是SDK版本.我的是4.3,修改为:
./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk --cpu=arm1176jzf-s --extra-cflags='-arch armv6' --extra-ldflags='-arch armv6'
3. 编译:
出错,提示:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc is unable to create an executable file.
C compiler test failed.
查看config.err文件,最后提示:
ld: file not found: /usr/lib/system/libcache.dylib for architecture armv7
collect2: ld returned 1 exit status
4. 重新修改configure参数为:
./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk --cpu=cortex-a8 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk' --enable-pic
5. 编译:
build_armv7
最后生成静态库,在lib目录和armv7目录.
6.用xcode打开iFrameExtractor.xcodeproj,现在编译会出错,需要修改几个地方:
左边选中工程,中间选中target,右面选中Build settings,在Architectures选项卡里面选择Architetures为Optimized(armv7),Base SDK为Latest iOS(iOS 4.3) Valid Architectures填写armv7.
编译目标选择iOS Device,当然,如果有连接电脑的设备,可以选择设备.
编译,提示:
Undefined symbols for architecture armv7:
"_BZ2_bzDecompressInit", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_BZ2_bzDecompressEnd", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_BZ2_bzDecompress", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
添加库libbz2.1.0.dylib,再次编译,OK通过
在ios5.0中编译ffmpeg。 到官网下载ffmpeg,然后在终端进入ffmpeg
./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --cpu=cortex-a8 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk' --enable-pic --enable-decoder=rawvideo --disable-asm
make进行编译。
然后将各个.a文件拷贝出来。
发表评论
-
xcode4.3下制作framework
2013-04-09 09:25 1927转自:xcode4.3下制作framework——(xc ... -
对比iOS中的四种数据存储
2013-04-07 16:13 994摘自:infoq http://www.inf ... -
iOS网络组件对比:AFNetworking VS ASIHTTPRequest
2013-03-07 10:10 1455在开发iOS应用过程中, ... -
ios如何在当前工程中添加编辑新建的FramesWork (两个ios工程联调同样适用 )
2012-12-12 14:57 3095唐彬琪 可能很多大牛都见过FaceBook的three2 ... -
Xcode4快速Doxygen文档注释 — 简明图文教程
2012-12-03 17:28 1142转自:http://blog.chukong-inc.com/ ... -
如何让IOS应用从容地崩溃
2012-12-03 16:55 1051转自:http://blog.chukong-inc.c ... -
Git忽略文件(转载好文)
2012-11-21 11:29 1212摘自:http://cwind.iteye.com/bl ... -
iOS开发细节记录汇总
2012-11-13 14:56 10431. 模拟器网速调整: 限制时输入下面两行,根据需要修 ... -
iOS签名总结
2012-11-13 11:34 1902摘自:http://www.devdiv.com/iOS签名总 ... -
iPhone开发资源汇总
2012-11-13 14:50 2072很多ios效果,以及控件集合 http://code4app. ... -
开源的电子书阅读器项目
2012-11-07 14:57 1823iphone平台上开源的电子书阅读器项目: https ... -
iOS高效开发必备的10款Objective-C类库
2012-11-07 14:28 687这里列出的库等功能使开发更容易。如果你是一个iOS开发人员,在 ... -
iOS6.0框架及功能更新小结
2012-11-07 14:58 749iOS6.0框架及功能更新小结 1. Maps 替换 ... -
const、static的理解
2012-11-07 14:58 1179对于C/C++语言来讲, const就是只读的意思,只在声明中 ... -
ios控件自定义指引
2012-11-07 14:58 1055转自:http://leakswww.devdiv ...
相关推荐
ijkplayer 是一款做视频直播的框架, 基于ffmpeg, 支持 Android 和 iOS。但是官方demo里面的framework是分模拟器和真机版的,需要制作成通用版的。
source ffmpeg org ffmpeg git回车就可以下载 然后把ffmpeg目录复制到 sh文件所在目录下即可">xcode6 0 1 ios8sdk 编译ffmpeg库 可以编译armv7 armv7s arm64 模拟器的找了好多资料没有编译通过 如果没有更新xcode和...
在linux下编译ffmpeg,总结ffmpeg本地编译过程出现的错误
x264 x265 ffmpeg和aac的源码和编译工具。以下是文件夹的内容 编译的其他代码:包含编译的x264 x265和aac的代码 编译好的包:为最终ffmpeg编译过的代码 另一人编译:...
windows下ffmpeg编译包,只需要设定哈VS环境,即可编译出可调试的ffmpeg以及依赖库。内含Readme.txt,具体编译可查看此文件
在Windows下编译FFmpeg详细说明
基于Linux下编译ffmpeg的wasm库,搞了半天,终于成功,保存起来,需要的可以下载;包含ffmpeg.js和ffmpeg.wasm;是基于ffmpeg源代码编译的,没有改动任何源代码
ffmpeg编译与移植
编译方法: emcc wasm_ffmpeg/wasm_ffmpeg.c libavformat.a libavcodec.a libswresample.a libavutil.a -I "/include" -s EXPORTED_FUNCTIONS="['_malloc','_free','ccall','allocate','UTF8ToString'" -s WASM=1 -s...
ffmpeg的windows64版本-编译过的可直接使用,用于python的视频合成及转码等
wince下FFMPEG编译,值得大家看看学习下哈
09_12_阿里云主机配置_ffmpeg编译09_12_阿里云主机配置_ffmpeg编译09_12_阿里云主机配置_ffmpeg编译09_12_阿里云主机配置_ffmpeg编译09_12_阿里云主机配置_ffmpeg编译09_12_阿里云主机配置_ffmpeg编译09_12_阿里云...
FFMPEG编译生成的so和头文件,FFMPEG编译生成的so和头文件。
最新版ffmpeg编译生成android使用的so 最新版ffmpeg编译生成android使用的so 最新版ffmpeg编译生成android使用的so 最新版ffmpeg编译生成android使用的so
ffmpeg编译依赖
该资源用于ffmpeg编译动态链接库,包括一个说明文档和编译工具mingw32. 鄙人亲测过,此方法可以最新ffmpeg的release版本,大家不要错过哦!~
Advanced Media Framework AMF AMD Radeon硬件编码ffmpeg编译库源码 The AMF framework is compatible with most recent Radeon GPUs starting with the Southern Islands family and APUs of the Kabini, Kaveri, ...
ndk25C编译的android下的ffmpeg6.0,集成v4l2视频采集和pulse音频采集
ffmpeg 最新版本, windows直接编译完毕的exe文件,直接就可以运行执行