OpenCV Guides Repository
View the full source code and example projects for DWE.ai cameras on GitHub.
Features
- Raw RTP/UDP: No GStreamer or external dependencies required.
- High Resolution: Optimized for 1080p 30fps+ streams.
- 10-bit Support: Handles 10-bit YUV 4:4:4 (
yuv444p10le) and standard 8-bit formats. - Low Latency: Uses a background receiver thread and multi-threaded decoding.
- Modular Design: Separates network handling, decoding, and display logic.
Prerequisites
- Python 3.8+
- FFmpeg libraries (usually installed automatically via PyAV)
Installation
Navigate to the3-receive-dweos-h264/python directory in the repository and set up your environment:
-
Create a virtual environment:
-
Install the required dependencies:
Usage
- Start your H.264 RTP stream (defaulting to
127.0.0.1:5600). - Run the receiver:
Project Structure
rtp_receiver.py: Handles raw UDP packet reception and H.264 NAL reassembly (including FU-A and STAP-A).h264_decoder.py: Wraps PyAV for high-performance H.264 decoding.main.py: The main entry point that connects the receiver and decoder to an OpenCV window.