标签:uos deb ide nasm linu export ast ola iba
安装CMake和CCMakesudo apt install cmake
sudo apt install cmake-curses-gui
sudo apt-get install libx265-dev
下载地址:http://www.tortall.net/projects/yasm/releases/
tar -xvf yasm-1.3.0.tar.gz
cd yasm-1.3.0/
./configure
make && make install
下载地址:https://nchc.dl.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-2.0.0.tar.gz
tar -xvf fdk-aac-2.0.0.tar.gz
cd fdk-aac-2.0.0/
./configure
make && make install
下载地址:https://ftp.osuosl.org/pub/xiph/releases/speex/speex-1.2.0.tar.gz
cd speex-1.2.0/
./configure
make && make install
下载地址:https://ayera.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar -xvf lame-3.99.5.tar.gz
cd lame-3.99.5/
./configure
make && make install
sudo apt install nasm
下载地址:http://www.videolan.org/developers/x264.html
tar -xvf last_x264.tar.bz2
cd x264-snapshot-20190120-2245/
./configure --enable-shared
make && make install
下载地址:http://ftp.videolan.org/pub/videolan/x265/
tar -xvf x265_2.9.tar.gz
cd x265_2.9/build/linux/
PATH="$HOME/bin:$PATH"
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
make && make install
sudo apt-get install libx11-dev
sudo apt-get install xorg-dev
sudo apt-get install libasound2-dev
sudo ldconfig
下载地址:http://www.libsdl.org/hg.php
~$ tar -xvf SDL-2.0.9-12569.tar.gz
~$ cd SDL-2.0.9-12569/
~$ ./configure
~$ make && make install
sudo ldconfig
git clone https://git.ffmpeg.org/ffmpeg.git
./configure --prefix=/home/niko/Applications/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-libspeex --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --cc=gcc --host-cflags= --host-ldflags= --enable-ffplay
ffbuild/config.mak
文件~$ vim ffbuild/config.mak
命令模式输入:``CONFIG_FFPLAY`` 进行查找
如果 ``CONFIG_FFPLAY=yes`` 表示编译安装时顺带安装ffplay播放器
make -j 4 # 使用4个线程同时编译, 加快编译速度
完成后发现如下字样:
STRIP ffprobe
STRIP ffplay
STRIP ffmpeg
表示将会安装 ffprobe
、ffplay
、ffmpeg
三个工具
make install
sudo vim /etc/ld.so.conf
添加: /home/niko/Applications/ffmpeg/lib
sudo ldconfig
cd ~
vim .bashrc
添加:
export FFMPEG_HOME=/home/Applications/ffmpeg
export PATH=$FFMPEG_HOME/bin:$PATH
source .bashrc
sudo ldconfig
ffmpeg -version
ffplay -version
标签:uos deb ide nasm linu export ast ola iba
原文地址:http://blog.51cto.com/xvjunjie/2347117