MATLAB Matlab: Movie2avi() Troubleshooting 2.3GB Video File

  • Thread starter Thread starter m1ke_
  • Start date Start date
  • Tags Tags
    Matlab
AI Thread Summary
The movie2avi() function in Matlab may struggle with creating a video file of 2.3 GB due to limitations associated with 32-bit word sizes, potentially leading to corruption or playback issues. Smaller video files (~200 MB) work fine, indicating that the problem arises specifically with larger files. The AVI format may utilize signed 32-bit words for offsets, which could restrict file sizes and lead to errors. A workaround suggested includes splitting the video into two separate AVI files and merging them using a video editor. Ultimately, the limitations of the AVI format and Matlab's handling of large files could be the root cause of the issues experienced.
m1ke_
Messages
21
Reaction score
0
Would there be a reason that movie2avi() function would be unable to create a video file based on its size?

I have a program that intakes video sequences and manipulates all their frames so that when projected on a curved, non-flat surface, or angled surface, the video looks normal. The video outputted by my function works perfectly fine (will play using implay() command) and with smaller video sequences (~200 MB in size) they will write to avi format perfectly fine. My boss, however, wants to see one video file which is about 2.3 GB in size, I can manipulate it in MatLab perfectly fine, but the outputted file is always corrupt or unable to play using WMP or VLC. Any suggestions or tips??

Thanks in Advance

mike
 
Physics news on Phys.org
I don't have a definitive answer, but 2.3GB is reaching the limits of a 32-bit word. It will fit in an unsigned 32-bit word (0x93333333), but not in a signed one (max signed value is 0x7blackf). It's possible that the avi format (or the Matlab function) uses signed 32-bit words for offsets, so that could be a problem.

Maybe you can try saving the video in 2 separate avi files and then join them with some freeware video editor.

Or just tell your boss it can't be done :smile:

EDIT: according to http://www.avi-io.com/2_4_gig_issue.htm" , it might be the issue. I don't know if this info is up to date however:
standard AVI files use internaly 32 bit pointers. One can address a maximum of 4GB using 32 bit pointers. Such files originally had SOFTWARE based limits of 1GB at the beginning ( all MCI based software ), 2GB (Video for Windows oriented software) and today the theoretical maximum of this kind of avi files is 4 GB by using DirectShow based software or software which is using it's own code for reading and writing avi files.
 
Last edited by a moderator:

Similar threads

Back
Top