MATLAB: Am I unable to correctly write files larger than 2GB using AVIFILE and ADDFRAME in MATLAB 7.5 (R2007b) on Mac OS and on Windows XP SP2

2gbaddframeavifilefileslargemacMATLABoswindowsxp

I was writing large uncompressed movie streams but noted that large files (i.e. those greater than 2GB) were corrupted when played using Windows Media Player or when file information was extracted using third party applications like GSPOT. AVIINFO gives correct statistics about the movie, but the file itself will not play back.
When trying to play back the AVI file, Windows Media Player says:
"Windows Media Player cannot play the file. The file is either corrupt or the Player does not support the format you are trying to play."
The error generated by Windows Media Player is 0xc00D1199.

Best Answer

This change has been incorporated into the documentation in Release 2011a (R2011a). For previous releases, read below for any additional information:
This enhancement has been incorporated in Release 2010b (R2010b). VideoWriter and writeVideo can be used to create larger files. For previous product releases, read below for any possible workarounds:
The ability to write files larger than 2GB is not available in MATLAB.
One workaround is to split up data into multiple video files as they approach 2GB. To detect the filesize of a file called 'myfile.dat', use the DIR command as follows:
s = dir('myfile.dat');
filesize = s.bytes
When 'filesize' becomes close to 2GB, close the video file and open a new one to continue writing.