We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to get a set delay time for my real time video. I'm a beginner was able to write for the capture but couldn't seem to find a function for a set buffer/delay. Wondering if anyone knows how exactly to achieve this?
Answers
Check this post https://forum.processing.org/two/discussion/20967/rgb-delayed#latest
Kf
is it possibly to delay the entire livestream instead of overlapping previous frames & the current frame?
You could just show the previous frames and omit the current one. Wouldn't that do the trick for you?
Kf
Your video hardware is sending frames. If you want to delay for n seconds, that means that you need to save a PImage buffer of n seconds worth of frames, show the oldest one, and add the newest video frame to the buffer. Then show oldest, add newest. Then show oldest, add newest.
So for example a 3 second delay at 24 frames per second video = 3*24 = 72 PImage frames.
There isn't really a way out of buffering delayed video, because the frame pixel data has to be stored somewhere after it is created by the camera if you aren't going to just draw each frame to the screen while the camera forgets it and creates the next frame. It is like saying "how can I have each piece of my mail delivered 3 weeks late?" The mail would have to be lined up and kept somewhere.