Azzera filtri
Azzera filtri

Using VideoReader on .mp4 files on Linux using Matlab2015a

29 visualizzazioni (ultimi 30 giorni)
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?

Risposte (3)

jackie tom
jackie tom il 22 Dic 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 Commenti
jackie tom
jackie tom il 22 Dic 2017
If this doesn't work immediately, try to restart your MATLAB.
Walter Roberson
Walter Roberson il 22 Dic 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.

Accedi per commentare.


Walter Roberson
Walter Roberson il 28 Gen 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.

Dhananjayan Santhanakrishnan
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

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by