MATLAB: Do I get “Video file I/O requires Gstreamer 1.0 and higher. Install this on your system and restart MATLAB” error when using “VideoReader” in MATLAB

gstreamerinstallMATLABvideoreader

I want to use the "VideoReader" function in MATLAB.
I have installed gstreamer 1.0 to my home directory and added the location to $LD_LIBRARY_PATH:
When compiling gstreamer, I installed gstreamer to the location:
/data/home/<userid>/GST
Therefore, under this directory they have:
> ls ~/GST
bin include lib libexec share
and I added the library to the path as:
> export LD_LIBRARY_PATH=/data/home/<userid>/GST/lib
However, I still get the following error in MATLAB:
>> video = VideoReader("test.mp4");
Error using VideoReader/init (line 601)
Video file I/O requires Gstreamer 1.0 and higher.
Install this on your system and restart MATLAB.

Best Answer

As stated in the error message displayed, you might not have installed the Gstreamer library correctly.
Typically, MathWorks Technical Support does not debug gstreamer installation issues.
You can first try to verify you have installed gstreamer correctly by using the libraries outside MATLAB. For example:
1. Execute a simple C/C++ program in the your machine that uses gstreamer header files and libraries will help in isolating if the installation was successful or not.
2. If you are unable to write a standalone C code, you can also try to use the utility gst-launch in your system prompt:
> gst-launch-1.0 playbin uri=file:[path_to_some_filename]
If you have verified that you can use the gstreamer libraries successfully outside of MATLAB but still receiving the same error message when calling "VideoReader", you can contact MathWorks Technical Support for further troubleshooting steps.