streamlink
TLDR
Open stream in default player
SYNOPSIS
streamlink [--player player] [-o file] [options] URL [quality]
DESCRIPTION
streamlink extracts streams from websites and pipes them to media players. It bypasses browser-based players, enabling use of lightweight, efficient players like mpv or VLC.
Quality selection uses identifiers like best, worst, or specific resolutions (720p, 1080p60). Listing qualities shows available options for a stream. Fallback selection (720p,480p,best) tries multiple qualities.
Recording saves streams to files. Combined with a player, streams can be both watched and archived. Output format depends on stream type (usually TS or MP4).
Platform support includes Twitch, YouTube, and hundreds of other sites. Plugin architecture enables community-contributed support for additional platforms.
Twitch-specific features include ad skipping, low-latency mode, and OAuth authentication for subscriber streams. Configuration can be saved in ~/.config/streamlink/config.
HTTP options enable accessing streams behind authentication or with custom headers, handling various DRM and geo-restriction scenarios.
PARAMETERS
-p PLAYER, --player PLAYER
Player to use.-a ARGS, --player-args ARGS
Arguments for player.-o FILE, --output FILE
Record to file.-r FILE, --record FILE
Record while also playing.-f, --force
Overwrite output file.--default-stream QUALITY
Default stream quality.--stream-url
Print stream URL only.--json
Output as JSON.--retry-streams SEC
Retry if stream offline.--retry-max NUM
Maximum retry attempts.--retry-open NUM
Retry opening stream.--hls-live-edge SEG
Segments from live edge.--twitch-disable-ads
Disable Twitch ads.--twitch-low-latency
Enable low latency mode.--http-header HEADER
Add HTTP header.--http-cookie COOKIE
Add HTTP cookie.
CAVEATS
Site support depends on plugins and may break with site changes. Some sites block third-party access. DRM content usually not supported. Quality options vary by platform. Ad blocking may violate ToS.
HISTORY
streamlink is a fork of livestreamer, which was created around 2012. After livestreamer's development stalled, streamlink forked in 2016 with active maintenance. The project supports an extensive list of streaming sites and continues community-driven development.
SEE ALSO
youtube-dl(1), yt-dlp(1), mpv(1), vlc(1)


