Skip to content

luftboud/latencyReducer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimization of the video stream decoding algorithm

Term project for the Architecture of Computer Systems course

Idea

Exploration of the ways to optimize the video stream decoding algorithm, in particular on surveillance devices from Dahua Technology, through the implementation of appropriate software based on the Web Real-Time Communication (WebRTC) protocol, since the use of software from developers does not provide the desired delay in video transmission from a device in motion, which is critical for tasks related to video surveillance.

Screenshot 2026-05-07 at 01 50 07

Results

A software prototype based on the WebRTC protocol was developed for low-latency video streaming from a Dahua Technology surveillance camera to a web browser. The system consists of three main components: a camera stream sender, a signaling/server-exchanger module, and a browser-based client application for video playback.s During the implementation, the RTSP video stream from the camera was integrated with a WebRTC transmission pipeline using GStreamer, which enabled direct low-latency delivery of the video stream to the client browser. In addition, a signaling mechanism based on WebSocket communication was implemented to establish and maintain the WebRTC connection between the sender and the viewer. A series of experiments was conducted to evaluate the behavior of the stream under different network conditions and camera configurations.

As a result of the optimization process, unnecessary processing stages and camera-side settings that introduced additional buffering and delay were reduced. The developed solution achieved an average end-to-end latency of approximately 100–200 ms, which demonstrated significantly more stable real-time performance compared to the original vendor software. The experiments also revealed several limitations of the camera itself, particularly latency growth during intensive movement and fluctuations caused by adaptive buffering mechanisms.

Prerequisites

  • Python 3
  • GStreamer for Python
  • Node.JS
  • GCC/Clang
  • IP-camera Dahua DH-IPC-HFW2249S-S-IL.

Install the dependencies written in dependencies.md and requirements.txt

Instructions for the software

Detailed setup and usage instructions, including the initialization and configuration of the camera in Dahua ConfigTool, the launch of the signaling server, and the execution of the streaming components, are provided in the Instruction.

General Installation and Usage

Clone the repository

git clone https://github.com/luftboud/latencyReducer

Install the dependencies written in dependencies.md and requirements.txt

  1. Run the server
cd server/cpp
mkdir build
cd build
cmake ..
make
./server
  1. Run the client
cd webclient
npx serve .
<y> 
  1. Open the client via localhost and click start - to send a request to the websocket
  2. Run the sender
cd sender
python<3> sender.py

Project Structure

latencyReducer/
├── sender/ connects to the IP-camera and sends videostream
├── server/ main channel of communication between sender(camera) and client
└── webclient/ webclient that displays the decoded video stream in the browser

Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors