MATLAB: Doesn’t VideoReader work on Oracle Linux 8.3

MATLAB

I am trying to read a vide in MATLAB using VideoReader. However, I am receiving the following error message:
 
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{:});
This happens across multiple versions of MATLAB. I tried reading the image with gstreamer, but got this error:
 
$ gst-launch-1.0 playbin uri=file:////groups/scicompsys/home/linesr/jcr80_20201028_front_v077.avi
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Missing element: MPEG-4 Video (Simple Profile) decoder
WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, framerate=(fraction)1/1, width=(int)432, height=(int)280, parsed=(boolean)true, profile=(string)simple, level=(string)1, codec_data=(buffer)000001b001000001b58913000001000000012000c48d88000d0d84231463, pixel-aspect-ratio=(fraction)1/1'.
Additional debug info:
gsturidecodebin.c(921): 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(988): no_more_pads_full (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0:
no suitable plugins found:
gstdecodebin2.c(4679): gst_decode_bin_expose (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:
no suitable plugins found:
Missing decoder: MPEG-4 Video (Simple Profile) (video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, framerate=(fraction)1/1, width=(int)432, height=(int)280, parsed=(boolean)true, profile=(string)simple, level=(string)1, codec_data=(buffer)000001b001000001b58913000001000000012000c48d88000d0d84231463, pixel-aspect-ratio=(fraction)1/1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
However, it does work with FFmpeg . Why isn't VideoReader working, and how do I resolve this issue?

Best Answer

The Error Message
This error message typically appears when your machine does not have the proper gstreamer codec to decode the video file. This is discussed in the following MATLAB Answers Post:
This is further supported by the error text generated by gstreamer which mentions:
Additional debug info:
gsturidecodebin.c(921): unknown_type_cb (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: Your GStreamer installation is missing a plug-in.
----------------------------------------------------------------------------------------------------
Missing decoder: MPEG-4 Video (Simple Profile) (video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, framerate=(fraction)1/1, width=(int)432, height=(int)280, parsed=(boolean)true, profile=(string)simple, level=(string)1, codec_data=(buffer)000001b001000001b58913000001000000012000c48d88000d0d84231463, pixel-aspect-ratio=(fraction)1/1)
MATLAB and gstreamer
VideoReader uses the same codecs as gstreamer to decode video files so that they can be read into MATLAB. This means that if an video cannot be read by gstreamer, it will not be able to be read by VideoReader. You must first resolve the codec issue.
FFmpeg was likely able to read the video because it comes shipped with its own codecs (which MATLAB doesn't use).
Solution
To resolve the issue, you can download the missing codecs (and other plugins) from the gstreamer's website:
This link is referenced in the following MATLAB documentation page which discusses supported video file formats: