Command-Line Interface

Command-line usage

$ streamlink [OPTIONS] <URL> [STREAM]

Positional arguments

URL

A URL to attempt to extract streams from.

Usually, the protocol of http(s) URLs can be omitted (https://), depending on the implementation of the plugin being used.

Alternatively, the URL can also be specified by using the --url option.

STREAM

Stream to play.

Use best or worst for selecting the highest or lowest available quality.

Fallback streams can be specified by using a comma-separated list:

"720p,480p,best"

If no stream is specified and --default-stream is not used, then a list of available streams will be printed.

General options

-h
--help

Show this help message and exit.

-V
--version

Show version string and exit.

--version-check

Run a version check and exit.

--auto-version-check {yes,true,1,on,no,false,0,off}

Enable or disable the automatic check for a new version of Streamlink.

Default is: "no".

--config FILENAME

Load options from this config file.

Can be repeated to load multiple files, in which case the options are merged on top of each other where the last config has highest priority.

--no-config

Disable loading any default or custom config files.

--locale LOCALE

Override the system's locale setting, for selecting the preferred subtitle and audio language.

The locale is formatted as [language_code]_[country_code], e.g. en_US or es_ES.

Default is: system locale.

Logging arguments

-l LEVEL
--loglevel LEVEL

Set the log message threshold.

Valid levels are, in order of increasing verbosity:

none, critical, error, warning, info, debug, trace, all

Default is: "info".

--logformat FORMAT

Set a custom logging format.

See the Python standard library's logging.Formatter docs for more information about the logging format and the available LogRecord attributes. Streamlink's formatter uses the curly brace style.

The default format depends on the chosen log level.

For verbose levels (trace and all):

Default is: "[{asctime}][{threadName}][{name}][{levelname}] {message}".

Otherwise:

Default is: "[{name}][{levelname}] {message}".

--logdateformat DATEFORMAT

Set a custom logging date format.

This formats the LogRecord's asctime attribute via strftime().

The default date format depends on the chosen log level.

For verbose levels (trace and all):

Default is: "%H:%M:%S.%f".

Otherwise:

Default is: "%H:%M:%S".

--logfile FILE

Append log output to FILE instead of writing to stdout/stderr.

User prompts and download progress won't be written to FILE.

A value of - (dash) will set the file name to an ISO8601-like string and will choose the following default log directories.

Windows:

%TEMP%\streamlink\logs

macOS:

${HOME}/Library/Logs/streamlink

Linux/BSD:

${XDG_STATE_HOME:-${HOME}/.local/state}/streamlink/logs
-Q
--quiet

Suppress all console and log output, and also disable user prompts.

-j
--json

Output JSON representations instead of the normal text output.

Useful for external scripting.

Plugin options

--plugins

Print a list of all currently installed plugins.

--show-matchers PLUGIN

Show the list of matchers of a specific plugin (URL regex pattern with opt. priority and opt. name).

The output is a human-readable pseudo YAML format. Please use --json when reading matcher data programmatically.

--can-handle-url URL

Check if Streamlink has a plugin that can handle the specified URL.

Status code is 0 on success, 1 on failure.

Useful for external scripting.

--can-handle-url-no-redirect URL

Same as --can-handle-url, but without following redirects when looking up the URL.

--no-plugin-cache

Disable I/O of the plugin key-value store.

If disabled, plugins won't be able to load or store data like cookies, authentication data, etc. The data which is loaded or stored depends on each plugin implementation.

--no-plugin-sideloading

Disable automatic sideloading of third-party plugins from the default location.

See the plugin-sideloading documentation for where third-party plugins are loaded from.

--plugin-dir DIRECTORY

Load additional plugins from this directory.

Can be set multiple times to load plugins from multiple directories.

--plugin-dirs DIRECTORY

Load additional plugins from a list of comma-separated directories. (deprecated)

Network arguments

--interface INTERFACE

Set the network interface.

-4
--ipv4

Resolve address names to IPv4 only. This option overrides --ipv6.

-6
--ipv6

Resolve address names to IPv6 only. This option overrides --ipv4.

Player options

-p PATH
--player PATH

Set the player executable that will be launched (unless a different output method was chosen).

Either set an absolute or relative path to the player executable, or just set the executable's name if it can be resolved from the paths of the system's PATH environment variable.

In addition to setting the player executable path, custom player arguments can be set via --player-args.

Note

In the past, --player allowed defining additional player arguments, which as a consequence required wrapping player paths that contained spaces in quotation marks. This is unsupported since release 6.0.0.

Default is: VLC player, if available.

-a ARGUMENTS
--player-args ARGUMENTS

Set a string of custom --player launch arguments that will be parsed and tokenized.

The value can contain formatting variables surrounded by curly braces, { and }. Curly brace characters can be escaped by doubling, e.g. {{ and }}.

Available formatting variables:

{playerinput}

This is the input argument that the --player will receive. For standard input (stdin), it is - (dash), but it can also be a file path or URL, depending on the options used. If unset, then the player input argument will be appended to the parsed player arguments list.

{playertitleargs}

The automatically generated player title arguments, if a supported --player was found. See --title for more. If unset, automatically generated player title arguments will be prepended to the parsed player arguments list.

Example:

streamlink -p vlc -a "--play-and-exit --no-one-instance" <url> [stream]

Default is: "".

--player-env KEY=VALUE

Add an additional environment variable to the spawned --player process, in addition to the ones inherited from the Streamlink/Python parent process. This allows setting player environment variables in config files.

Can be repeated to add multiple environment variables.

-v
--player-verbose

Write the --player's stdout/stderr output to Streamlink's stdout/stderr output.

--verbose-player

Deprecated in favor of