ffmpeg + x264编译

由于使用了1.0以下版本的ffmpeg,结合pjsip进行视频通话时经常遇到视频卡死现象

pjsip推荐使用的是libyuv + openh264(openh264目前只能用1.0.0版本的,因为master版本的接口名称改了导致编译无法通过)

但是libyuv + openh264出现了花屏的现象,怀疑是libyuv的问题,但时间比较急,所以又打算用回ffmpeg + x264


ffmpeg使用1.2.9(pjsip说了不支持2.x版本的),x264使用的是stable 版本的


1、先编译x264

In order to quickly compile your libx264, you can type the following commands in your shell:

# cd /my/path/where/i/keep/compiled/stuff
# git clone git://git.videolan.org/x264.git
# cd x264
# ./configure --enable-static --enable-shared
# make
# make install
# ldconfig

If you get a message like this:

Found yasm 0.x.x.xxxx
Minimum version is yasm-1.0.0
If you really want to compile without asm, configure with --disable-asm.

that means that you have an old version of yasm on your system, so you should update it. The quickest way to do so is like this:

# git clone git://github.com/yasm/yasm.git
# cd yasm
# ./autogen.sh
# ./configure
# make
# make install

(直接下载yasm的exe,然后放在mingw的msys的bin目录下就可以了)

and after that, just repeat the configuremake, and make install steps for libx264 and it should be fine this time.

2、编译ffmpeg

  1. # cd /my/path/where/i/keep/compiled/stuff
    # git clone git://source.ffmpeg.org/ffmpeg.git
    # cd ffmpeg
    # ./configure --enable-gpl --enable-libx264 --extra-cflags='-I /usr/local/include' --extra-ldflags='-L /usr/local/lib'
    # make
    # make install
    # ldconfig

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值