MATLAB Answers

VideoReader Failed to init Ubuntu 20.04

20 views (last 30 days)
gaspard BLANCHET
gaspard BLANCHET on 27 Sep 2020
Answered: Urmila Rajpurohith on 21 Oct 2020
I'm trying to process video with matlab 2020b on Ubuntu 20.04. But I receive this log:
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{:});
Error in GMM (line 7)
video = VideoReader('./walking/person01_walking_d1_uncomp.avi');
The installation of gstream0.1 is not available.
Do you have any idea of what I'm missing?

  0 Comments

Sign in to comment.

Answers (1)

Urmila Rajpurohith
Urmila Rajpurohith on 21 Oct 2020
Hi
The reason is that old versions of MATLAB used to rely on gstreamer-0.10 to process video but from at least R2017a the dependency of gstreamer library has changed to gstreamer-1.0 or higher.
The error message indicates that the suitable codecs are not installed on the system to decode the file. Try to determine if the file can be played outside MATLAB on the Linux system.
To do so, follow the steps below:
1. Copy the file to /tmp
2. On the Linux terminal, execute: gst-launch-1.0 playbin uri=file:///tmp/<filename> video-sink=appsink audio-sink=fakesink text-sink=fakesink.
If this errors out, it indicates that the suitable codecs are not available.
Installing the correct gstreamer codecs may solve the issue.
Hope this helps!

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!