ubuntu下安装ffmpeg6.0
时间: 2023-11-08 15:49:17 浏览: 160
首先,需要安装依赖库:
```
sudo apt-get update
sudo apt-get install build-essential git-core checkinstall yasm texi2html libvorbis-dev libx11-dev libxfixes-dev zlib1g-dev pkg-config nasm libx264-dev libfaac-dev libmp3lame-dev libtheora-dev libvpx-dev libopencore-amrnb-dev libopencore-amrwb-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libpostproc-dev libswscale-dev libgtk2.0-dev libqt4-dev libqt4-opengl-dev libjack-jackd2-dev libass-dev libgpac-dev libssl-dev libsdl1.2-dev libva-dev libvdpau-dev libfdk-aac-dev libopus-dev libvo-aacenc-dev libxvidcore-dev libsrtp-dev
```
然后下载ffmpeg6.0源码:
```
wget https://www.ffmpeg.org/releases/ffmpeg-4.0.tar.bz2
tar xjf ffmpeg-4.0.tar.bz2
cd ffmpeg-4.0
```
接着编译和安装:
```
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-libzimg --enable-libopenjpeg --enable-libwebp --enable-libdav1d --enable-libkvazaar --enable-librav1e --enable-libsvtav1 --enable-openssl --enable-libass --enable-libbluray --enable-libxml2
make -j4
sudo checkinstall --pkgname=ffmpeg --pkgversion="6.0" --backup=no --deldoc=yes --default
```
最后执行以下命令查看版本号:
```
ffmpeg -version
```
阅读全文