← 返回命令列表

Linux command

streamlink 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Open stream in default player

streamlink [URL] [best]

Open stream in specific player

streamlink --player [mpv] [URL] [best]

List available qualities

streamlink [URL]

Record stream to file

streamlink -o [output.ts] [URL] [best]

Open with specific quality

streamlink [URL] [720p]

Open Twitch stream

streamlink [twitch.tv/streamername] [best]

Pass player arguments

streamlink --player [mpv] --player-args "[--no-border]" [URL] [best]

说明

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.

参数

-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.

FAQ

What is the streamlink command used for?

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.

How do I run a basic streamlink example?

Run `streamlink [URL] [best]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -p _PLAYER_, --player _PLAYER_ do in streamlink?

Player to use.