Scroll to navigation

STREAMLINK(1) Streamlink STREAMLINK(1)

NAME

streamlink - extracts streams from various services and pipes them into a video player of choice

SYNOPSIS

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 --hls-segment-threads 5 'hls://https://host/playlist.m3u8' best
streamlink --twitch-low-latency -p mpv -a '--cache=yes --demuxer-max-bytes=750k' twitch.tv/CHANNEL best


POSITIONAL ARGUMENTS

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

Show this help message and exit.

Show version number and exit.

Print a list of all currently installed plugins.

Attempts to load plugins from these directories.

Multiple directories can be used by separating them with a comma.


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

Returns status code 1 for false and 0 for true.

Useful for external scripting.


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

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.


Set the log message threshold.

Valid levels are: none, error, warning, info, debug, trace


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



Hide all log output.

Alias for "--loglevel none".


Output JSON representations instead of the normal text output.

Useful for external scripting.


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

Default is: "no".


--version-check
Runs a version check and exits.

The preferred locale setting, for selecting the preferred subtitle and audio language.

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

Default is: system locale.


Set the network interface.

-4
Resolve address names to IPv4 only. This option overrides -6.

-6
Resolve address names to IPv6 only. This option overrides -4.

PLAYER OPTIONS

Player to feed stream data to. By default, VLC will be used if it can be found in its default location.

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.


This option allows you to customize the default arguments which are put together with the value of --player to create a command to execute.

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:

{playerinput}
This is the input that the player will use. For standard input (stdin), it is -, but it can also be a URL, depending on the options used.
{filename}
The old fallback variable name with the same functionality.

Example:

streamlink -p vlc -a "--play-and-exit {playerinput}" <url> [stream]


NOTE:

When neither of the variables are found, {playerinput} will be appended to the whole parameter value, to ensure that the player always receives an input argument.



Allow the player to display its console output.

Make the player read the stream through a named pipe instead of the stdin pipe.

Make the player read the stream through HTTP instead of the stdin pipe.

Make the player read the stream through HTTP, but unlike --player-http it will continuously try to open the stream if the player requests it.

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


Serve stream data through HTTP without running any player. This is useful to allow external devices like smartphones or streaming boxes to watch streams they wouldn't be able to otherwise.

Behavior will be similar to the 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.

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.


A fixed port to use for the external HTTP server if that mode is enabled. Omit or set to 0 to use a random high ( >1024) port.

A comma-delimited list of stream types to pass to the player as a URL to let it handle the transport of the stream instead.

Stream types that can be converted into a playable URL are:

  • hls
  • http
  • rtmp

Make sure your player can handle the stream type when using this.


By default Streamlink will close the player when the stream ends. This is to avoid "dead" GUI players lingering after a stream ends.

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.


This option allows you to supply a title to be displayed in the title bar of the window that the video player is launched in.

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

This option is only supported for the following players: mpv, potplayer, vlc.

VLC has certain codes you can use inside your title. These are accessible inside --title by using a backslash before the dollar sign VLC uses to denote a format character.

e.g. to put the current date in your VLC window title, the string "$A" could be inserted inside your --title string.

A full list of the format codes VLC uses is available here: https://wiki.videolan.org/Documentation:Format_String/

mpv has certain codes you can use inside your title. These are accessible inside --title by using a backslash before the dollar sign mpv uses to denote a format character.

e.g. to put the current version of mpv running inside your mpv window title, the string "${{mpv-version}}" could be inserted inside your --title string.

A full list of the format codes mpv uses is available here: https://mpv.io/manual/stable/#property-list


Formatting variables available to use in --title:

{title}
If available, this is the title of the stream. Otherwise, it is the string "Unknown Title"
{author}
If available, this is the author of the stream. Otherwise, it is the string "Unknown Author"
{category}
If available, this is the category the stream has been placed into.
  • For Twitch, this is the game being played
  • For YouTube, it's the category e.g. Gaming, Sports, Music...

Otherwise, it is the string "No Category"

{game}
This is just a synonym for {category} which may make more sense for gaming oriented platforms. "Game being played" is a way to categorize the stream, so it doesn't need its own separate handling.
{url}
URL of the stream.

Examples:

streamlink -p vlc --title "{title} -!- {author} -!- {category} \$A" <url> [stream]
streamlink -p mpv --title "{title} -- {author} -- {category} -- (\${{mpv-version}})" <url> [stream]



FILE OUTPUT OPTIONS

Write stream data to FILENAME instead of playing it.

You will be prompted if the file already exists.


When using -o or -r, always write to file even if it already exists.

--force-progress
When using -o or -r, show the download progress bar even if there is no terminal.

Write stream data to stdout instead of playing it.

Open the stream in the player, while at the same time writing it to FILENAME.

You will be prompted if the file already exists.


Write stream data to stdout, while at the same time writing it to FILENAME.

You will be prompted if the file already exists.


STREAM OPTIONS

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.

This is an alternative to setting the URL using a positional argument and can be useful if set in a config file.


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"


This is an alternative to setting the stream using a positional argument and can be useful if set in a config file.


If possible, translate the resolved stream to a URL and print it.

Retry fetching the list of available streams until streams are found while waiting DELAY second(s) between each attempt. If unset, only one attempt will be made to fetch the list of streams available.

The number of fetch retry attempts can be capped with --retry-max.


When using --retry-streams, stop retrying the fetch after COUNT retry attempt(s). Fetch will retry infinitely if COUNT is zero or unset.

If --retry-max is set without setting --retry-streams, the delay between retries will default to 1 second.


After a successful fetch, try ATTEMPTS time(s) to open the stream until giving up.

Default is: 1.


A comma-delimited list of stream types to allow.

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. A * can be used as a wildcard to match any other type of stream, eg. muxed-stream.

Default is: "rtmp,hls,hds,http,akamaihd,*".


Fine tune the best and worst stream name synonyms by excluding unwanted streams.

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":

">480p"


Multiple filters can be used by separating each expression with a comma.

For example this will exclude streams from two quality types:

">480p,>medium"



STREAM TRANSPORT OPTIONS

The time live HDS streams will start from the edge of stream.

Default is: 10.0.


How many attempts should be done to download each HDS segment before giving up.

Default is: 3.


The size of the thread pool used to download HDS segments. Minimum value is 1 and maximum is 10.

Default is: 1.


HDS segment connect and read timeout.

Default is: 10.0.


Timeout for reading data from HDS streams.

Default is: 60.0.


How many segments from the end to start live HLS streams on.

The lower the value the lower latency from the source you will be, but also increases the chance of buffering.

Default is: 3.


Immediately write segment data into output buffer while downloading.

How many attempts should be done to download each HLS segment before giving up.

Default is: 3.


How many attempts should be done to reload the HLS playlist before giving up.

Default is: 3.


Set a custom HLS playlist reload time value, either in seconds or by using one of the following keywords:

segment: The duration of the last segment in the current playlist
live-edge: The sum of segment durations of the live edge value minus one
default: The playlist's target duration metadata


Default is: default.


The size of the thread pool used to download HLS segments. Minimum value is 1 and maximum is 10.

Default is: 1.


HLS segment connect and read timeout.

Default is: 10.0.


A comma-delimited list of segment names that will get filtered out.

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.


URI to segment encryption key. If no URI is specified, the URI contained in the segments will be used.

URI can be templated using the following variables, which will be replaced with its 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.


Selects a specific audio source or sources, by language code or name, when multiple audio sources are available. Can be * to download all audio sources.

Examples:

--hls-audio-select "English,German"
--hls-audio-select "en,de"
--hls-audio-select "*"


NOTE:

This is only useful in special circumstances where the regular locale option fails, such as when multiple sources of the same language exists.



Timeout for reading data from HLS streams.

Default is: 60.0.


Amount of time to skip from the beginning of the stream. For live streams, this is a negative offset from the end of the stream (rewind).

Default is: 00:00:00.


Limit the playback duration, useful for watching segments of a stream. The actual duration may be slightly longer, as it is rounded to the nearest HLS segment.

Default is: unlimited.


Skip to the beginning of a live stream, or as far back as possible.

Timeout for reading data from HTTP streams.

Default is: 60.0.


The maximum size of ringbuffer. Add a M or K suffix to specify mega or kilo bytes instead of bytes.

The ringbuffer is used as a temporary storage between the stream and the player. This is to allows us to download the stream faster than the player wants to read it.

The smaller the size, the higher chance of the player buffering if there are download speed dips and the higher size the more data we can use as a storage to catch up from speed dips.

It also allows you to temporary pause as long as the ringbuffer doesn't get full since we continue to download the stream in the background.

Default is: "16M".

NOTE:

A smaller size is recommended on lower end systems (such as Raspberry Pi) when playing stream types that require some extra processing (such as HDS) to avoid unnecessary background processing.



A SOCKS proxy that RTMP streams will use.

Example: 127.0.0.1:9050


RTMPDump is used to access RTMP streams. You can specify the location of the rtmpdump executable if it is not in your PATH.

Example: "/usr/local/bin/rtmpdump"


Timeout for reading data from RTMP streams.

Default is: 60.0.


How many attempts should be done to download each segment before giving up.

This is generic option used by streams not covered by other options, such as stream protocols specific to plugins, e.g. UStream.

Default is: 3.


The size of the thread pool used to download segments. Minimum value is 1 and maximum is 10.

This is generic option used by streams not covered by other options, such as stream protocols specific to plugins, e.g. UStream.

Default is: 1.


Segment connect and read timeout.

This is generic option used by streams not covered by other options, such as stream protocols specific to plugins, e.g. UStream.

Default is: 10.0.


Timeout for reading data from streams.

This is generic option used by streams not covered by other options, such as stream protocols specific to plugins, e.g. UStream.

Default is: 60.0.


Print the command-line used internally to play the stream.

This is only available on RTMP streams.


Log possible errors from internal subprocesses to a temporary file. The file will be saved in your systems temporary directory.

Useful when debugging rtmpdump related issues.


Log the subprocess errorlog to a specific file rather than a temporary file. Takes precedence over subprocess-errorlog.

Useful when debugging rtmpdump related issues.


FFMPEG is used to access or mux separate video and audio streams. You can specify the location of the ffmpeg executable if it is not in your PATH.

Example: "/usr/local/bin/ffmpeg"


Write the console output from ffmpeg to the console.

Path to write the output from the ffmpeg console.

When muxing streams, set the output format to OUTFORMAT.

Default is: "matroska".

Example: "mpegts"


When muxing streams, transcode the video to CODEC.

Default is: "copy".

Example: "h264"


When muxing streams, transcode the audio to CODEC.

Default is: "copy".

Example: "aac"


Forces the -copyts ffmpeg option and does not remove the initial start time offset value.

Enable the -start_at_zero ffmpeg option when using copyts.

Automatically mux available subtitles into the output stream.

Needs to be supported by the used plugin.

Supported plugins: funimationnow, pluzz, rtve, svtplay, vimeo


HTTP OPTIONS

A HTTP proxy to use for all HTTP requests, including WebSocket connections. By default this proxy will be used for all HTTPS requests too.

Example: "http://hostname:port/"


A HTTPS capable proxy to use for all HTTPS requests.

Example: "https://hostname:port/"


A cookie to add to each HTTP request.

Can be repeated to add multiple cookies.


A header to add to each HTTP request.

Can be repeated to add multiple headers.


A query parameter to add to each HTTP request.

Can be repeated to add multiple query parameters.


Ignore HTTP settings set in the environment such as environment variables (HTTP_PROXY, etc) or ~/.netrc authentication.

Don't attempt to verify SSL certificates.

Usually a bad idea, only use this if you know what you're doing.


Disable Diffie Hellman key exchange

Usually a bad idea, only use this if you know what you're doing.


SSL certificate to use.

Expects a .pem file.


SSL certificate to use.

Expects a .crt and a .key file.


General timeout used by all HTTP requests except the ones covered by other options.

Default is: 20.0.


PLUGIN OPTIONS

Abweb

The username associated with your ABweb account, required to access any ABweb stream.

A ABweb account password to use with --abweb-username.

Purge cached ABweb credentials to initiate a new session and reauthenticate.

Afreeca

The username used to register with afreecatv.com.

A afreecatv.com account password to use with --afreeca-username.

Purge cached AfreecaTV credentials to initiate a new session and reauthenticate.

Animelab

The email address used to register with animelab.com.

A animelab.com account password to use with --animelab-email.

Bbciplayer

The username used to register with bbc.co.uk.

A bbc.co.uk account password to use with --bbciplayer-username.

Prefer HD streams over local SD streams, some live programmes may not be broadcast in HD.

Clubbingtv

The username used to register with Clubbing TV.

A Clubbing TV account password to use with --clubbingtv-username.

Crunchyroll

A Crunchyroll username to allow access to restricted streams.

A Crunchyroll password for use with --crunchyroll-username.

If left blank you will be prompted.


Purge cached Crunchyroll credentials to initiate a new session and reauthenticate.

Set a specific session ID for crunchyroll, can be used to bypass region restrictions. If using an authenticated session ID, it is recommended that the authentication parameters be omitted as the session ID is account specific.

NOTE:

The session ID will be overwritten if authentication is used and the session ID does not match the account.



Funimationnow

Email address for your Funimation account.

Password for your Funimation account.

The audio language to use for the stream; japanese or english.

Default is: "english".


Nicolive

The email or phone number associated with your Niconico account

The password of your Niconico account

Value of the user-session token (can be used in case you do not want to put your password here)

Purge cached Niconico credentials to initiate a new session and reauthenticate.

Amount of time to skip from the beginning of a stream. Default is 00:00:00.

Openrectv

The email associated with your openrectv account, required to access any openrectv stream.

An openrectv account password to use with --openrectv-email.

Pixiv

The pixiv.net sessionid that's used in pixivs PHPSESSID cookie. can be used instead of the username/password login process.

The pixiv.net device token that's used in pixivs device_token cookie. can be used instead of the username/password login process.

Purge cached Pixiv credentials to initiate a new session and reauthenticate.

Select a co-host stream instead of the owner stream.

Sbscokr

Channel ID to play.

Example:

streamlink http://play.sbs.co.kr/onair/pc/index.html best --sbscokr-id S01



Schoolism

The email associated with your Schoolism account, required to access any Schoolism stream.

A Schoolism account password to use with --schoolism-email.

Play part number PART of the lesson, or assignment feedback video.

Defaults is 1.


Steam

A Steam account email address to access friends/private streams

A Steam account password to use with --steam-email.

Streann

Source URL where the iframe is located, only required for direct URLs of ott.streann.com

Twitcasting

Password for private Twitcasting streams.

Twitch

Do not open the stream if the target channel is hosting another channel.

Skip embedded advertisement segments at the beginning or during a stream. Will cause these segments to be missing from the stream.

Do not open the stream if the target channel is currently broadcasting a rerun.

Enables low latency streaming by prefetching HLS segments. Sets --hls-segment-stream-data to true and --hls-live-edge to 2, if it is higher. Reducing --hls-live-edge to 1 will result in the lowest latency possible.

Low latency streams have to be enabled by the broadcasters on Twitch themselves. Regular streams can cause buffering issues with this option enabled.

NOTE:

The caching/buffering settings of the chosen player may need to be adjusted as well. Please refer to the player's own documentation for the required parameters and its configuration. Player parameters can be set via Streamlink's --player or --player-args parameters.



Ustreamtv

A password to access password protected UStream.tv channels.

Ustvnow

Your USTV Now account username

Your USTV Now account password

Wwenetwork

The email associated with your WWE Network account, required to access any WWE Network stream.

A WWE Network account password to use with --wwenetwork-email.

Yupptv

The yupptv.com boxid that's used in the BoxId cookie. Can be used instead of the username/password login process.

The yupptv.com yuppflixtoken that's used in the YuppflixToken cookie. Can be used instead of the username/password login process.

Purge cached YuppTV credentials to initiate a new session and reauthenticate.

Zattoo

The email associated with your zattoo account, required to access any zattoo stream.

A zattoo account password to use with --zattoo-email.

Purge cached zattoo credentials to initiate a new session and reauthenticate.

A comma-delimited list of stream types which should be used, the following types are allowed:
  • dash
  • hls5

Default is: "dash".


AUTHOR

Streamlink Contributors

COPYRIGHT

2021, Streamlink

July 26, 2021 2.3.0