A Terminal User Interface (TUI) for streaming Radiko Japanese internet radio, written in Go.
- π΅ Stream live Radiko radio stations
- πΎ Support for all 47 Japanese prefectures
- π₯οΈ Interactive terminal UI (TUI)
- π Server mode for HTTP streaming (AAC/PCM)
- π Client mode to connect to remote server (no local ffmpeg)
- π Volume control with mute support
- βΊοΈ Record streams to AAC files
- π Auto-reconnect on stream failure
- πΎ Remembers last station and settings
- π Cross-platform (Windows/Linux/macOS)
π» Radiko π 80%
β εΌη εθ [ζ±δΊ¬] η₯ε₯ε· ζ°ζ½ βΆ [13/47]
ββββββββββββββββββββββββββββββββββββββββββββββ
TBSγ©γΈγͺ TBS
βΆ ζεζΎι QRR
γγγγ³ζΎι LFR
γ©γΈγͺNIKKEI第1 RN1
γ©γΈγͺNIKKEI第2 RN2
β γγγ«θ‘¨η€Ί
ββββββββββββββββββββββββββββββββββββββββββββββ
βΆ ζεζΎι QRR βͺ ε€§η«ΉγΎγγ¨γ΄γΌγ«γγ³γ©γΈγͺ βΊ ι²ι³δΈ 02:15
ββ ιΈζ Enter εη ββ ε°εεζΏ +- ι³ι m γγ₯γΌγ s εζ’ r εζ₯ηΆ Esc η΅δΊ
Download from Releases.
git clone https://github.com/kanoshiou/radiko-tui.git
cd radiko-tui
go mod tidy
go build -o radikoFor headless Linux servers without audio support:
go build -tags noaudio -o radiko-serverThis build excludes audio playback dependencies (oto) and only supports server mode (-server flag).
You can specify a default server URL at build time, so clients don't need to provide -server-url every time:
go build -ldflags "-X main.defaultServerURL=http://your-server-ip:8080" -o radiko-tuiNote: If --server-url is provided at runtime, it takes precedence over the built-in default.
Pull from GitHub Container Registry:
docker pull ghcr.io/kanoshiou/radiko-tui:latestRun with Docker:
docker run -d --name radiko -p 8080:8080 ghcr.io/kanoshiou/radiko-tui:latestCustom port and grace period:
docker run -d --name radiko -p 9000:9000 ghcr.io/kanoshiou/radiko-tui:latest \
-server -port 9000 -grace 60Docker Compose:
version: '3.8'
services:
radiko:
image: ghcr.io/kanoshiou/radiko-tui:latest
ports:
- "8080:8080"
environment:
- TZ=Asia/Tokyo
restart: unless-stoppedffmpeg is required for audio decoding and recording.
# Windows (Chocolatey)
choco install ffmpeg
# Linux (Ubuntu/Debian)
sudo apt install ffmpeg
# macOS (Homebrew)
brew install ffmpeg./radiko-tuiConnect to a running radiko-tui server:
./radiko-tui -server-url http://192.168.1.100:8080In this mode, audio decoding is handled internally. No local ffmpeg installation is required on the client. All TUI features (volume, region switching) are supported.
Run as an HTTP streaming server:
./radiko-tui -server -port 8080Then stream in VLC or any audio player:
vlc http://localhost:8080/api/play/QRR- Multi-client support: Multiple clients can listen to the same station, sharing one ffmpeg instance
- Smart ffmpeg reuse: When a client disconnects, ffmpeg keeps running for a grace period (default 10 seconds)
- Automatic reconnection: If a client reconnects within the grace period, the existing stream is reused instantly
| Option | Default | Description |
|---|---|---|
-port |
8080 | HTTP server port |
-grace |
10 | Seconds to keep ffmpeg alive after last client disconnects |
Example with custom grace period:
./radiko-tui -server -port 8080 -grace 30| Endpoint | Description |
|---|---|
GET /api/play/{stationID} |
Stream audio (AAC) for VLC/Browser |
GET /api/play/{stationID}/pcm |
Stream audio (PCM) for radiko-tui client |
GET /api/status |
Get JSON status of active streams |
| Key | Action |
|---|---|
| β/β or k/j | Navigate stations |
| β/β or h/l | Switch regions |
| Enter/Space | Play station |
| +/- | Volume up/down |
| 0-9 | Set volume level |
| m | Toggle mute |
| s | Start/Stop recording |
| r | Reconnect |
| Esc | Exit |
Press s to start/stop recording the current stream. Recordings are saved to your Downloads folder as AAC files with the format: radiko_StationName_YYYYMMDD_HHMMSS.aac
When recording a different station than currently playing, the station name will be shown in brackets: βΊ ι²ι³δΈ[StationName] MM:SS
Special thanks to rajiko for inspiration and reference.
- ffmpeg (runtime)
- Go 1.18+ (build only)
- Terminal with UTF-8 support
Issues and Pull Requests are welcome!
MIT License - See LICENSE
Note: This project is for learning and personal use. Please comply with Radiko's terms of service.