FFmpeg 安装配置

FFmpeg 安装配置

依赖包

sudo  apt-get install -y autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel x264-devel

sudo  apt-get install yasm -y

安装

wget https://ffmpeg.org/releases/ffmpeg-4.2.3.tar.bz2

tar -jxvf ffmpeg-4.2.3.tar.bz2

cd ffmpeg-4.2.3

./configure --prefix=/usr/local/ffmpeg

sudo make && sudo make install

系统配置

  • 编辑 /etc/bash.bashrc
sudo vim /etc/bash.bashrc

export FFMPEG_HOME=/usr/local/ffmpeg
export PATH=$FFMPEG_HOME/bin:$PATH

# source /etc/bash.bashrc (安装zsh,会报错)
source ~/.zshrc
  • 编辑 /etc/ld.so.conf
sudo vim /etc/ld.so.conf

# 输入以下内容
include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib/

sudo ldconfig
  • 如果需要
ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/bin/ffmpeg

你可能感兴趣的:(软件安装,ffmpeg)