VideoReader Error: Unable to initialize the video properties on Debian 10
89 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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)
obj@audiovideo.internal.IVideoReader(varargin{:});
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.
3 comentarios
Karina Lebel
el 27 de Mayo de 2020
I have the same problem... If I convert into avi, this is ok but not really practical... Found any other solution?
Respuestas (1)
Urmila Rajpurohith
el 2 de Dic. de 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!
2 comentarios
Rob Kudyba
el 24 de Jun. de 2022
On Matlab 2020 on RHEL 7 we are getting the below.
----> THIS MATLAB CODE CALCULATES COLOR SAMPLE VALUES FOR BACKG, WHITE, HEAVY PARTICLES
----> IT IS BETTER TO CALCULATE COLOR SAMPLE VALUES FOR EACH DAYS EXPERIMENTS
----> REQUIRED VIDEO FILE FOUND : Sample.mp4
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 Apr12_ColorSampler_MatLAB (line 31)
videoObject = VideoReader(videoFile);
I tried the gst command with both a .mp4 and .avi file but we get this back:
gst-launch-1.0 playbin uri=file:///tmp/ColorSamplingVideo_May23.mp4 video-sink=appsink audio-sink=fakesink text-sink=fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Missing element: Quicktime demuxer
WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'video/quicktime, variant=(string)iso'.
Additional debug info:
gsturidecodebin.c(938): unknown_type_cb (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gsturidecodebin.c(1005): no_more_pads_full (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0:
no suitable plugins found:
gstdecodebin2.c(4592): gst_decode_bin_expose (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:
no suitable plugins found:
Missing decoder: Quicktime (video/quicktime, variant=(string)iso)
We have these installed:
rpm -qa|grep gstreamer
gstreamer1-plugins-bad-freeworld-1.0.6-2.el7.nux.x86_64
gstreamer-tools-0.10.36-7.el7.x86_64
gstreamer1-plugins-ugly-1.0.6-3.el7.nux.x86_64
gstreamer-plugins-bad-nonfree-0.10.23-2.el7.nux.x86_64
qt-gstreamer-0.10.2-4.el7.nux.x86_64
gstreamer-0.10.36-7.el7.x86_64
gstreamer-plugins-ugly-0.10.19-17.el7.nux.x86_64
gstreamer-plugins-base-0.10.36-10.el7.x86_64
gstreamer1-1.10.4-2.el7.x86_64
gstreamer1-plugins-base-1.10.4-2.el7.x86_64
gstreamer1-libav-1.0.6-1.el7.nux.x86_64
gstreamer-devel-0.10.36-7.el7.x86_64
Is there another RHEL package that needs to be installed?
Rob Kudyba
el 5 de Jul. de 2022
Editada: Rob Kudyba
el 5 de Jul. de 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.
gstreamer1-plugins-base-1.10.4-2.el7.x86_64
gstreamer1-plugins-good-1.10.4-2.el7.x86_64
gstreamer1-libav-1.0.6-1.el7.nux.x86_64
The last one (from the NUX repo) is important, and worked for our files.The other 2 are in the EPEL repo.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!