最近要整一些视频操作,选择了vlc-qt。奈何使用vlc-qt需要先编译vlc。
1、首先下载vlc
访问官网https://www.videolan.org/vlc/ 选择要下载的版本 ,当然也可以直接下载http://get.videolan.org/vlc/3.0.10/vlc-3.0.10.tar.xz
将源码下载到本地后,开始尝试着编译,为什么说是尝试,因为会遇到各种各样的报错。
2、尝试配置
cd到源码的主目录,执行命令
./bootstrap
./configure
出现报错:configure: error: Could not find lua. Lua is needed for some interfaces (rc, telnet, http) as well as many other custom scripts. Use --disable-lua to ignore this error.
解决方案:根据./configure命令提示,下载对应的lua,我这里以下执行命令:
sudo apt install lua5.2
sudo apt install lua5.2-dev
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
再次执行./configure
出现报错:configure: error: Missing libav or FFmpeg. Pass --disable-avcodec to ignore this error.
解决方案:这里有两种解决方案。
方案(1) 执行命令: ./configure --prefix=/usr/local/vlc --disable-avcodec .让其直接忽略这个错误即可。
方案(2)执行命令:sudo apt install libavcodec-dev 。
我是采用第二种方案。