<div dir="ltr">We use Matlab R2020b with the Image Processing Toolbox in a RHEL 7 Bright Computing cluster on compute nodes, so, e.g., on a Mac, you need XQuartz and open Matlab via ssh -X. I've been testing starting Matlab with the 'GST_PLUGIN_PATH' path being set as follows:<br><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">GST_PLUGIN_PATH=/usr/lib64/gstreamer-1.0;'matlab'</span></p></div><div><br></div><div>Here are the gstreamer1 RPMs installed:</div><div><font face="monospace">rpm -qa|grep gstreamer<br>gstreamer-plugin-crystalhd-3.10.0-11.el7.x86_64<br>gstreamer1-plugins-bad-free-1.10.4-3.el7.x86_64<br>gstreamer1-rtsp-server-devel-1.4.5-1.el7.x86_64<br>gstreamer1-plugins-base-devel-1.10.4-2.el7.x86_64<br>gstreamer1-plugins-ugly-free-1.10.4-3.el7.x86_64<br>gstreamer1-plugins-ugly-free-devel-1.10.4-3.el7.x86_64<br>gstreamer1-plugins-bad-free-gtk-1.10.4-3.el7.x86_64<br>gstreamer1-vaapi-1.10.5-3.el7.x86_64<br>gstreamer1-plugins-base-devel-docs-1.10.4-2.el7.noarch<br>gstreamer1-rtsp-server-1.4.5-1.el7.x86_64<br>gstreamer1-plugins-base-tools-1.10.4-2.el7.x86_64<br>gstreamer1-1.10.4-2.el7.x86_64<br>gstreamer1-devel-1.10.4-2.el7.x86_64<br>gstreamer1-plugins-good-1.10.4-2.el7.x86_64<br>gstreamer1-plugins-base-1.10.4-2.el7.x86_64<br>gstreamer1-vaapi-devel-docs-1.10.5-3.el7.noarch<br>gstreamer1-rtsp-server-devel-docs-1.4.5-1.el7.noarch<br>gstreamer1-devel-docs-1.10.4-2.el7.noarch<br>gstreamer1-plugins-bad-free-devel-1.10.4-3.el7.x86_64</font><br></div><div><br></div><div>Some of the files in here:</div><div><font face="monospace"> ls -l /usr/lib64/gstreamer-1.0<br>total 12564<br>drwxr-xr-x 3 root root     16 Jun 28 15:18 include<br>-rwxr-xr-x 1 root root  45632 Mar  9  2017 libgst1394.so<br>-rwxr-xr-x 1 root root  15736 Oct 17  2017 libgstaccurip.so<br>-rwxr-xr-x 1 root root  57072 Jun  8  2018 libgstadder.so<br>-rwxr-xr-x 1 root root  15840 Oct 17  2017 libgstadpcmdec.so<br>-rwxr-xr-x 1 root root  15872 Oct 17  2017 libgstadpcmenc.so<br>[...]<br>-rwxr-xr-x 1 root root  28616 Oct 17  2017 libgsty4mdec.so<br>-rwxr-xr-x 1 root root  11680 Mar  9  2017 libgsty4menc.so<br>-rwxr-xr-x 1 root root  15928 Oct 17  2017 libgstyadif.so</font><br></div><div><br></div><div>The below error suggests Matlab cannot find the appropriate gstreamer-1.0 plugin on a .mp4 file created on a Mac with QuickTime.</div><div><br></div><div><font face="monospace">Error using VideoReader/initReader (line 734)<br>Could not read file due to an unexpected error. Reason: Unable to initialize the video properties<br><br>Error in audiovideo.internal.IVideoReader (line 136)<br>            initReader(obj, fileName, currentTime);<br><br>Error in VideoReader (line 104)<br>            obj@audiovideo.internal.IVideoReader(varargin{:});<br><br>Error in Apr12_ColorSampler_MatLAB (line 31)<br>    videoObject = VideoReader(videoFile);</font><br></div><div><font face="monospace"><br></font></div><div><font face="arial, sans-serif">Here is a gst-inspect to show we have the H264 codec installed: </font></div><div><font face="monospace">gst-inspect-1.0 | grep -i 264<br>rtp:  rtph264pay: RTP H264 payloader<br>rtp:  rtph264depay: RTP H264 depayloader<br>videoparsersbad:  h264parse: H.264 parser<br>typefindfunctions: video/x-h264: h264, x264, 264<br></font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Using the sample </font>xylophone.mp4 test file that is built into Matlab check out these results:</div><div><br></div><div><font face="monospace">gst-launch-1.0 playbin uri=file:///tmp/xylophone.mp4 video-sink=appsink audio-sink=fakesink text-sink=fakesink<br>Setting pipeline to PAUSED ...<br>Pipeline is PREROLLING ...<br>DtsGetHWFeatures: Create File Failed<br>DtsGetHWFeatures: Create File Failed<br>Running DIL (3.22.0) Version<br>DtsDeviceOpen: Opening HW in mode 0<br>DtsDeviceOpen: Create File Failed<br>Missing element: H.264 (Main Profile) decoder<br>WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)1.3, profile=(string)main, codec_data=(buffer)014d400dffe1000b674d400d96540a0f98080401000468ce3c80, width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true'.<br>Additional debug info:<br>gsturidecodebin.c(938): unknown_type_cb (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0<br>ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: Your GStreamer installation is missing a plug-in.<br>Additional debug info:<br>gsturidecodebin.c(1005): no_more_pads_full (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0:<br>no suitable plugins found:<br>gstdecodebin2.c(4592): gst_decode_bin_expose (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:<br>no suitable plugins found:<br>Couldn't set bcmdec0 to READY<br><br>ERROR: pipeline doesn't want to preroll.<br>Setting pipeline to NULL ...<br>Freeing pipeline ...</font><br></div><div><br></div><div>Now on the mp4 file we have:</div><div><font face="monospace">gst-launch-1.0 playbin uri=file:///moto/home/rk3199/testMatLAB/ColorSamplingVideo_May23.mp4 video-sink=appsink audio-sink=fakesink text-sink=fakesink<br>Setting pipeline to PAUSED ...<br>Pipeline is PREROLLING ...<br>Missing element: MPEG-4 Video (Simple Profile) decoder<br>WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, profile=(string)simple, level=(string)1, codec_data=(buffer)000001b001000001b58913000001000000012000c48d8801952804421463000001b24c61766335372e362e313030, width=(int)1280, height=(int)528, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true'.<br>Additional debug info:<br>gsturidecodebin.c(938): unknown_type_cb (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0<br>ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: Your GStreamer installation is missing a plug-in.<br>Additional debug info:<br>gsturidecodebin.c(1005): no_more_pads_full (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0:<br>no suitable plugins found:<br>gstdecodebin2.c(4592): gst_decode_bin_expose (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:<br>no suitable plugins found:<br>Missing decoder: MPEG-4 Video (Simple Profile) (video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, profile=(string)simple, level=(string)1, codec_data=(buffer)000001b001000001b58913000001000000012000c48d8801952804421463000001b24c61766335372e362e313030, width=(int)1280, height=(int)528, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true)<br><br>ERROR: pipeline doesn't want to preroll.<br>Setting pipeline to NULL ...<br>Freeing pipeline ...</font><br></div><div><br></div><div>The env variable is still set to:</div><div><font face="monospace">echo $GST_PLUGIN_PATH<br>/usr/lib64/gstreamer-1.0</font><br></div><div><br></div><div>Here is:</div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">pkg-config --variable pc_path pkg-config</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">/usr/lib64/pkgconfig:/usr/share/pkgconfig</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p></div><div>The Matlab script runs just fine on Matlab on a Mac and Windows 10.  Is there really a missing plugin or does another ENV variable need setting? Math Works support says this is out of scope from their support, which is pretty lame as this toolbox clearly isn't working on Linux/RHEL 7.</div><div><br></div><div>Here is the xylophone.mp4 file from Matlab <a href="https://drive.google.com/file/d/1bQ8cZ9g9rh7Z2Uu_kL_dqWTGDZeXxoiJ/view?usp=sharing">https://drive.google.com/file/d/1bQ8cZ9g9rh7Z2Uu_kL_dqWTGDZeXxoiJ/view?usp=sharing</a></div><div><br></div><div>Thanks,</div><div><br></div><div>Rob</div><div><br></div><br class="gmail-Apple-interchange-newline"></div>