Error using the VideoReader Function in Pop OS 20.04

1 Ansicht (letzte 30 Tage)
Joel Sam
Joel Sam am 19 Jul. 2020
Kommentiert: Andreas Nord am 17 Dez. 2020
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?

Antworten (1)

Chidvi Modala
Chidvi Modala am 10 Aug. 2020
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* .

Kategorien

Mehr zu Call C++ from MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by