Lightweight RTSP & Webcam to MJPEG Transcoding Hub with ONVIF & VAAPI GPU support.
1.3K
High-Performance RTSP, ONVIF & Webcam Stream Hub with On-the-Fly MJPEG Transcoding, Stream Multiplexing & Hardware Acceleration
Overview • Features • Quick Start • TrueNAS SCALE • Configuration • API Reference • Security • License
RTSP Stream Hub is a lightweight, standalone, fully containerized web application designed for managing and on-the-fly transcoding of RTSP camera streams and webcams into browser-compatible MJPEG.
It is specifically tailored to integrate IP cameras (e.g., Tapo, Reolink, Axis, Hikvision, Blink) seamlessly, with ultra-low latency and zero complex streaming server infrastructure, into web browsers and SmartHome dashboards (such as Neo Deck, Home Assistant, or MagicMirror).
graph LR
subgraph Cameras ["📹 Video Sources"]
A1[RTSP H.264 / H.265]
A2[ONVIF Cameras]
A3[HTTP/HTTPS Webcams]
A4[HLS .m3u8 Streams]
end
subgraph Hub ["⚡ RTSP Stream Hub"]
B[FFmpeg Engine<br/>+ Intel/AMD VAAPI GPU]
C[(SQLite DB<br/>Tokens & Config)]
end
subgraph Clients ["📱 Dashboards & Clients"]
D1[Neo Deck Dashboard]
D2[Home Assistant]
D3[Web Browsers / Smart TVs]
end
Cameras -->|Stream Ingest| Hub
Hub -->|Low-Latency MJPEG| Clients
ffmpeg pipeline for real-time, low-latency conversion of RTSP (H.264/H.265) streams into smooth MJPEG video feeds..m3u8 live streams, and static JPEG snapshots with configurable auto-refresh intervals./dev/dri) to dramatically reduce host CPU load.role: 'stream-viewer') strictly isolated to a single camera with zero administrative access.Important
**Secret Key Required:** The `JWT_SECRET` environment variable is **mandatory** and must be at least **32 characters** long. The server will safely refuse to start without a strong secret key.Generate a secure secret in your terminal:
openssl rand -hex 32 # or using Node.js: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Create a docker-compose.yml file:
services:
rtsp-stream-hub:
image: daddelgreis74/rtsp-stream-hub:latest # or: ghcr.io/daddelgreis74/rtsp-stream-hub:latest
container_name: rtsp-stream-hub
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./data:/usr/src/app/data
devices:
- /dev/dri:/dev/dri # Optional: For Intel/AMD GPU hardware acceleration
environment:
- PORT=8080
- JWT_SECRET=your_at_least_32_character_long_secret_key
# - DISABLE_VAAPI=true # Optional: Set to true to disable GPU acceleration
Start the application:
docker compose up -d
docker run -d \
--name rtsp-stream-hub \
--restart unless-stopped \
-p 8080:8080 \
-v $(pwd)/data:/usr/src/app/data \
--device /dev/dri:/dev/dri \
-e JWT_SECRET="your_at_least_32_character_long_secret_key" \
daddelgreis74/rtsp-stream-hub:latest
JWT_SECRET and select your dataset storage path.rtsp-stream-hubdaddelgreis74/rtsp-stream-hub (or ghcr.io/daddelgreis74/rtsp-stream-hub)latest (or e.g., 1.1.5)JWT_SECRET: (Your 32+ character secret key)8080 (Container) $\rightarrow$ 30474 (or any available host port)./usr/src/app/data.On initial startup, an administrator account is automatically created:
| Field | Default Value |
|---|---|
| Username | admin |
| Password | admin |
Warning
Please change the default password immediately after your first login under the **User Management** menu!
| Variable | Required | Default | Description |
|---|---|---|---|
JWT_SECRET | YES | — | Cryptographic secret (min. 32 chars) for signing authentication and scoped stream tokens. |
PORT | No | 8080 | Internal web server port. |
DISABLE_VAAPI | No | false | Set to true to disable GPU hardware acceleration and force software decoding. |
| Method | Endpoint | Authorization | Description |
|---|---|---|---|
POST | /api/auth/login | Public | Authenticate and obtain JWT token |
GET | /api/cameras | User / Admin | Retrieve list of configured cameras |
POST | /api/cameras | Editor / Admin | Add a new camera configuration |
PUT | /api/cameras/:id | Editor / Admin | Update an existing camera |
DELETE | /api/cameras/:id | Editor / Admin | Delete a camera |
GET | /api/cameras/discovery | Editor / Admin | Trigger ONVIF network auto-discovery scan |
GET | /api/cameras/:id/token | User / Admin | Generate an isolated, persistent stream token (role: 'stream-viewer') |
GET | /api/streams/mjpeg/:id?token=... | Stream-Viewer | Live MJPEG multipart video stream (multipart/x-mixed-replace) |
GET | /api/users | Admin | List all user accounts |
POST | /api/users | Admin | Create a new user account |
PUT | /api/users/:id/permissions | Admin | Update user roles and permissions |
DELETE | /api/users/:id | Admin | Delete a user account |
RTSP Stream Hub maintains a strict security boundary between Administrative Tokens and Stream Tokens:
/api/streams/mjpeg/:id endpoint of that specific camera.This project is licensed under the MIT License.
Copyright (c) 2026 Daddelgreis74.
Content type
Image
Digest
sha256:c61873a72…
Size
306.9 MB
Last updated
30 days ago
docker pull daddelgreis74/rtsp-stream-hub