Ask Your Question
0

Delay video in python

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

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

Comments

clarify "delay":

like, showing what happened 5 seconds ago ?

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

1 answer

Sort by ยป oldest newest most voted
-1

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

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

Stats

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

Seen: 408 times

Last updated: Aug 12 '16