-
ubuntu 16.04及以上版本需安装sdl2,低版本安装sdl1.2
sudo apt-get install libsdl2-dev
-
配置
./configure --prefix=/usr/local/ffmpeg --enable-debug=3 --enable-shared --disable-static
输出信息有ffmplay
Programs: ffmpeg ffplay ffprobe
-
编译,安装,添加环境变量
make -j 4
sudo make install
-
查询ffmpeg版本
ffmpeg -version
ffmpeg version N-101260-gd7f10b2 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609 configuration: --prefix=/usr/local/ffmpeg --enable-debug=3 --enable-shared --disable-static libavutil 56. 66.100 / 56. 66.100 libavcodec 58.125.100 / 58.125.100 libavformat 58. 68.100 / 58. 68.100 libavdevice 58. 12.100 / 58. 12.100 libavfilter 7.107.100 / 7.107.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100
- 若提示
libavdevice.so.58: cannot open shared object file: No such file or directory
,参考服务器上安装ffmpeg后报错及解决方案libavdevice.so.58: cannot open shared object file: No such file or directory