Every station emits one continuous 128 kbps, 44.1 kHz stereo MP3 stream. Source files are decoded to a fixed PCM profile and passed through a long-lived station encoder. This keeps track transitions gapless and prevents bitrate or sample-rate changes from interrupting players.
| Format | Extension | Transcoded |
|---|---|---|
| MP3 | .mp3 |
Yes |
| WAV | .wav |
Yes |
| FLAC | .flac |
Yes |
| OGG Vorbis | .ogg |
Yes |
| Opus | .opus |
Yes |
| AAC/M4A | .m4a, .aac |
Yes |
| WebM | .webm |
Yes |
| WMA | .wma |
Yes |
Streaming requires ffmpeg with libmp3lame to be installed and available on PATH.
Track metadata (title, artist, album) is read from ID3 tags. Files without tags fall back to the filename as the title.
Ads are injected between music tracks based on two independent triggers. Either one firing will cause the next track to be an ad:
- Song count: After every N music tracks (
ad_every_n_songs) - Time interval: After every N minutes (
ad_every_n_minutes)
Set ads_path to a directory of supported audio files or a single audio file. When ad_shuffle is true, ads are played in random order. When false, they rotate sequentially.
Both triggers reset after each ad plays.
Listener IP geolocation uses a .mmdb database. When configured, each connected listener's IP is resolved to a country, city, and coordinates, visible in the status JSON.
To enable it:
- Download the DB-IP City Lite database (free, no signup)
- Unpack it:
gunzip dbip-city-lite-2026-03.mmdb.gz - Set the path via
--geo-db /path/to/dbip-city-lite-2026-03.mmdbor in the config file under[geo] db_path
Client IP is extracted from X-Forwarded-For, then X-Real-IP, then the connection's remote address. This works correctly behind reverse proxies that set these headers.
When a SQLite database path is configured, the server records each listener session on disconnect. No IP addresses are stored — only geo information (country, city, coordinates), connection times, and duration.
To enable it:
- Pass
--stats-db /path/to/stats.dbor set[stats] db_pathin the config file - The database file is created automatically; the parent directory must exist
The public /statistics and /<id>/statistics endpoints return aggregated data: total sessions, listen hours, top 10 countries, top 10 cities, and a daily breakdown for the last 30 days. These endpoints require no authentication.
Statistics work best when combined with GeoIP — without it, country and city fields will be empty.