CLI Reference
qast accepts URLs, local files, capture sources, and playlists as positional arguments.
Basic usage
qast <source> [source ...] [options]
Source syntax
Each source can include an optional duration suffix:
| Source | Example | Description |
|---|---|---|
| URL | https://youtube.com/watch?v=...@3m | YouTube, Vimeo, Twitch, 1000+ sites |
| File | video.mp4 | MP4, MKV, AVI, WebM, FLV, WMV, OGG |
| Screen | screen@5m | Full desktop capture |
| Window | window:Grafana@5m | Single window by title |
| Webcam | webcam@30 | Camera feed |
| Browser | browser:http://localhost:3000@30 | Headless Chromium render |
| RTSP | rtsp://192.168.1.100/stream | IP camera / security camera |
| Pipe | - | Read from stdin |
Duration suffixes: @30 (seconds), @5m (minutes), @1h (hours).
Common commands
# Cast YouTube to first available TV
qast "https://youtube.com/watch?v=dQw4w9WgXcQ"
# Target a specific TV by name
qast video.mp4 -d "Samsung 65\""
# Target by protocol
qast video.mp4 -d roku
# Desktop capture for 5 minutes
qast screen@5m
# Window capture
qast window:Grafana@5m
# Playlist with repeat
qast --playlist morning.txt --repeat
# Multiple sources as inline queue
qast video1.mp4 video2.mp4 screen@1m
# Shuffle queue
qast --playlist videos.txt --shuffle
# Save stream to file while casting
qast "https://..." --save output.ts
Device selection
# List all devices
qast --scan
# By name (partial match)
qast video.mp4 -d "Living Room"
# By index (from --scan output)
qast video.mp4 -d 0
# By protocol
qast video.mp4 -d chromecast
qast video.mp4 -d dlna
qast video.mp4 -d roku
# Show all protocol variants
qast --scan --show-all
Flags
| Flag | Description |
|---|---|
-d, --device | Target device (name, index, or protocol) |
--playlist FILE | Load sources from playlist file |
--repeat | Loop the queue indefinitely |
--shuffle | Randomize queue order |
--preroll N | Seconds of placeholder before content (helps DLNA start) |
--aspect W:H | Force aspect ratio correction |
--cookies-from-browser chrome | Extract browser cookies for YouTube |
--youtube-default | Use muxed streams (lower quality, lower latency) |
--save FILE | Save stream to file while casting |
--no-cursor | Hide cursor in screen capture |
--show-all | Show all protocol variants in device list |
--scan | Discover and list devices, then exit |
-v, --verbose | Enable debug logging |
Interactive controls
While casting, the console accepts keyboard input:
| Key | Action |
|---|---|
s | Skip to next queue item |
q | Quit |
Space | Show status |
Playlist file format
# morning.txt — one source per line
# Lines starting with # are comments
# Blank lines are ignored
https://youtube.com/watch?v=VIDEO1
https://youtube.com/watch?v=VIDEO2@3m
~/Videos/workout.mp4
screen@30
window:Grafana@5m
YouTube notes
- By default, qast uses DASH streams (separate video + audio) for higher quality.
- If YouTube blocks extraction, pass
--cookies-from-browser chrome. - Use
--youtube-defaultfor lower-latency muxed streams. - yt-dlp supports 1,000+ sites beyond YouTube.
Created by Rich LeGrand · MIT License