Matlab: Movie2avi() Troubleshooting 2.3GB Video File

  • Context: MATLAB 
  • Thread starter Thread starter m1ke_
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

The discussion centers on the limitations of the Matlab function movie2avi() when handling large video files, specifically a 2.3 GB AVI file. Users report that while smaller files are processed successfully, larger files result in corruption or playback issues in media players like WMP and VLC. The underlying issue is likely related to the 32-bit architecture, which can handle a maximum of 4 GB but has practical limits of 2 GB for many software applications. Suggested solutions include splitting the video into smaller segments and using a video editor to combine them.

PREREQUISITES
  • Understanding of Matlab video processing functions, specifically movie2avi()
  • Knowledge of AVI file format limitations and structure
  • Familiarity with 32-bit vs. 64-bit architecture implications
  • Experience with video editing software for file merging
NEXT STEPS
  • Research the limitations of AVI file formats and how they affect video processing
  • Learn about alternative video output formats in Matlab, such as MP4 or MOV
  • Explore video editing tools that can merge AVI files, such as Avidemux or VirtualDub
  • Investigate the use of 64-bit Matlab versions for handling larger video files
USEFUL FOR

Matlab developers, video processing engineers, and anyone involved in creating or manipulating large video files for projection or display purposes.

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

Replies
6
Views
2K