Python Forum
How to decrease latency while recording streaming video.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to decrease latency while recording streaming video.
#1
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Recording a Conversation puvuz 0 424 Jan-31-2025, 02:00 AM
Last Post: puvuz
  Raspberry PI - PyAudio - Streaming to Web Page ultimatecodewarrior 2 941 Dec-25-2024, 10:54 AM
Last Post: pintailscratchy
  Video recording with Raspberry Pi - What´s wrong with my python code? Montezuma1502 3 2,407 Feb-24-2023, 06:14 PM
Last Post: deanhystad
Smile How we can prevent screen recording murad_ali 3 3,758 Jul-29-2022, 10:29 AM
Last Post: DeaD_EyE
  Help with storing temp data for each day then recording min/max in app. trthskr4 3 3,442 Sep-10-2021, 10:51 PM
Last Post: trthskr4
  Split recording with Picamera EvanS1 0 2,628 Jun-19-2021, 12:26 PM
Last Post: EvanS1
  How to decrease input Yankees1111 2 2,941 Apr-14-2021, 04:55 PM
Last Post: BashBedlam
  increase and decrease a slice value? KEYS 2 2,839 Nov-10-2020, 11:35 PM
Last Post: KEYS
  Using pyaudio to stop recording under certain sound threshold Twanski94 2 9,285 Jun-13-2020, 11:35 AM
Last Post: Twanski94
  recording a translation table into a file arbiel 0 1,973 Mar-31-2020, 02:33 PM
Last Post: arbiel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020