A demo of this in action can be seen at http://onlychicks.tv
Let's say you have a bunch of baby chickens and for some reason you've put a camera in their brooder. You want to world to see your chooks, but you've only got a mediocre residential internet connection. More than a couple of viewers and your fancy video stream will start buffering.
We use an RTSP proxy running on a cloud server/VM somewhere to ingest your video feed, convert it to a more user-friendly format (HLS for now) and publishe a very simple static HTML page that reads the proxied feed. This means you can have as many viewers as your public server can handle, but there's only a single connection to your crappy eBay camera on your underwhelming home internet connection.
- You have a basic camera on your home network that can publish an RTSP feed (I'm using a cheap TP-Link Tapo C220)
- You have a router capable of port forwarding
- You have a server somewhere out there with decent bandwidth and a public IP
- You're not publishing private or confidential videos (this isn't exactly secure)
-
Make your camera available to your public server. The quick & dirty way to do this is to use NAT on your router to forward incoming TCP/554 from your server's IP to TCP/554 on your camera's local IP. Make sure you limit this to ONLY your server's IP address as the most basic of security measures, lest you inadvertently publish your raw RTSP feed.
-
Log into your server and clone this repo
-
Edit
mediamtx.yml
and update the source. Eg:rtsp://tapocam:ChickenL0ve@<your home IP/dyndns>:554/stream1
-
Run
docker compose up -d
-
Visit http://yourserver:24665 and enjoy a public live stream of your chickens 🐔