STREAMLINK(1) | Streamlink | STREAMLINK(1) |
streamlink - extracts streams from various services and pipes them into a video player of choice
streamlink [OPTIONS] <URL> [STREAM]
streamlink --loglevel debug youtu.be/VIDEO-ID best streamlink --player mpv --player-args '--no-border --no-keepaspect-window' twitch.tv/CHANNEL 1080p60 streamlink --player-external-http --player-external-http-port 8888 URL STREAM streamlink --output /path/to/file --http-timeout 60 URL STREAM streamlink --stdout URL STREAM | ffmpeg -i pipe:0 ... streamlink --http-header 'Authorization=OAuth TOKEN' --http-header 'Referer=URL' URL STREAM streamlink --hls-live-edge 5 --stream-segment-threads 5 'hls://https://host/playlist.m3u8' best streamlink --twitch-low-latency -p mpv -a '--cache=yes --demuxer-max-back-bytes=2G' twitch.tv/CHANNEL best
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.
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.
Multiple directories can be used by separating them with a comma.
Returns status code 1 for false and 0 for true.
Useful for external scripting.
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.
Valid levels are: none, error, warning, info, debug, trace, all
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
Default is: "no".
The locale is formatted as [language_code]_[country_code], eg. en_US or es_ES.
Default is: system locale.
This is a shell-like syntax to support using a specific player:
streamlink --player=vlc <url> [stream]
Absolute or relative paths can also be passed via this option in the event the player's executable can not be resolved:
streamlink --player=/path/to/vlc <url> [stream] streamlink --player=./vlc-player/vlc <url> [stream]
To use a player that is located in a path with spaces you must quote the parameter or its value:
streamlink "--player=/path/with spaces/vlc" <url> [stream] streamlink --player "C:\path\with spaces\mpc-hc64.exe" <url> [stream]
Options may also be passed to the player. For example:
streamlink --player "vlc --file-caching=5000" <url> [stream]
As an alternative to this, see the --player-args parameter, which does not log any custom player arguments.
It's usually enough to only use --player instead of this unless you need to add arguments after the player's input argument or if you don't want any of the player arguments to be logged.
The value can contain formatting variables surrounded by curly braces, { and }. If you need to include a brace character, it can be escaped by doubling, e.g. {{ and }}.
Formatting variables available:
Example:
streamlink -p vlc -a "--play-and-exit {playerinput}" <url> [stream]
NOTE:
This makes it possible to handle stream disconnects if your player is capable of reconnecting to a HTTP stream. This is usually done by setting your player to a "repeat mode".
The default behavior is similar to the --player-continuous-http option, but no player program will be started, and the server will listen on all available connections instead of just in the local (loopback) interface.
Optionally, the --player-external-http-continuous option allows for disabling the continuous run-mode, so that Streamlink will stop when the stream ends.
The URLs that can be used to access the stream will be printed to the console, and the server can be interrupted using CTRL-C.
In the continuous run-mode, Streamlink will keep running after the stream has ended and will wait for the next HTTP request being made unless it gets shut down via CTRL-C.
If set to non-continuous, Streamlink will stop once the stream has ended.
Default is: true.
Stream types that can be converted into a playable URL are:
Make sure your player can handle the stream type when using this.
It does however have the side-effect of sometimes closing a player before it has played back all of its cached data.
This option will instead let the player decide when to exit.
Please see the "Metadata variables" section of Streamlink's CLI documentation for all available metadata variables.
This option is only supported for the following players: mpv, potplayer, vlc
These variables are accessible in the --title option by adding a backslash in front of the dollar sign which VLC uses as its formatting character.
For example, to put the current date in your VLC window title, the string \$A could be inserted inside the --title string.
Example:
streamlink -p mpv --title "{author} - {category} - {title}" <URL> [STREAM]
Non-existent directories and subdirectories will be created if they do not exist, if filesystem permissions allow.
You will be prompted if the file already exists.
Please see the "Metadata variables" section of Streamlink's CLI documentation for all available metadata variables.
Unsupported characters in substituted variables will be replaced with an underscore.
Example:
streamlink --output "~/recordings/{author}/{category}/{id}-{time:%Y%m%d%H%M%S}.ts" <URL> [STREAM]
Non-existent directories and subdirectories will be created if they do not exist, if filesystem permissions allow.
You will be prompted if the file already exists.
Please see the "Metadata variables" section of Streamlink's CLI documentation for all available metadata variables.
Unsupported characters in substituted variables will be replaced with an underscore.
Example:
streamlink --record "~/recordings/{author}/{category}/{id}-{time:%Y%m%d%H%M%S}.ts" <URL> [STREAM]
Non-existent directories and subdirectories will be created if they do not exist, if filesystem permissions allow.
You will be prompted if the file already exists.
Please see the "Metadata variables" section of Streamlink's CLI documentation for all available metadata variables.
Unsupported characters in substituted variables will be replaced with an underscore.
Example:
streamlink --record-and-pipe "~/recordings/{author}/{category}/{id}-{time:%Y%m%d%H%M%S}.ts" <URL> [STREAM]
Intended for use when Streamlink is running on a UNIX-like OS but writing to Windows filesystems such as NTFS; USB devices using VFAT or exFAT; CIFS shares that are enforcing Windows filename limitations, etc.
These characters are replaced with an underscore for the rules in use:
Usually, the protocol of http(s) URLs can be omitted (https://), depending on the implementation of the plugin being used.
This is an alternative to setting the URL using a positional argument and can be useful if set in a config file.
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"
This is an alternative to setting the stream using a positional argument and can be useful if set in a config file.
The number of fetch retry attempts can be capped with --retry-max.
If --retry-max is set without setting --retry-streams, the delay between retries will default to 1 second.
Default is: 1.
The order will be used to separate streams when there are multiple streams with the same name but different stream types. Any stream type not listed will be omitted from the available streams list. An * (asterisk) can be used as a wildcard to match any other type of stream, eg. muxed-stream.
Default is: "hls,http,*".
If all of the available streams get excluded, best and worst will become inaccessible and new special stream synonyms best-unfiltered and worst-unfiltered can be used as a fallback selection method.
Uses a filter expression in the format:
[operator]<value>
Valid operators are >, >=, < and <=. If no operator is specified then equality is tested.
For example this will exclude streams ranked higher than "480p":
--stream-sorting-excludes ">480p"
Multiple filters can be used by separating each expression with a comma.
For example this will exclude streams from two quality types:
--stream-sorting-excludes ">480p,>medium"
The ringbuffer is used as a temporary storage between the stream and the player. This allows Streamlink to download the stream faster than the player which reads the data from the ringbuffer.
The smaller the size of the ringbuffer, the higher the chance of the player buffering if the download speed decreases, and the higher the size, the more data can be use as a storage to recover from volatile download speeds.
Most players have their own additional cache and will read the ringbuffer's content as soon as data is available. If the player stops reading data while playback is paused, Streamlink will continue to download the stream in the background as long as the ringbuffer doesn't get full.
Default is: "16M".
NOTE:
This applies to all different kinds of segmented stream types, such as DASH, HLS, etc.
Default is: 3.
This applies to all different kinds of segmented stream types, such as DASH, HLS, etc.
Default is: 1.
This applies to all different kinds of segmented stream types, such as DASH, HLS, etc.
Default is: 10.0.
This applies to all different kinds of stream types, such as DASH, HLS, HTTP, etc.
Default is: 60.0.
Needs to be supported by the used plugin.
Supported plugins: funimationnow, rtve, svtplay, vimeo
Lower values will decrease the latency, but will also increase the chance of buffering, as there is less time for Streamlink to download segments and write their data to the output buffer. The number of parallel segment downloads can be set with --stream-segment-threads and the HLS playlist reload time to fetch and queue new segments can be overridden with --hls-playlist-reload-time.
Default is: 3.
NOTE:
Default is: 3.
Default is: default.
Example: --hls-segment-ignore-names 000,001,002
This will ignore every segment that ends with 000.ts, 001.ts and 002.ts
Default is: None.
The value can be templated using the following variables, which will be replaced with their respective part from the source segment URI:
{url} {scheme} {netloc} {path} {query}
Examples:
--hls-segment-key-uri "https://example.com/hls/encryption_key" --hls-segment-key-uri "{scheme}://1.2.3.4{path}{query}" --hls-segment-key-uri "{scheme}://{netloc}/custom/path/to/key"
Default is: None.
Examples:
--hls-audio-select "English,German" --hls-audio-select "en,de" --hls-audio-select "*"
NOTE:
Default is: 00:00:00.
Default is: unlimited.
Example: --ffmpeg-ffmpeg "/usr/local/bin/ffmpeg"
Default is: "matroska".
Example: --ffmpeg-fout "mpegts"
Default is: "copy".
Example: --ffmpeg-video-transcode "h264"
Default is: "copy".
Example: --ffmpeg-audio-transcode "aac"
Example: --http-proxy "http://hostname:port/"
Can be repeated to add multiple cookies.
Can be repeated to add multiple headers.
Can be repeated to add multiple query parameters.
Usually a bad idea, only use this if you know what you're doing.
Usually a bad idea, only use this if you know what you're doing.
Expects a .pem file.
Expects a .crt and a .key file.
Default is: 20.0.
If left blank you will be prompted.
NOTE:
Default is: "english".
Can be used as an alternative to providing a password.
Default is: 00:00:00.
Default is: 1.
In order to achieve true low latency streaming during playback, the player's caching/buffering settings will need to be adjusted and reduced to a value as low as possible, but still high enough to not cause any buffering. This depends on the stream's bitrate and the quality of the connection to Twitch's servers. Please refer to the player's own documentation for the required configuration. Player parameters can be set via --player-args.
NOTE:
Can be repeated to add multiple headers.
Useful for adding authentication data that can prevent ads. See the plugin-specific documentation for more information.
Can be repeated to add multiple parameters.
The following types are allowed: dash,hls7
Default is: "dash".
Please open a new issue on Streamlink's issue tracker on GitHub and use the appropriate issue forms:
https://github.com/streamlink/streamlink/issues
For more detailed information about config files, plugin sideloading, streaming protocols, proxy support, metadata, or plugin specific stuff, please see Streamlink's online CLI documentation here:
https://streamlink.github.io/cli.html
The list of available plugins and their descriptions can be found here:
https://streamlink.github.io/plugins.html
Streamlink Contributors
2023, Streamlink
January 23, 2023 | 5.2.1 |