ubuntu下编译x264,ffmpeg

1、安装工具和依赖

sudo apt-get update    //读取软件列表

sudo apt-get install    //安装下面的包

build-essential       //包含编译c/c++需要的包

checkinstall     //能从 tar.gz 类的源代码自动生成 RPM/Debian 或Slackware 安装包的程序,生成“干净”的安装或者卸载包

cmake    //跨平台编译工具

yasm    //a complete rewrite of the NASM assembler. It currently supports the x86 and AMD64 instruction sets.

libfaac-dev    //AAC audio encoder

libjack-jackd2-dev    //JACK Audio Connection Kit

libmp3lame-dev    //mp3 audio encoder

libopencore-amrnb-dev    //Adaptive Multi Rate 自适应多速率窄带语音编码器

libopencore-amrwb-dev    //宽带

libsdl1.2-dev    //Simple DirectMedia Layer development files

libva-dev    //Video Acceleration (VA) API for Linux

libvdpau-dev    //Video Decode and Presentation API for Unix

libvorbis-dev    //

libx11-dev    //

libxfixes-dev    //provides an X Window System client interface to the 'XFIXES' extension to the X protocol

libxvidcore-dev    //Open source MPEG-4 video codec

texi2html    //converts the given Texinfo file to a set of HTML files

zlib1g-dev    //compression library

 

libgtk2.0-0 libgtk2.0-dev    //common files for the GTK+ graphical user interface library

libjpeg8 libjpeg8-dev    //

 

2、x264

1) 下载源码

git clone http://git.videolan.org/git/x264.git

或者 

wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20120528-2245-stable.tar.bz2

tar xvf x264-snapshot-20120528-2245-stable.tar.bz2

2) 配置,编译,安装

./configure --enable-static --enable-shared --enable-pic

make

sudo make install

生成文件在/usr/local/lib中,有libx264.a,libx264.so,libx264.so.159

 

3、ffmpeg

./configure

make

sudo make install

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值