Skip to content

Streamlink configuration

bastimeyer edited this page Nov 4, 2021 · 15 revisions

Selecting a streaming provider

Support for Livestreamer has been dropped in November 2019 in the 1.9.0 release.
See the installation wiki page for the available Streamlink installation methods.

If Streamlink has been installed correctly, Streamlink Twitch GUI should be able to automatically select the right configuration and everything will work out of the box.

In case Streamlink Twitch GUI is not able to automatically choose the correct configuration or if Streamlink has been installed in a different way, custom settings need to be applied. This means either defining custom streaming provider paths in the settings menu or adjusting the system's PATH environment variable (the Streamlink installers on Windows automatically do that).

  • Streamlink (default)

    Requires a Streamlink version of at least 2.0.0.

    By default, Streamlink Twitch GUI will try to find Streamlink's executable in one of the directories listed in the system's PATH environment variable. It also includes a list of known default locations in case the file can't be resolved automatically. A custom path, relative or absolute, needs to be set if Streamlink has been installed in a different location.

    On Windows, Streamlink Twitch GUI will look for the streamlinkw.exe executable instead of streamlink.exe (notice the trailing w), so that no command line window will pop up when launching a stream.

    On Linux when using the Streamlink AppImage (not to be confused with the AppImage of Streamlink Twitch GUI), the path to Streamlink's AppImage file needs to be set manually because AppImages can be stored anywhere and thus can't be found automatically by Streamlink Twitch GUI.

  • Streamlink (Python)

    Requires a Streamlink version of at least 2.0.0 and also requires a working Python installation that is compatible with Streamlink. The Windows installer of Streamlink already comes with its own Python environment.

    This provider config has been renamed in the 1.10.0 release and was the default selection prior to that (a detailed explanation for this change can be read here). Using the new default provider is much easier in most cases, as it only looks for a single executable, so please be aware of that.

    If you still decide to use this provider config, then please make sure that Streamlink's Python entry script file (streamlink-script.py on Windows, streamlink on macOS/Linux) can be found in one of the directories listed in the system's PATH environment variable. Streamlink Twitch GUI also includes a list of known default locations in case the file can't be resolved automatically. A custom path, relative or absolute, needs to be set if Streamlink has been installed in a different location.

    By default, Streamlink Twitch GUI will try to use the Python environment Streamlink was built for (set in the shebang of the Python entry script file). If this method failed, then it will try to resolve the system's global Python executable (pythonw.exe on Windows, python on macOS/Linux) by looking at the PATH environment variable and the list of known default locations, like described above.

    Users of Streamlink portable on Windows who choose this streaming provider config need to explicitly choose both the Python executable and Streamlink Python script, located in the subdirectories of the Streamlink portable folder. The included Streamlink portable executable can not be used!

Unexpected version check output error

To be able to launch any streams, Streamlink Twitch GUI first needs to validate the streaming provider config. After resolving all the file paths, it'll execute Streamlink and will check its version, so that it can know that all features are available. In case the streaming provider has been misconfigured or if Streamlink itself is not working correctly, the output of the version check will either be an error message or random garbage data and Streamlink Twitch GUI won't be able to interpret it as a version string. This is where the error messages comes from.

If you run into this problem, please make sure that you have set the correct streaming provider paths (if custom paths are needed) and that Streamlink itself is working correctly. To debug this on your own, please execute Streamlink from the command line shell with the --version parameter and check its output.

Config file

The configuration of Streamlink is a mix between parameters set in the Streamlink config file and parameters generated by Streamlink Twitch GUI when launching a stream.

Using the config file is not recommended. All required options and custom parameters can be selected/added in the settings menu of Streamlink Twitch GUI instead of defining those in the config file. Using the config file may introduce unwanted side effects.

Some parameters are hidden/disabled by default in Streamlink Twitch GUI and advanced settings need to be enabled first in the main settings menu.

Custom parameters

See the Streamlink CLI documentation for a list of all available parameters. Some parameters will be overridden by the GUI.

Player input

There are four different methods of how Streamlink will forward the data to the player when watching streams. The selected input method has to be supported by the selected player, so please make sure to choose the correct option.

  • Standard input (default)

    Writes the stream to the player's standard input channel. This is the default behavior of Streamlink and is supported by most players.
    Does not set any additional Streamlink parameters.
  • Named pipe

    Writes the stream to a named pipe, where the player reads from. This is a different method of inter-process communication and its implementation differs between operating systems. See Wikipedia for more informations.
    Sets the --player-fifo Streamlink parameter.
  • HTTP

    Launches a local HTTP server where the player reads from. This was the default method set by Streamlink Twitch GUI until version 1.4.0, because it is supported by almost all known players. Streams may be paused/stopped by the player and continued later on, as long as the player does not get closed. On some systems, this method may pop up a firewall warning.
    Sets the --player-continuous-http Streamlink parameter.
  • HLS (passthrough)

    Lets the player download and buffer the stream by itself. Streamlink will only retrieve the stream URL from Twitch and then forward it to the player, so all of Streamlink's buffering configurations will be ignored. This option also comes with the disadvantage that the player window can't get closed from inside Streamlink Twitch GUI due to Streamlink's passthrough behavior.
    Sets the --player-passthrough hls Streamlink parameter.

Buffering and stream launch settings

HLS live edge + HLS segment threads

These parameters are responsible for the stream fetching and buffering behavior of Streamlink. Please have in mind, that these settings are disabled when choosing the HLS stream type (see above).
See --hls-live-edge and --hls-segment-threads for more informations.

Stream launch attempts

These parameters set Streamlink's behavior in case of stream launch errors.
See --retry-open and --retry-streams for more informations.

Stream qualities

Stream qualities can be chosen in the Source, High, Medium, Low and Audio formats and can be globally set in the "Streams" settings menu or can be individually set in a channel's settings menu. To be able to customize the quality presets in the "Streams" settings menu, advanced settings need to be enabled first.

Since summer 2016, new explicit stream qualities (eg. 1080p60) have been added by Twitch in addition to the old quality names (eg. source). Streamlink Twitch GUI will try to map the new quality names to the old ones, so that the same qualities and stream bitrates can be used between streams with different quality names.

A new quality mapping system has been added in the 1.3.0 release to fix the ongoing issues with non-matching stream qualities by Streamlink when Livestreamer was still supported.

The new system utilizes Streamlink's quality name parser and the --stream-sorting-excludes parameter. Qualities are now mapped by defining a list of unwanted names which are excluded instead of included in the quality selection. All remaining unfiltered qualities will be selected by the best (or worst) selector alias. Since whole ranges of qualities can be defined, single names don't need to be explicitly listed anymore, which ensures a future-proof selection as long as Streamlink is able to correctly parse the quality names.

The stream quality preset list is made of two columns per row: The first column is being used by the --stream-sorting-excludes parameter, the second column represents the actual quality selection. Please see the parameter documentation for a list of available operators in the exclusion list.
Qualities can't be excluded in the "Source" and "Audio only" presets, because the selectors will already match the desired quality. Please notice the quality definitions with and without an FPS value. Quality names without an FPS value are used by Twitch if a broadcaster is using an uncommon refresh rate.

Clone this wiki locally