{"id":9340,"library":"streamlink","title":"Streamlink","description":"Streamlink is a command-line utility and Python library that extracts streams from various online services (like Twitch, YouTube, etc.) and pipes them into a video player of choice, such as VLC or mpv. It aims to provide a lightweight alternative to resource-heavy and unoptimized websites. The library is actively maintained, with frequent minor and patch releases, and the current stable version is 8.3.0.","status":"active","version":"8.3.0","language":"en","source_language":"en","source_url":"https://github.com/streamlink/streamlink","tags":["video streaming","cli","player","HLS","DASH","live streaming","twitch","youtube"],"install":[{"cmd":"pip install streamlink","lang":"bash","label":"Install latest stable version"}],"dependencies":[{"reason":"Requires Python 3.10 or newer.","package":"python","version":">=3.10"},{"reason":"HTTP client library, required for network operations.","package":"urllib3","version":">=2.0.0"}],"imports":[{"symbol":"Streamlink","correct":"from streamlink import Streamlink"},{"note":"Re-exports of error classes from `streamlink.plugins` were deprecated in 6.8.0 and removed in 7.0.0. Import from `streamlink.exceptions` instead.","wrong":"from streamlink.plugins import PluginError","symbol":"PluginError","correct":"from streamlink.exceptions import PluginError"},{"note":"Re-exports of error classes from `streamlink.plugins` were deprecated in 6.8.0 and removed in 7.0.0. Import from `streamlink.exceptions` instead.","wrong":"from streamlink.plugins import NoPluginError","symbol":"NoPluginError","correct":"from streamlink.exceptions import NoPluginError"},{"note":"Re-exports of the `Plugin` class from `streamlink.plugins` were deprecated in 6.8.0 and removed in 7.0.0. Import from `streamlink.plugin` instead.","wrong":"from streamlink.plugins import Plugin","symbol":"Plugin","correct":"from streamlink.plugin import Plugin"},{"note":"Direct import of `HTTPSession` from `streamlink.plugin.api` or `streamlink.plugin.api.http_session` was deprecated in 6.6.0 and removed in 7.0.0. Access it via the `Streamlink` session's `http` attribute.","wrong":"from streamlink.plugin.api.http_session import HTTPSession","symbol":"HTTPSession","correct":"session = Streamlink()\nhttp_session = session.http"}],"quickstart":{"code":"import streamlink\nimport os\n\n# Initialize a Streamlink session\nsession = streamlink.Streamlink()\n\n# Example: Set a session option, e.g., for logging level\nsession.set_option(\"log-level\", \"info\")\n\n# Define the URL and desired stream quality\nstream_url = \"https://www.twitch.tv/twitchdev\"\ndesired_quality = \"best\"\n\ntry:\n    # Attempt to find streams for the URL\n    streams = session.streams(stream_url)\n    if not streams:\n        print(f\"No streams found for {stream_url}\")\n    else:\n        # Get the desired stream\n        stream = streams.get(desired_quality)\n        if stream:\n            print(f\"Opening {desired_quality} stream from {stream_url}\")\n            # Open the stream and read a chunk (or pipe to a player)\n            with stream.open() as fd:\n                # This example just reads a small chunk. For actual playback,\n                # you'd typically pipe this to an external player.\n                # For example, to play with VLC (requires VLC to be installed and in PATH):\n                # import subprocess\n                # player_cmd = [\"vlc\", \"-\"]\n                # p = subprocess.Popen(player_cmd, stdin=subprocess.PIPE)\n                # for chunk in iter(lambda: fd.read(8192), b''):\n                #     p.stdin.write(chunk)\n                # p.stdin.close()\n                # p.wait()\n                print(f\"Successfully accessed {desired_quality} stream.\")\n                # For a real application, you'd stream the data to a player or file\n        else:\n            print(f\"Stream quality '{desired_quality}' not available. Available: {', '.join(streams.keys())}\")\nexcept streamlink.exceptions.NoPluginError:\n    print(f\"No plugin found for URL: {stream_url}\")\nexcept streamlink.exceptions.PluginError as e:\n    print(f\"Plugin error: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to use Streamlink programmatically to find and access streams from a given URL. It initializes a Streamlink session, sets an option, resolves streams for a Twitch URL, and attempts to open the 'best' quality stream. For actual media playback, the stream's file-like object would typically be piped to an external video player process."},"warnings":[{"fix":"Upgrade your Python environment to 3.10 or a later supported version.","message":"Streamlink 8.0.0 dropped support for Python 3.9. Projects must use Python 3.10 or newer.","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"Use the `multivariant` parameter/attribute instead, which is an M3U8 reference of the parsed HLS multivariant playlist.","message":"The `url_master` argument and attribute in `HLSStream` and `MuxedHLSStream` were removed in Streamlink 8.0.0.","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"Ensure `urllib3` is updated to version 2.0.0 or higher. Running `pip install --upgrade streamlink` should handle this.","message":"Streamlink 8.0.0 updated its `urllib3` dependency, requiring `>=2.0.0`.","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"Refer to the official documentation or migration guides for the correct, direct import paths for these attributes to avoid future breaking changes.","message":"Imports of re-exported attributes from `streamlink.stream` and `streamlink.utils` are deprecated.","severity":"deprecated","affected_versions":"8.2.0, 8.2.1"},{"fix":"Specify custom player arguments using the dedicated `--player-args` CLI argument. Paths with spaces in `--player` no longer require quotation marks.","message":"The `--player` CLI argument changed in Streamlink 6.0.0 to be path-only. It no longer accepts additional player arguments.","severity":"gotcha","affected_versions":">=6.0.0"},{"fix":"Move existing configuration files to the new standard paths documented in the CLI guide, or use the `--config` argument to specify a custom path.","message":"Old and deprecated config file paths (including plugin-specific ones) are no longer supported since Streamlink 7.0.0.","severity":"gotcha","affected_versions":">=7.0.0"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"First, verify the URL is correct and the stream is live. Try updating Streamlink (`pip install --upgrade streamlink`) to get the latest plugin definitions. You can also run with `--json` to see raw output or `--loglevel debug` for more details.","cause":"The Streamlink plugin for the given URL could not find any streams, often due to changes on the streaming service's side, an invalid URL, or the stream being offline.","error":"No playable streams found on this URL: <URL>"},{"fix":"Upgrade Streamlink and its dependencies: `pip install --upgrade streamlink`. This typically resolves `urllib3` version mismatches.","cause":"A common cause is an incompatibility between Streamlink's `urllib3` dependency (or `requests`' dependency on `urllib3`) and Streamlink's expected version.","error":"Error: Couldn't launch the Stream Unexpected Version check output. / urllib3 (X.Y) or chardet (X.Y.Z) doesn't match a supported version!"},{"fix":"This often points to a problem with the source stream. Try different stream qualities (`best`, `worst`, or specific resolutions). If recording, try adjusting `--hls-segment-threads` or `--hls-live-restart`. Sometimes, the issue resolves itself or is temporary.","cause":"This usually indicates an issue with the HLS stream itself, where segments are not continuous or metadata changes unexpectedly, leading to corrupted output or incomplete recordings.","error":"[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data."},{"fix":"Review your Streamlink command-line arguments and any custom configuration files. Pay close attention to changes in how `--player` and `--player-args` work since version 6.0.0. Remove or update old config files. Run `streamlink --help` for current argument options.","cause":"This error occurs when Streamlink's CLI parser encounters an argument it doesn't recognize. This often happens after major version updates where CLI arguments are changed or deprecated, or when an outdated configuration file passes invalid options.","error":"streamlink: error: unrecognized arguments: <some-argument>"}]}