High-performance RTSP/RTP proxy — one upstream camera, many TCP clients
204
High-performance RTSP/RTP proxy for IP cameras. Opens one upstream connection and fans it out to many downstream clients over RTP/AVP/TCP (interleaved).
Cuts load and bandwidth on the camera: multiple viewers share a single session.
docker run -d --name rtsp-proxy \
-p 8554:8554 \
-p 9090:9090 \
leandr/rtsp-proxy
Client URL:
rtsp://<host>:8554/rtsp/[user:pass@]<camera-host>[:port]/path
Example:
rtsp://127.0.0.1:8554/rtsp/admin:[email protected]:554/Streaming/Channels/101
user:pass@host/path/metrics (optional port)| Port | Purpose |
|---|---|
| 8554 | RTSP proxy |
| 9090 | Prometheus metrics |
All options are CLI flags (override CMD):
docker run --rm -p 8554:8554 -p 9090:9090 leandr/rtsp-proxy \
-port 8554 \
-metrics-port 9090 \
-idle-timeout 20s \
-packet-queue-size 1000 \
-buffer-size 65536 \
-dial-timeout 5s \
-verbose \
-log -
| Flag | Default | Description |
|---|---|---|
-port | 8554* | Listen port (*image default; binary default is 554) |
-metrics-port | 9090* | Prometheus HTTP port (0 = off) |
-idle-timeout | 20s | Close idle upstream |
-packet-queue-size | 1000 | Per-client RTP queue depth |
-buffer-size | 65536 | Read buffer size (bytes) |
-dial-timeout | 5s | Upstream dial timeout |
-verbose | off | Detailed RTSP / state logs |
-log | - | Log path (- = stderr) |
With -metrics-port 9090:
http://<host>:9090/metrics
Counters/gauges include packets forwarded/dropped, bytes, reconnects, active streams/clients, auth failures, uptime.
qop=auth) and Basic authUDP / multicast are not supported yet.
Client(s) ──TCP──▶ Proxy ──TCP──▶ Camera
│
└── single upstream session
fan-out via per-client queues
Stream identity: username:password@host/path — different credentials never share a stream.
rtsp, uid 10001)See the project repository for license and full documentation.
Content type
Image
Digest
sha256:49f4d22a6…
Size
6.5 MB
Last updated
about 2 months ago
docker pull leandr/rtsp-proxy