1. 程式人生 > >MATLAB讀視訊報錯 Unable to initialize the video obtain properties (videoreader in Matlab)

MATLAB讀視訊報錯 Unable to initialize the video obtain properties (videoreader in Matlab)

這個bug卡了半天,這裡記錄一下

Error using VideoReader/init (line 619) Could not read file due to an unexpected error. Reason: Unable to initialize the video obtain properties

Error in VideoReader (line 172)
            obj.init(fileName);

環境:Ubuntu16.04

參考:stackoverflow

首先安裝gstreamer0.10-ffmpeg

1 sudo
add-apt-repository ppa:mc3man/gstffmpeg-keep 2 sudo apt-get update 3 sudo apt-get install gstreamer0.10-ffmpeg

重啟MATLAB,如果像我一樣還是報錯,別慌,繼續安裝codecs(解碼器)

sudo apt install ubuntu-restricted-extra

問題解決