Ubuntu系统编译安装ffmpeg

FFmpeg编译安装(参数可以自定):

./configure --enable-libmp3lame --enable-libfdk-aac --enable-libx264 --enable-version3 --enable-pthreads --enable-avisynth --enable-gpl --enable-nonfree --prefix=/opt/ffmpeg

make

sudo make install

但是需要安装依赖:

(1)安装aptitude和libfaac-dev:

sudo apt install aptitude

sudo aptitude install libfaac-dev

(2)安装git和fdk-acc:

sudo apt install git

git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git

cd fdk-aac/

sudo apt install autoconf -y  #需要安装autoconf

autoreconf -fiv

./configure --disable-shared

(3)安装libtool,也可以使用aptitude进行安装:

tar -xvf libtool-2.4.2.tar.gz

sudo apt install libtool

./configure --disable-shared

make

sudo make install

(4)安装lame:

tar -zxvf lame-3.100.tar.gz

cd lame-3.100/

sudo ./configure && sudo make -j2 && sudo make install

(5)安装x264:

tar -jxvf last_stable_x264.tar.bz2

cd x264-snapshot-20180201-2245-stable/

sudo ./configure --enable-shared --disable-asm && sudo make && sudo make install

(6)最后刷新库文件:

sudo ldconfig -v


如果要用ffmpeg还要编辑/etc/profile进行环境变量的设置:

sudo apt install vim -y

sudo vim /etc/profile

export $PATH:/opt/ffmpeg/bin

source /etcprofile

echo $PATH




 本文转自 棋帅小七 51CTO博客,原文链接:http://blog.51cto.com/xvjunjie/2068360


上一篇:Py之mpld3:mpld3的简介、安装、使用方法之详细攻略


下一篇:钉钉第三方网站扫码登录及钉钉工作台自动免登操作