MATLAB Answers

Large 400fps .avi files won't read using VideoReader

14 views (last 30 days)
Charlie on 21 Dec 2012
I am trying to read in some uncompressed .avi files that are just under 4GB each (huge i know) because they are 400fps. I am inevitably having difficulty with the simplest of functions but don't understand what it is that's different from other video files (which i have managed to read in in the same way) apart from the size/fps.
This is the error message I get using VideoReader: "Error using VideoReader/init (line 447) Failed to initialize internal resources.
Error in VideoReader (line 132) obj.init(fileName);"
I'm not able to convert the files if it means compression as i need them raw and uncompressed. What might be the problem? Is it the size or possibly something simple and unrelated?
Charlie on 21 Dec 2012
oh and i'm on a mac, i dont know if that changes things

Sign in to comment.

Answers (1)

Stefan Karlsson
Stefan Karlsson on 21 Dec 2012
From your question it is not clear whether the problem is due to lack of memory access or because videoReader has problems opening the file due to its size or fps. If you post your code, it will clarify.
If you have a large amount of data to process, then dont read the full file into memory, but process it by blocks (frames are common block sizes for video).
first advice to you is this however. Compress the video using a lossless encoder. Let me recommend lagarith, as i have used it myself for scientific applications.
If the problem is somehow connected to the fps, then simply change it for your files. Use the program ffmpeg for this, has a great command line interface.
If the problem is the size of the video files (even more doubtful) use ffmpeg once more to split your files into smaller ones.
Charlie on 31 Dec 2012
Damn! My upgraded ram came today but I still cant run VideoReader on these files. Why would it work on one computer but not another? The other computer I used was also a mac but with better specs all around.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!