You are reading the documentation for the in-development version of Streamlink.
Streaming protocols¶
There are many types of streaming protocols used by services today and Streamlink supports most of them. It's possible to tell Streamlink to access a streaming protocol directly instead of relying on a plugin to extract the streams from a URL for you.
Playing built-in streaming protocols directly¶
A streaming protocol can be accessed directly by specifying it in the protocol://URL
format
with an optional list of parameters, like so:
$ streamlink "protocol://https://streamingserver/path key1=value1 key2=value2"
Depending on the input URL, the explicit protocol scheme may be omitted.
The following example shows HLS streams (.m3u8
) and DASH streams (.mpd
):
$ streamlink "https://streamingserver/playlist.m3u8"
$ streamlink "https://streamingserver/manifest.mpd"
Supported streaming protocols¶
Name |
Explicit prefix |
---|---|
Apple HTTP Live Streaming |
|
MPEG-DASH |
|
Progressive HTTP/HTTPS |
|
Note
Local files can be read by adding the file://
scheme to the URL
component.
Protocol parameters¶
When passing parameters to the built-in streaming protocols, the values will either be treated as plain strings or they will be interpreted as Python literals:
$ streamlink "httpstream://https://streamingserver/path method=POST params={'abc':123} json=['foo','bar','baz']"
method="POST"
params={"key": 123}
json=["foo", "bar", "baz"]
The parameters from the example above are used to make an HTTP POST
request with abc=123
added
to the query string and ["foo", "bar", "baz"]
used as the content of the HTTP request's body (the serialized JSON data).
Some parameters allow you to configure the behavior of the streaming protocol implementation directly:
$ streamlink "hls://https://streamingserver/path start_offset=123 duration=321 force_restart=True"
Available parameters¶
Parameters are passed to the following methods of their respective stream implementations:
Protocol prefix |
Method references |
---|---|
|
|
|
|
|