iphone ios编译ffmpeg

1.mov格式解析

http://blog.csdn.net/sunshine1314/article/details/2547275

2。mov解析的开源工程:bento4和ffmpeg,其中bento4直接有xcode的工程文件,和比较详细的test代码

3。ffmpeg如何解析帧图像,可以看看extracting-frames-from-movies-on-iphone

http://www.codza.com/extracting-frames-from-movies-on-iphone

4。ffmpeg iphone编译

http://www.cnblogs.com/wwwkhd/archive/2011/08/09/2131780.html

5.图解autoscan、aclocal、autoheader、automake、autoconf、configure、make

http://jaguar13.iteye.com/blog/614427

6第十五章 make的常见错误信息

http://www.linuxsir.org/main/doc/gnumake/GNUmake_v3.80-zh_CN_html/make-15.html



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(我的是4.0版本)打开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通过.

 

7. 修改了ffmpeg版本到最新版(0.7),编译的时候需要把common.mak复制到新版本目录.

编译的时候遇到错误:

ERROR: .endm without .macro at /usr/local/bin/gas-preprocessor.pl line 83, <ASMFILE> line 55

用老版本的libavcodec/arm/asm.S和libavcoec/arm/dsputil_arm.S覆盖新版本(实际上我怀疑只覆盖asm.S即可),重新编译即可.

经过验证:需要同时覆盖2个文件。这一步我没按照原文的弄,我是按照错误提示,修改了ffmpeg中的代码(改了上面提到的2个文件,还有其他一些错误),才编译通过的。改起来应该不难。
原文:http://blog.csdn.net/tsingien/article/details/6457246
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值