voc/srtrelay ? reverse-engineered prompt

Reverse engineered prompt

Build me a Go service that acts like an SRT relay for live video streams. I want one publisher to send an MPEG TS stream into the server, and then multiple viewers should be able to connect and play that same stream at the same time using different stream IDs. Make it easy to run with Docker, and also easy to build and run locally from Go.

Please include a simple config file setup, command line flags, and an HTTP or API style way to inspect or manage the relay if that fits the project. It should support the common workflow where ffmpeg publishes a stream and ffplay subscribes to it. If there are sensible defaults, use them, but make the config flexible so I can change ports and behavior later.

Keep it production friendly enough to run in a container, and add a clear README style example for publishing and viewing a stream. If you need to check current docs for SRT or ffmpeg behavior, go ahead and look them up.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab