实战x264,ffmpeg库编译

之前都是看别人的,转载别人的,今天终于要自己亲自操刀啦。哎。

废话少说,入正题

 我的环境:

   xcode 6.1   sdk6.1

   真机armv7 和 i386

   X264   最新的

  ffmpeg  1.2.1


一,x264库的编译

首先到http://www.videolan.org/developers/x264.html下载x264的库,然后解压。

是在根目录下新建H264目录,解压后的代码放入H264目录。然后打开终端

   cd H264  然后

 i386 下命令

CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc  ./configure --host=i386-apple-darwin --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk  --extra-cflags='-arch i386' --extra-ldflags='-arch i386 -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/system -arch i386 '  --disable-asm --enable-shared --enable-static --disable-asm

armv7 下命令

CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system' --enable-pic   --enable-shared --enable-static --disable-asm

后回车,正常情况是如下:

fatal: Not a git repository (or any of the parent directories): .git

platform:      ARM

system:        MACOSX

cli:           yes

libx264:       internal

shared:        yes

static:        yes

asm:           yes

interlaced:    yes

avs:           avxsynth

lavf:          no

ffms:          no

gpac:          no

gpl:           yes

thread:        posix

opencl:        yes

filters:       crop select_every 

debug:         no

gprof:         no

strip:         no

PIC:           yes

visualize:     no

bit depth:     8

chroma format: all<

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值