Using VideoReader on .mp4 files on Linux using Matlab2015a
17 views (last 30 days)
Show older comments
Hi,
I have Matlab2015a installed on my Linux Machine and I am trying to read .mp4 files using the VideoReader. However I get the following error message: Error using VideoReader/init (line 619) Could not read file due to an unexpected error. Reason: Unable to initialize the video obtain properties.
I am able to play the file using the VLC Media Player so the required codecs should somehow be available. Where should the codecs be stored in order for matlab to use them?
I also tried to convert the mp4 file to avi using MPEG-1 Layer 3 and DivX MPEG4 version 3 decoder. The same error message appears. VLC was able to display the .avi file.
Any suggestions how to fix this?
0 Comments
Answers (3)
jackie tom
on 22 Dec 2017
I think I have found a solution for this problem:
1. According to the doc, VideoReader function needs gstreamer plugin higher than 1.0, so what we
need to do is install gstreamer1.0*
2. what I do is:
sudo apt-get install ubuntu-restricted-extras
sudo apt-get install gstreamer1.0*
That can make MATLAB read mp4 file on my ubuntu 17.10 machine with MATLAB2017b
2 Comments
Walter Roberson
on 22 Dec 2017
At the time the Question was posed, it was gstreamer 0.1 that was needed; it is only very recently that gstreamer 1.0 was switched to. So be sure to check the documentation for the release you are using.
Walter Roberson
on 28 Jan 2016
It might be the gstreamer problem; see http://www.mathworks.com/matlabcentral/answers/94531-why-do-i-receive-an-error-when-creating-a-videoreader-object-on-linux-in-matlab-r2010b-7-11#answer_103883 and note that the problem has other symptoms than just the one shown in that Question.
0 Comments
Dhananjayan Santhanakrishnan
on 10 Sep 2016
I have the same problem. Please if someone finds solution do post here. I am not able to fix it by installing gstreamer0.10-ffmpeg
0 Comments
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!