在linux下的matlab中使用VideoReader函数读入avi文件时提示以下错误:
Error using VideoReader/init (line 429)
The file requires the following codec(s) to be installed on your system:
video/x-h264
错误原因大概是说没有相应的解码器。
解决方案:
1. 加载下列ppa:
sudo add-apt-repository ppa:mc3man/trusty-media
2. 更新软件列表:
sudo apt-get update
3. 安装流媒体框架:
sudo apt-get install gstreamer0.10-ffmpeg
安装完成后重启matlab调用VideoReader运行成功。