필터 지우기
필터 지우기

Using VideoReader on .mp4 files on Linux using Matlab2015a

조회 수: 29 (최근 30일)
Kirsten
Kirsten 2016년 1월 28일
댓글: Walter Roberson 2017년 12월 22일
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?

답변 (3개)

jackie tom
jackie tom 2017년 12월 22일
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
jackie tom
jackie tom 2017년 12월 22일
If this doesn't work immediately, try to restart your MATLAB.
Walter Roberson
Walter Roberson 2017년 12월 22일
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
Walter Roberson 2016년 1월 28일
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
Dhananjayan Santhanakrishnan 2016년 9월 10일
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

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by