1.下载地址
https://github.com/mpv-player/mpv
2.解压文件
3.生成编译脚本
./bootstrap.py或者python3 bootstrap.py
4.编译选项查看
./waf configure --help
5.编译错误解决
我的编译选项
./waf configure --enable-libmpv-shared --enable-sdl2
5.1 Unable to find development files for libass, or the version found is too old. Aborting.
libass库则是一个轻量级的对ASS/SSA格式字幕进行渲染的开源库
解决办法:
yum install libass*
原因:
可能是没有安装libass-devel
6.配置完成
'configure' finished successfully (1.763s)
7. ./waf build
'build' finished successfully (13.351s)
8.完成编译
build目录下即为生成的可执行文件,动/静态库等(根据编译选项)
./waf install 自动安装mpv,解决立即执行的问题
9.Try it
mpv res/ExcuseMe.mp4
by the way:如果是远程连接需要设置DISPLAY=:0,并执行xhost
Good Luck