0

I need help in Matlab 2012a, due to its my first time using it.

When i write the function to open a video "mmread ('jp.avi')" in matlab an error pops up as it is shown below :

Error using FFGrab Unable to open file

Error in mmread (line 146) FFGrab('build',filename,fmt,double(disableVideo),double(disableAudio),double(trySeeking));

Note :I put this avi video in the mmread folder.

I searched in the internet regarding this issue but unfortunately I didn't get any results.

If you have any solution that may work, please let me know.

Maha Als
  • 1
  • 2
  • Have you checked that you have the proper codec installed? – nhowe Apr 05 '13 at 14:35
  • Hi nhowe, I have installed the proper codec but I dont know how to link it with matlab, so I tried other appraoches but it didnt work. – Maha Als Apr 06 '13 at 20:26

1 Answers1

0

The error means MATLAB can't find the file. You should not put stuff in folders owned by MATLAB. Instead, put it in a folder whose location you know, and navigate to it in the 'Current Folder' panel (usually on the left) when you start your MATLAB session (or by using the Current Folder dropdown at the top, or by using the cd command). Then it will be available for your use without a fully qualified path.

Additionally, I don't think you're supposed to use mmread directly; you should use the VideoReader class instead; there is an example of its use at the bottom of the linked documentation page.

wakjah
  • 4,541
  • 1
  • 18
  • 23
  • Hi wakjah, I did as what you have said but an error pops up stating: cd('C:\Users\Alajmi\Documents') >> VideoReader ('jp.avi') " Error using VideoReader/init (line 447) The file requires the following codec(s) to be installed on your system: H264 Error in VideoReader (line 132) obj.init(fileName); " I have installed the divxh264decoder820 to do the job but i don't know how to link it to matlab. – Maha Als Apr 06 '13 at 20:49