Effacer les filtres
Effacer les filtres

Error using the VideoReader Function in Pop OS 20.04

3 vues (au cours des 30 derniers jours)
Joel Sam
Joel Sam le 19 Juil 2020
Commenté : Andreas Nord le 17 Déc 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?

Réponses (1)

Chidvi Modala
Chidvi Modala le 10 Août 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 commentaire
Andreas Nord
Andreas Nord le 17 Déc 2020
While this solution works, I get the same issue in 2020b

Connectez-vous pour commenter.

Catégories

En savoir plus sur Call C++ from MATLAB dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by