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    //宽带

扫描二维码关注公众号,回复: 10281522 查看本文章

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

发布了35 篇原创文章 · 获赞 6 · 访问量 6692

猜你喜欢

转载自blog.csdn.net/qq_35413770/article/details/105147202