Skip to content

Repository files navigation

Gocast

CI CI

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.

Features

  • Multi-protocol support (HTTP, ICY, SRT)
  • Compatible with Icecast's PUT & legacy SOURCE protocols 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

Getting started

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:

$ docker run --rm -p 8080:8080 -p 8000:8000 -p 6000:6000/udp ghcr.io/rlibaert/gocast

You 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: foo

Tip

You can check out the deployment directory for a complete yet simple docker-compose based setup.

About

Simple media streaming server, inspired by Icecast

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages