qast / docs
Site Docs Home

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:

SourceExampleDescription
URLhttps://youtube.com/watch?v=...@3mYouTube, Vimeo, Twitch, 1000+ sites
Filevideo.mp4MP4, MKV, AVI, WebM, FLV, WMV, OGG
Screenscreen@5mFull desktop capture
Windowwindow:Grafana@5mSingle window by title
Webcamwebcam@30Camera feed
Browserbrowser:http://localhost:3000@30Headless Chromium render
RTSPrtsp://192.168.1.100/streamIP 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

FlagDescription
-d, --deviceTarget device (name, index, or protocol)
--playlist FILELoad sources from playlist file
--repeatLoop the queue indefinitely
--shuffleRandomize queue order
--preroll NSeconds of placeholder before content (helps DLNA start)
--aspect W:HForce aspect ratio correction
--cookies-from-browser chromeExtract browser cookies for YouTube
--youtube-defaultUse muxed streams (lower quality, lower latency)
--save FILESave stream to file while casting
--no-cursorHide cursor in screen capture
--show-allShow all protocol variants in device list
--scanDiscover and list devices, then exit
-v, --verboseEnable debug logging

Interactive controls

While casting, the console accepts keyboard input:

KeyAction
sSkip to next queue item
qQuit
SpaceShow 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

Created by Rich LeGrand · MIT License