I've got some MKV videos encoded with FFV1. For each of the frames, I want to run some complex and time-intensive python or matlab code, so I'm using multithreading, where each thread works on an individual image.
I've tried extracting a single frame from the video using -ss, but it's terribly inefficient.
The most efficient way is to decompress everything into images in one go, but then I'm writing to disk, and then I'll be reading from disk, therefore it's not ideal either.
I've tried using a ram disk to export images to, and reading them from python/matlab, but it's not great performance-wise either. Also, I have to split the export into several batches, as the video file is 20GB and all of the exported images will not fit into memory
Is there a way to rapidly extract individual frames from ffmpeg directly into RAM (or ram disk), so that they can be used by another program? For example using something like a lookup-table.
For reference, each video is about 20GB, comprised of 50000 frames, and they are all keyframes (it's for archival purposes)