One: ffmpeg official website: FFmpeg official website
Two: install ffmpeg under windows
1: Download ffmpeg
Download address of ffmpeg under windows: https://www.gyan.dev/ffmpeg/builds/
Choose the appropriate ffmpeg to download, here I choose ffmpeg-2021-12-02-git-4a6aece703-full_build.7z
2: Configure environment variables
Unzip the downloaded ffmpeg, right click on My Computer-"Properties-"Advanced System Settings-"Environment Variables -" System Variables, configure ffmpeg environment variables in Path, the address is the bin directory of the ffmpeg directory
For example: D:\ffmpeg\bin
3: Determine whether ffmpeg is installed
ffmpeg -version
The following indicates that the installation was successful
Three: install ffmpeg under linux
1: Install dependent packages
(1): Install SDL2
View the matching version of the system:yum search SDL2
Install the SDL2 development library:yum install SDL2-devel.x86_64
(2): Install yasm
yasm download address: yasm download address
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar -zxvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make && make install
yasm --version
Install yasm as above
(3): Install x264
x264 download address: x264 download address
git clone https://code.videolan.org/videolan/x264.git
cd x264
./configure --prefix=/usr/local/x264/ --includedir=/usr/local/include --libdir=/usr/local/lib --enable-shared --disable-asm
make && make install
Install x264 as above
2: Install ffmpeg
ffmpeg download address: ffmpeg download address
(1): Download and install ffmpeg
wget http://www.ffmpeg.org/releases/ffmpeg-4.4.1.tar.gz
tar -zxvf ffmpeg-4.4.1.tar.gz
cd ffmpeg-4.4.1/
./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-shared --enable-libx264 --enable-libfreetype
make && make install
(2): Configure environment variablesvim /etc/profile
Add the following information in the profile file
export FFMPEG_PATH=/usr/local/ffmpeg
export CLASSPATH=$FFMPEG_PATH/lib:$CLASSPATH
PATH=$FFMPEG_PATH/bin:$PATH
Reload environment variablessource /etc/profile
(3): Configure ffmpeg startup directoryvim /etc/ld.so.conf
Add the following information in the ld.so.conf file/usr/local/ffmpeg/lib
Reload configurationldconfig
According to the above arrangement, ffmpeg can be installed under linuxffmpeg -version
ffmpeg installed successfully
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。