Command-Line Interface¶
Table of Contents
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
--urloption.
- STREAM¶
Stream to play.
Use
bestorworstfor 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-streamis not used, then a list of available streams will be printed.
General options¶
- --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_USores_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,allDefault is: "info".
- --logformat FORMAT¶
Set a custom logging format.
See the Python standard library's
logging.Formatterdocs for more information about the logging format and the availableLogRecordattributes. Streamlink's formatter uses the curly brace style.The default format depends on the chosen log level.
For verbose levels (
traceandall):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'sasctimeattribute viastrftime().The default date format depends on the chosen log level.
For verbose levels (
traceandall):Default is: "%H:%M:%S.%f".
Otherwise:
Default is: "%H:%M:%S".
- --logfile FILE¶
Append log output to
FILEinstead 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/streamlinkLinux/BSD:
${XDG_STATE_HOME:-${HOME}/.local/state}/streamlink/logs
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
--jsonwhen reading matcher data programmatically.
- --can-handle-url URL¶
Check if Streamlink has a plugin that can handle the specified URL.
Status code is
0on success,1on 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.
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
PATHenvironment variable.In addition to setting the player executable path, custom player arguments can be set via
--player-args.Note
In the past,
--playerallowed defining additional player arguments, which as a consequence required wrapping player paths that contained spaces in quotation marks. This is unsupported since release6.0.0.Default is: VLC player, if available.
- -a ARGUMENTS¶
- --player-args ARGUMENTS¶
Set a string of custom
--playerlaunch 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
--playerwill 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
--playerwas found. See--titlefor 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
--playerprocess, 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