MATLAB: Do I receive a premature EOF error when reading certain frames QuickTime movies using the READ method of MMREADER in MATLAB 7.6 (R2008a)

MATLAB

When reading particular frames in QuickTime movies, I receive the following error message:
??? The frame index requested is beyond the end of the file.
Error in ==> mmreader.read at 76
videoFrames = read(uddobj, index);
However, no error occurs when reading frames that come after (or before) the problem frames. Furthermore, other readers/players handle the frames without trouble.

Best Answer

This is an issue with QuickTime 7 when using the READ method of MMREADER in MATLAB 7.6 (R2008a), on Mac OS X 10.4 and 10.5.
To workaround this issue, either:
1. Use OS X 10.5 or
2. Skip the problem frames with a TRY-CATCH block:
try
vidFrames = read(myMovie, frameIndex);
catch
% Error handling code
end
You can also refer to the attached files for more detailed examples.
Related Question