grod
grod (Google Fishing Rod) — cast YouTube and Piped videos to any Chromecast device from the command line.
Features
- Cast by YouTube URL, Piped URL, or video ID
- Queue management with auto-advance
- Background daemon watches device and plays next in queue
- Interactive TUI with live now-playing status and playback controls
- Full playback controls: play/pause, seek, volume, mute
- Local HLS muxing for 1080p casting (uses your video + audio streams via Piped, muxes locally with ffmpeg)
- HTTP API on the LAN with optional PIN auth — for mobile remotes or other clients
- mDNS service discovery — LAN clients auto-find the daemon (no manual IP entry)
- Resolves streams via a self-hosted Piped API instance
Dependencies
- go-chromecast — must be in
$PATH - A self-hosted Piped instance (API backend)
ffmpeg— only required if you use the daemon's HLS muxer for 1080p casting (one-shot CLI casts without the daemon don't need it)
Installation
cargo (recommended)
Binary (Linux / macOS)
|
Installs to ~/.local/bin/grod. Set INSTALL_DIR to override:
INSTALL_DIR=/usr/local/bin |
From source
Setup
Discover devices on your network and select one:
Set your Piped API URL:
Verify:
Usage
Configuration commands
Cast a video
If the device is busy, the video is queued automatically. Use -q to always queue:
Alias: c
Queue management
Playback controls
Background daemon
The daemon polls the device every 10 seconds and automatically casts the next queued video when the device goes idle. It also runs the HTTP API (port 7878 by default) and the local muxing stream server (port 7879 by default) used for high-quality casting.
systemd user service
To have the daemon start automatically on login and restart on failure, install the user-mode service:
# 1. Copy the unit into your user systemd directory
# 2. Enable + start it (no sudo needed — runs as your user)
# 3. Optional: keep running across logout (otherwise it stops with your session)
Useful follow-up commands:
The unit looks for grod on $PATH first, then ~/.local/bin/grod. If you installed it elsewhere, override with systemctl --user edit grod.service and set a custom ExecStart=.
HTTP API + remote control
While the daemon is running it exposes an HTTP API for LAN clients (e.g. a phone remote). All control endpoints (/cast, /skip, /play-pause, /volume-up, /queue, ...) are POST, plus GET /status and GET /search?q=.... With a PIN configured, requests must include the X-Grod-Pin: <pin> header. The daemon also advertises itself on the LAN via mDNS as _grod._tcp.local. so clients can auto-discover it.
Firewall
The daemon needs 7878/tcp (API) and 7879/tcp (stream server) open for LAN traffic. If LAN clients can't reach the daemon, run:
It prints LAN-scoped allow commands for ufw, firewalld, nftables, and iptables based on the firewall tools it finds on $PATH. Pick the one matching your setup and run it as root. Examples are scoped to your detected LAN subnet (so the ports aren't exposed to the WAN); a broader fallback is shown as a comment in case you need it.
TUI
Interactive queue manager with live now-playing status:
| Key | Action |
|---|---|
space |
Play / pause |
s |
Skip current |
d / Del |
Remove selected from queue |
→ / l |
Seek forward 10s |
← / h |
Seek backward 10s |
+ / - |
Volume up / down |
m |
Toggle mute |
j / k |
Navigate queue |
q / Esc |
Quit |
Errors are shown as a dismissible popup overlay with full trace information. Press any key to close.
Configuration
Config is stored at ~/.local/share/grod/config.toml:
= "https://your-piped-instance.example.com"
= "192.168.1.100" # your Chromecast's LAN address — yours will differ
= 8009
= 7878 # HTTP API port (used by mobile remotes)
= 7879 # local muxing stream server port (Chromecast pulls from here)
= "" # optional PIN; empty disables auth
= "1080p" # best | 1080p | 720p | 480p | 360p
The example addresses (192.168.1.100, <your-laptop-lan-ip>, etc.) are placeholders. Use your own LAN addresses; grod config discover and grod firewall print real values for your network.
License
MIT