RTSP stream relay server with codec passthrough, so that no encoding will take place and low CPU will be used.
Any input URL handled by ffmpeg can be used, but keep in mind that no transcoding will take place to the output rtsp stream.
Multiple clients can connect to the same stream.
This is based on ffmpeg, https://github.com/aler9/rtsp-simple-server and https://github.com/aler9/rtsp-simple-proxy.
Exposed ports:
version: '3.7'
services:
rtsp-relay:
image: flaviostutz/rtsp-relay
ports:
- 8554:8554
restart: always
environment:
- SOURCE_URL=http://ip-thomasmarina.greatlakescam.com/user/cgi-bin/getstream.cgi?10&&&&0&0&0&0&0
VLC -> File -> Open Network... -> URL "rtsp://localhost:8554/stream" -> Open
The restreamed image may appear
If you wish to create an RTSP feed from a video file in loop
Place the video file in directory 'samples'
Create docker-compose.yml:
rtsp-relay:
image: flaviostutz/rtsp-relay
ports:
- 8554:8554
environment:
- SOURCE_URL=file:///samples/cars1.mp4
volumes:
- ./samples:/samples
Run docker-compose up
Connect your RTSP client (VLC etc)
If you need a Kubernetes version of this tool, check https://github.com/kerberos-io/virtual-rtsp