Gocast is a simple media streaming server, inspired by Icecast.
This project is an attempt to use up-to-date technology to offer a modern take on Internet radio streaming.
Note
While there is no intention to imitate Icecast, some of its features are reimplemented. The primary motivation is to not break compatibility with existing software.
- Multi-protocol support (HTTP, ICY, SRT)
- Compatible with Icecast's
PUT& legacySOURCEprotocols as well as in-band metadata - Strong scalability out of the box thanks to Go's concurrency model
- Support for MP3 & AAC
- Sources fallback
- Prometheus metrics
Gocast is available as a container image or a standalone binary.
You can also easily build a snapshot image from source:
$ docker build -t gocast .By default, the server listens on ports:
8080for HTTP8000for Icecast-style HTTP interface (ICY)6000/udpfor Secure Reliable Transport (SRT)
$ docker run --rm -p 8080:8080 -p 8000:8000 -p 6000:6000/udp ghcr.io/rlibaert/gocastYou can use an Icecast-compatible client to broadcast to the server on port
8000 or rely on more exotic setups, for example using FFmpeg:
$ ffmpeg -i ... "http://localhost:8080/streams/foo.mp3"
$ ffmpeg -i ... "srt://localhost:6000?streamid=publish:foo.mp3"The streams may then be consumed, and your client will even be served with Icecast in-band metadata if it is compatible:
$ ffplay -i "http://localhost:8080/streams/foo.mp3"
$ ffplay -i "srt://localhost:6000?streamid=foo.mp3"
$ mpv "http://localhost:8000/foo.mp3"
File tags:
icy-title: fooTip
You can check out the deployment directory for a complete yet simple docker-compose based setup.