Matlab: Movie2avi() Troubleshooting 2.3GB Video File

  • MATLAB
  • Thread starter m1ke_
  • Start date
  • Tags
    Matlab
In summary: Unfortunately, using 32 bit pointers also has a downside: if the total size of all the data in the video file exceeds 4GB, the pointer will wrap around and the file will become unreadable.
  • #1
m1ke_
21
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
  • #2
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:

Related to Matlab: Movie2avi() Troubleshooting 2.3GB Video File

1. How do I troubleshoot a 2.3GB video file in Matlab?

To troubleshoot a 2.3GB video file in Matlab, there are a few steps you can follow. First, make sure that you have enough free space on your hard drive to save the video file. If not, try freeing up some space and try again. Next, check the file format of the video. Matlab supports AVI, MPEG-1, and Motion JPEG formats. If your video is in a different format, try converting it to one of these formats before using the movie2avi() function. Finally, check your code for any errors and make sure that you are using the correct syntax for the function.

2. Why am I getting an error when trying to use movie2avi() on a large video file?

The movie2avi() function in Matlab has a default limit of 2GB for video file size. If your video file is larger than 2GB, you may encounter an error when trying to use this function. To fix this, you can change the default limit by using the 'Limit' parameter in the function. Set the value to a higher limit, such as 5GB, to be able to process larger video files.

3. How can I reduce the file size of my video when using movie2avi()?

If your video file is too large to be saved, you can try reducing the file size by adjusting the video quality. The 'Quality' parameter in the movie2avi() function allows you to specify the video quality on a scale of 0-100. Lower quality settings will result in a smaller file size. You can also try reducing the frame rate of the video to decrease the file size.

4. Can I use movie2avi() to convert my video file to a different format?

Yes, the movie2avi() function in Matlab allows you to convert your video file to different formats. However, it is limited to AVI, MPEG-1, and Motion JPEG formats. If you need to convert your video to a different format, you can use a third-party video conversion software or try using the 'Limit' parameter in movie2avi() to save the video in a different format.

5. How can I troubleshoot if my video file is not playing after using movie2avi()?

If your video file is not playing after using the movie2avi() function, there could be a few possible issues. First, make sure that you have selected the correct output folder when saving the file. Next, check the file format of the saved video and make sure it is supported by your media player. If the file is still not playing, try reducing the video quality or frame rate and see if that helps. You can also try using a different media player to see if the issue is with your current player.

Similar threads

Replies
6
Views
1K
Back
Top