Nov-15-2021, 02:12 PM
I am streaming home security video from usb camera attached to a onion card and receiving it in a desktop application written in python.
Doing so, the video has less than 1 sec latency. But whenever I record the video while streaming, the latency just increased to 2 seconds or sometimes goes up to 5 seconds. In the application, the video frames at the receiving end goes through, processing like brightness, contrast, display and writing.
To inform I am using opencv2 and the code snippet I use for recording the video is as shown below.
self.out = cv2.VideoWriter("filepath/" + self.filename + ".avi", cv2.VideoWriter_fourcc(*'MJPG'), 16.0,(w, h))
My first request : Can somebody just share me how to increase the latency, if you have faced such issue.
My second request : Will increasing the RAM and processing power of transmitting device do any help in reducing the video latency at the receiving device while writing when streaming is still going on.
Any help and suggestions will be highly appreciated.
Thanks in advance.
Doing so, the video has less than 1 sec latency. But whenever I record the video while streaming, the latency just increased to 2 seconds or sometimes goes up to 5 seconds. In the application, the video frames at the receiving end goes through, processing like brightness, contrast, display and writing.
To inform I am using opencv2 and the code snippet I use for recording the video is as shown below.
self.out = cv2.VideoWriter("filepath/" + self.filename + ".avi", cv2.VideoWriter_fourcc(*'MJPG'), 16.0,(w, h))
My first request : Can somebody just share me how to increase the latency, if you have faced such issue.
My second request : Will increasing the RAM and processing power of transmitting device do any help in reducing the video latency at the receiving device while writing when streaming is still going on.
Any help and suggestions will be highly appreciated.
Thanks in advance.