linux 编译安装 ffmpeg
时间: 2023-11-08 21:03:38 浏览: 144
Linux编译安装ffmpeg
为了在Linux上编译安装FFmpeg,您可以按照以下步骤进行操作:
1. 安装依赖项:
```
sudo apt-get update
sudo apt-get install build-essential git yasm nasm cmake libass-dev libfreetype6-dev \
libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev \
libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev zlib1g-dev
```
2. 下载FFmpeg源代码:
```
git clone https://git.ffmpeg.org/ffmpeg.git
cd ffmpeg
```
3. 配置和编译FFmpeg:
```
./configure --enable-gpl --enable-nonfree --enable-libass --enable-libfreetype \
--enable-libvorbis --enable-libx264 --enable-libx265 --enable-libaom \
--enable-libvpx --enable-libdav1d --enable-libopus --enable-libfontconfig
make -j$(nproc)
sudo make install
```
4. 检查安装是否成功:
```
ffmpeg -version
```
阅读全文