tags:

views:

71

answers:

1

I am attempting to read an H264 AVI file on OSX with Matlab, but it appears that the video is corrupted. When I display the frame it appears that the image is segmented by vertical grey lines and I can see a segmented and faded version of the actual image data repeated 3 times within the same frame. On my windows box I am able to read in the frame successfully without any issue using the same code/avi. Here are my specs:

Mac OSX 10.6.4
Matlab 7.8.0.347 (R2009a) Student Version
Quicktime 10.0 with Perian_1.2.1 codec plugin

AVI File:
H264
RGB24
640x480
60 Frames per second

Quicktime is able to successfully play the file with the Perian plugin.

Here is the example code I am using to display the file:

o=mmreader(avi_file_name);
figure(1);
imshow(read ( vid_obj, k ));

Any ideas?

A: 

Found a solution:

Turned out it wasn't only H264 codecs that didn't work, I found a variety of formats that gave me the same output. However, downloading mmread instead of using mmreader fixed all of my issues:

http://www.mathworks.com/matlabcentral/fileexchange/8028

Although, the mmread bug should probably still be addressed by MathWorks.

dr_pepper