1.下载编译安装SDL
如果你需要用到ffplay, 需要再下载SDL的源码
可以下载最新的稳定版本,笔者下载的是:SDL2-2.0.12.tar.gz
tar zxvf SDL2-2.0.12.tar.gz
cd SDL2-2.0.12.tar.gz
./configure
make
make install
2.重新编译配置FFmpeg
./configure --enable-gpl --enable-sdl
make
sudo make install
3.执行
报错:
Could not initialize SDL - No available video device
(Did you set the DISPLAY variable?)
解决办法
遇到上面问题,很有可能是通过Windows SSH连接虚拟机,建议:直接在 虚拟机或者Linux系统执行命令。