real-time video delay w/ webcam

edited March 2017 in Library Questions

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?

Tagged:

Answers

  • is it possibly to delay the entire livestream instead of overlapping previous frames & the current frame?

  • Answer ✓

    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.

Sign In or Register to comment.