wget https://jaist.dl.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-0.1.5.tar.gz
wget https://sourceforge.mirrorservice.org/o/op/opencore-amr/opencore-amr/opencore-amr-0.1.5.tar.gz
wget https://sourceforge.net/projects/lame/files/lame/3.100/lame-3.100.tar.gz
wget https://code.videolan.org/videolan/x264/-/archive/stable/x264-stable.tar.gz
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.xz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz
cd /data/source/ && git clone https://git.ffmpeg.org/ffmpeg.git
1.安装相关依赖包
tar -zxvf fdk-aac-0.1.5.tar.gz
cd fdk-aac-0.1.5 && ./configure && make install
tar -zxvf opencore-amr-0.1.5.tar.gz
cd opencore-amr-0.1.5 && ./configure && make install
tar -zxvf lame-3.100.tar.gz
cd lame-3.100 && ./configure && make install
tar -zxvf x264-stable.tar.gz
cd x264-stable ./configure && make install
tar -xvf libvorbis-1.3.5.tar.xz
cd libvorbis-1.3.5 && ./configure && make install
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
tar -xvf libogg-1.3.2.tar.xz
cd libogg-1.3.2 && ./configure && make install
tar -xvf libtheora-1.1.1.tar.xz
cd libtheora-1.1.1 && ./configure && make install
yum install mediainfo
vi /etc/ld.so.conf.d/ffmpeg.conf
加入下面两个路径,然后执行ldconfig,引用类库
/usr/local/lib
/data/software/ffmpeg/lib
2.安装ffmpeg
cd /data/source/ffmpeg
./configure --enable-version3 --enable-libfdk-aac --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-shared --disable-x86asm --prefix=/data/software/ffmpeg
(不同系统需要将参数改为--disable-asm 根据报错提示修改参数)
make && make instll
3.配置环境变量:
vim /etc/profile
PATH=$PATH:/data/software/ffmpeg/bin
export PATH
source /etc/profile #重新加载生效
创建软连接
ln -s /data/software/ffmpeg/bin/ffmpeg /usr/bin/ffmpeg
ln -s /data/software/ffmpeg/bin/ffprobe /usr/bin/ffprobe
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。