Skip to content

Latest commit

 

History

History
104 lines (75 loc) · 3.47 KB

File metadata and controls

104 lines (75 loc) · 3.47 KB

CLI Usage

Commands

list

List currently reachable Chromecasts.

go run ./cmd/gaspode list
go run ./cmd/gaspode list --to-json
go run ./cmd/gaspode list --timeout 10s --debug-discovery --to-json

Notes:

  • list always exits with code 0
  • --to-json prints [] when no devices are found
  • --timeout uses Go duration syntax such as 5s, 1500ms, or 1m

audio-devices

List audio capture devices that can be used for screen streaming.

go run ./cmd/gaspode audio-devices
go run ./cmd/gaspode audio-devices --to-json

send

Send a media URL or local file to a Chromecast.

go run ./cmd/gaspode send --device-name "Living Room TV" --media-url "https://samplelib.com/mp4/sample-5s.mp4"
go run ./cmd/gaspode send --device-name "Living Room TV" --media-url "F:\media\movie.mkv"
go run ./cmd/gaspode send --device-name "Living Room TV" --media-url "F:\media\movie.mkv" --compatibility
go run ./cmd/gaspode send --device-name "Living Room TV" --media-url "F:\media\movie.mkv" --compatibility --create-index

Important flags:

  • --device-name selects an exact Chromecast by name
  • --media-url accepts remote URLs and local file paths
  • --media-type overrides the detected MIME type
  • --detach exits immediately after playback starts when possible
  • --compatibility transcodes a local file on the fly into a safer Chromecast-friendly MP4 stream
  • --create-index first creates a temporary seekable MP4 for a local file and requires --compatibility

screen

Capture the desktop and stream it live to a Chromecast.

go run ./cmd/gaspode screen --device-name "Living Room TV"
go run ./cmd/gaspode screen --device-name "Living Room TV" --audio-device "Stereo Mix (Realtek(R) Audio)"
go run ./cmd/gaspode screen --device-name "Living Room TV" --latency-profile low

Important flags:

  • --audio-device adds local audio capture
  • --detach exits after the stream starts
  • --latency-profile selects ultra, low, balanced, or stable

Global Flags

--timeout
--iface
--debug-discovery
--log-level
--web-ui

Meaning:

  • --timeout sets the discovery and action timeout
  • --iface forces Chromecast discovery onto one network interface
  • --debug-discovery prints extra discovery diagnostics to stderr
  • --log-level controls structured logs with error, info, or debug
  • --web-ui starts the embedded browser UI on the given listen address
  • --media-base-path defines the only directory tree the web UI file browser may access and is required when --web-ui is used

Web UI note:

  • the embedded UI can also browse UPnP or DLNA media servers on the network and relay selected videos to Chromecast
  • --media-base-path does not restrict UPnP browsing because those files are not host-local

Discovery Notes

  • mDNS discovery is attempted first
  • if mDNS returns nothing, gaspode falls back to scanning eligible private IPv4 subnets
  • the fallback probes port 8009 and uses Chromecast device info to build the final device list

Platform Notes

  • Screen capture supports Windows, Linux, and macOS
  • Window capture works on Windows and macOS
  • Linux can enumerate windows in the UI, but window streaming is not implemented yet
  • macOS full-screen capture uses FFmpeg avfoundation
  • macOS window capture uses native window geometry plus FFmpeg screen cropping
  • macOS audio capture is not implemented
  • macOS screen capture may require granting Screen Recording permission to the terminal app or binary