Error using the VideoReader Function in Pop OS 20.04
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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?
0 Kommentare
Antworten (1)
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* .
1 Kommentar
Siehe auch
Kategorien
Mehr zu Startup and Shutdown 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!