Large video file processing (~10GB)
Show older comments
Hello,
I'm looking to process large video files to run an object tracking algorithm.
I've been developing using the VideoReader object to run through the images of the movie, but it gets bogged down and will never complete with large files. I read that using the vision.VideoFileReader object ( http://www.mathworks.com/matlabcentral/newsreader/view_thread/287250) is a better option for this more streaming-type application, but it seems to really struggle with the size too.
Is there an easy way to process multi-GB video files in a reasonable amount of time or should I focus on down-sampling everything into more manageable chunks?
Thanks,
Jake
Answers (2)
Image Analyst
on 15 Oct 2012
0 votes
Are you using imshow() to display images? If you don't use cla in between calls to it, then all the images get stored in the display buffer (the axes) and that can really slow things down a lot if you have dozens of images. Just one thing to check that might speed things up.
1 Comment
Jacob Bucci
on 17 Oct 2012
Hello, I have used the sample code that you have written, Video Processing Tutorial, and I too face the similar issue when trying to read avi video files that are about 12GB. Could you please recommend a solution? Thank you!
7 Comments
Image Analyst
on 8 Sep 2022
Call Mathworks tech support. They're the ones who wrote the VideoReader function.
Hb
on 8 Sep 2022
Thank you for the prompt response. There is no issue when using the VideoReader function, but it errors out at the read function. Per your Video Processing Tutorial, it can complete line:
(39) videoObject = VideoReader(movieFullFileName)
but it errors out at:
(81) thisFrame = read(videoObject, frame)
the error reads: unable to read the file
Image Analyst
on 8 Sep 2022
What frame number were you on and how many frames were in the file?
Hb
on 8 Sep 2022
It errors at frame 1, the file has 18006 frames
Image Analyst
on 8 Sep 2022
We can't really help you much unless you attach the video. Can you zip up a small one and attach it with the paperclip icon?
Hb
on 8 Sep 2022
Just to clarify, I have no issue in reading and writing avi files that around 2GB, but it errors out when trying to read files around 14GB. Also, I'm not able to attach a video, as there is a 5MB limit.
Image Analyst
on 9 Sep 2022
Then I think you'll need to work with tech support as we can't help you anymore.
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!