Error using the VideoReader Function in Pop OS 20.04

1 回表示 (過去 30 日間)
Joel Sam
Joel Sam 2020 年 7 月 19 日
コメント済み: Andreas Nord 2020 年 12 月 17 日
I use MATLAB on Pop OS 20.04. I'm trying to read video files in a folder with .h264 extenstion (recorded with a Raspberry Pi camera) using the VideoReader function. The code I'm using is given below.
master=pwd;
VidFiles = dir('*image*.h264');
numfiles = length(VidFiles);
for i=1:numfiles
baseFileName = VidFiles(i).name;
Abs_baseFileName= fullfile(master, baseFileName);
v = VideoReader(Abs_baseFileName);
video = v.read();
end
It was working fine, but one day( I guess after a system update) it started giving me the following error:
Error using VideoReader/initReader (line 734)
Could not read file due to an unexpected error. Reason: Unable to initialize the video properties
Error in audiovideo.internal.IVideoReader (line 136)
initReader(obj, fileName, currentTime);
Error in VideoReader (line 104)
obj@audiovideo.internal.IVideoReader(varargin{:});
How do I solve the problem?

回答 (1 件)

Chidvi Modala
Chidvi Modala 2020 年 8 月 10 日
This is a known issue, and is fixed in R2020b
As a workaround, you can set aside the libstdc++.so.6 file that ships with MATLAB. This might require root privilege.
For example, if MATLAB is installed at /usr/local/MATLAB/R2019b, you can open a shell and execute:
# cd /usr/local/MATLAB/R2019b
# cd sys/os/glnxa64
# mkdir unused
# mv libstdc++.so.6* unused/
MATLAB is tested with the libstdc++.so.6 that accompanies MATLAB. While unlikely, MATLAB might encounter unexpected behavior from your local version of libstdc++.so.6. If this occurs, try restoring the libstdc++.so.6 that accompanies MATLAB:
# cd /usr/local/MATLAB/R2019b
# cd sys/os/glnxa64
# mv unused/libstdc++.so.6* .
  1 件のコメント
Andreas Nord
Andreas Nord 2020 年 12 月 17 日
While this solution works, I get the same issue in 2020b

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCall C++ from MATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by