How mpromonet/webrtc-streamer works
Project Type and Core Components
This is a WebRTC media streaming application that acts as a bridge between various media sources and WebRTC clients. The main components should be organized as follows:
Key Architectural Elements
a. Media Source Layer:
• Video Sources (V4L2, Screen Capture, Window Capture)
• Audio Sources (ALSA, File Audio)
• Network Sources (RTSP, RTMP)
• File Sources (MKV)
b. Core Processing Layer:
• Management
• Encoding/Decoding Pipeline
• WebRTC Connection Management
• Signaling System
c. External Interface Layer:
• HTTP Server (CivetWeb)
• WebRTC Endpoints
• STUN/TURN Server Integration
• Integration Points (Janus, Jitsi)
[Client Layer]
Web Browsers <-> WHEP Clients <-> Custom Web Components
• ↓
[HTTP/WebSocket Layer]
CivetWeb Server (Port 8000) <-> REST API
• ↓
[Core Processing]
PeerConnectionManager
• ↓ ↓
Encoders/Decoders Capturers
• ↓ ↓
[Media Sources] [Network Components]
• V4L2 - STUN/TURN Servers
• Screen/Window - WebRTC Data Channels
• File Sources - RTP/RTCP
• RTSP/RTMP - Network I/O
[External Integrations]
• Janus Gateway
• Jitsi
• Prometheus/Grafana Monitoring
Important Relationships to Highlight
• Bidirectional data flow between clients and server
• Media pipeline flow from sources through encoders to clients
• Control plane vs. Data plane separation
• Integration points with external systems
Implementation Details
• Port configurations (8000 for HTTP, 3478 for STUN)
• Supported protocols (WHEP, WebRTC, RTSP, RTMP)
• Media format support (H.264, VP8, etc.)
• Authentication mechanisms
Notes
• Version information
• Configuration parameters
• Document supported platforms (Linux, Windows, MacOS)
• Scaling capabilities
• Monitoring points