VideoReader Error: Unable to initialize the video properties on Debian 10

102 views (last 30 days)
David Morales
David Morales on 20 Dec 2019
Edited: Rob Kudyba on 5 Jul 2022
I have a problem at the moment of read a video with VideoReader, this error is only for videos with mp4 extentios
this is the 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)
in previous post i see that the problem is the actual verssion of gstream, i try installing gstream0.1 but it doesnt work.
HELP please.
Karina Lebel
Karina Lebel on 27 May 2020
I have the same problem... If I convert into avi, this is ok but not really practical... Found any other solution?

Sign in to comment.

Answers (1)

Urmila Rajpurohith
Urmila Rajpurohith on 2 Dec 2020
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!
Rob Kudyba
Rob Kudyba on 5 Jul 2022
I was succesful in getting this to work on RHEL 7. I did get a suggestion from the gstreamer mailng list:
That being said, perhaps you are simply hitting a bug in this old version of Linux/GStreamer. Current stable gstreamer is 1.20.3, you are at 1.10.X from about 5 years ago.
I didn't bother updating as I'd have to compile for RHEL 7.
I found that these 3 packages needed to be installed. Note the gstreamer1-libav plugin is from the (retired) NUX repo. The one from RPMFUSION is gstreamer1-libav-1.10.4-2.el7.x86_64.rpm and breaks the script.
The last one (from the NUX repo) is important, and worked for our files.The other 2 are in the EPEL repo.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by