Ask Your Question

Delay video in python

asked 2016-08-12 08:26:43 -0600

I am trying to delay a video feed, I am very new to programming but am jumping right in. I can display the video from the camera but I want a delay between the camera and the display.

Many thanks

edit retag flag offensive close merge delete


clarify "delay":

like, showing what happened 5 seconds ago ?

berak gravatar imageberak ( 2016-08-12 08:43:52 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2019-09-26 00:58:49 -0600

import time
time.sleep(5)   # Delays for 5 seconds. You can also use a float value.

Here is another example of python sleep() where something is run approximately once a minute:

import time
while True:
    print("This prints once a minute.")
    time.sleep(60) # Delay for 1 minute (60 seconds).
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-08-12 08:26:43 -0600

Seen: 741 times

Last updated: Aug 12 '16