Creating an ‘instant replay’ effect using webcam input. Will it be necessary for me to first record the video file to disk before I can play it back? Or can say, 5 seconds of video be somehow buffered in RAM for playback?
I would look into Cache TOP, with a little bit of logic you should be able to do exactly that.
Check Looper.tox in the Shared .tox forum
I’m looking to do something similar but with a 1 hour delay possible longer. My camera feed will run 24/7 for 4 months.
sounds tough for such a long period, 1 hour depending on the resolution and fps would be a huge amount of gpu memory.
perhaps you could cache images to disk constantly, and have an hours worth of frames to roll back through when needed.
One concern would be the wear and tear on the disk, writing that often may or may not reduce the lifespan. not super sure.
Optionally, since cpu ram is much cheaper, you could extract the pixels from the top as a numpy array, and store them in cpu memory. this would be much more intensive on the cpu, but if you aren’t doing a whole lot else with your TD thread and / or you aren’t expecting super fast performance when scrubbing back through that 1 hour, maybe that could work.
One hour delay is too much I think. Maybe it would be easier to try to use a security camera service