LinuxCommandLibrary

streamlink

Stream online video to media players

TLDR

Attempt to extract streams from the URL specified, and if it's successful, print out a list of available streams to choose from

$ streamlink [example.com/stream]
copy

Open a stream with the specified quality
$ streamlink [example.com/stream] [720p60]
copy

Select the highest or lowest available quality
$ streamlink [example.com/stream] [best|worst]
copy

Use a specific player to feed stream data to (VLC is used by default if found)
$ streamlink --player=[mpv] [example.com/stream] [best]
copy

Skip a specific amount of time from the beginning of the stream. For live streams, this is a negative offset from the end of the stream (rewind)
$ streamlink --hls-start-offset [[HH:]MM:SS] [example.com/stream] [best]
copy

Skip to the beginning of a live stream, or as far back as possible
$ streamlink --hls-live-restart [example.com/stream] [best]
copy

Write stream data to a file instead of playing it
$ streamlink --output [path/to/file.ts] [example.com/stream] [best]
copy

Open the stream in the player, while at the same time writing it to a file
$ streamlink --record [path/to/file.ts] [example.com/stream] [best]
copy

SYNOPSIS

streamlink [OPTIONS] [QUALITY]

PARAMETERS

URL
    The URL of the stream to be played.

QUALITY
    The desired stream quality (e.g., best, worst, 720p, 1080p). If omitted, Streamlink will attempt to select the best available quality.

--help
    Show the help message and exit.

--version
    Show program's version number and exit.

-v, --verbose
    Set the log verbosity level. (none, error, warning, info, debug, trace)

-o, --output
    Write stream to file instead of playing it.

--player
    The command to use to play the stream. Can include arguments, using `{filename}` as a placeholder for the stream URL. Defaults to the system's default media player.

--player-args
    Arguments passed to the player.

--plugin-dirs
    Comma-separated list of directories to search for plugins.

--http-header
    Set a custom HTTP header.

DESCRIPTION

Streamlink is a command-line utility that pipes video streams from various streaming services into a video player of your choice. It's designed to be lightweight and easily integrated with other tools. It acts as a universal CLI for various websites that stream video, abstracting away the specific details of each service.

Streamlink focuses on providing raw, unfiltered streams. It supports a wide range of streaming services, including Twitch, YouTube, and Dailymotion, through a plugin system. This allows for easy extension to support new or modified services. The user specifies the URL of the stream and the desired quality, and Streamlink handles the process of extracting the stream URL and launching the player.

CAVEATS

Streamlink relies on plugins for specific streaming services. If a service changes its streaming protocol, the corresponding plugin may need to be updated. Streamlink requires a working video player (e.g., VLC, mpv) to be installed and configured.

QUALITY SELECTION

Streamlink attempts to parse the available qualities from the provided URL. Common quality keywords include 'best', 'worst', and specific resolutions like '720p' or '1080p'. The exact quality options available depend on the specific streaming service and the supported qualities by the plugin.

PLUGINS

Plugins are the core of Streamlink's functionality. They handle the specific logic for interacting with each streaming service.
Each plugin is a Python script that knows how to extract the stream URL from a given web page. You can develop your own plugins if you need to support a streaming service that is not yet supported by Streamlink.

HISTORY

Streamlink is a fork of Livestreamer, created to continue development after Livestreamer's development ceased. It inherits Livestreamer's core functionality and aims to provide an up-to-date and maintained streaming utility. The command is used for a variety of video streaming use cases, including watching live broadcasts, recording streams, and integrating with other scripts and automation tools.

SEE ALSO

vlc(1), mpv(1)

Copied to clipboard