I have a .mp4 video file that I would like to get into an numpy array and store on disk with numpy.memmap, but it is too large to read in all at once. I know how to process the file frame by frame with scikit video, but not how to then pump that to a single numpy file on disk. Does anyone know how this can be done?
Asked
Active
Viewed 627 times
1 Answers
1
An uncompressed video is a large amount of data...this answer gives you some idea of how much memory you'd need ("roughly 33 GB per minute for 8-bit 24 fps").
I remember attempting to do something similar when I was getting started with openCV. I'd suggest you're probably coming at your problem wrong. But if you really want to do it, you can use numpy.save
.
This answer has some good tips on better data formats for large data sets.

Aidenhjj
- 1,249
- 1
- 14
- 27
-
hmmm hadn't thought about how much data that would be uncompressed. Thanks! – Austin Aug 10 '17 at 17:03