安装
sudo apt-get install g++
sudo apt install cmake-curses-gui
安装yasm
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0/
./configure
make && make install
安装cmake
apt-get install cmake
安装nasm
wget https://www.nasm.us/pub/nasm/releasebuilds/2.14rc16/nasm-2.14rc16.tar.gz
tar xzvf nasm-2.14rc16.tar.gz
cd nasm-2.14rc16/
./configure
make && make install
x264
git clone git://git.videolan.org/x264
cd x264/
./configure --enable-shared
make && make install
x265
下载地址
https://bitbucket.org/multicoreware/x265/downloads/
http://ftp.videolan.org/pub/videolan/x265/
两个地方都可以
tar xzvf x265_2.9.tar.gz
cd x265_2.9/
x265_2.9/build/linux
./make-Makefiles.bash
make && make install
libvpx
https://github.com/webmproject/libvpx 这个是国外的镜像, 国内可以下载到
./configure --enable-shared
make && make install
lame
wget https://jaist.dl.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
./configure --enable-shared
make && make install
fdk-aac
wget https://jaist.dl.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-2.0.0.tar.gz
./configure --enable-shared
make && make install
ffmpeg
wget https://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2
./configure --prefix=/opt/ffmpeg/ --enable-version3 --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libfdk_aac --enable-libvpx --enable-shared --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --enable-debug --extra-cflags=-g
make && make install
就大功告成了, 常用的音视频都编译进去了, 大家get到了吗, 大家也可以根据以上写一个脚本。我脚本水平差, 就只能一步一步搭建了
网友评论