twitch-dl download

Download videos or clips.


twitch-dl download <videos> [FLAGS] [OPTIONS]


<videos> One or more video ID, clip slug or twitch URL to download.


-k, --keep Don't delete downloaded VODs and playlists after merging.
--no-join Don't run ffmpeg to join the downloaded vods, implies --keep.
--overwrite Overwrite the target file if it already exists without prompting.


-w, --max-workers Number of workers for downloading vods concurrently (default 5)
-s, --start Download video from this time (hh:mm or hh:mm:ss)
-e, --end Download video up to this time (hh:mm or hh:mm:ss)
-f, --format Video format to convert into, passed to ffmpeg as the target file extension. Defaults to mkv.
-q, --quality Video quality, e.g. 720p. Set to 'source' to get best quality.
-a, --auth-token Authentication token, passed to Twitch to access subscriber only VODs. Can be copied from the 'auth_token' cookie in any browser logged in on Twitch.
-o, --output Output file name template. See docs for details.
-r, --rate-limit Limit the maximum download speed in bytes per second. Use 'k' and 'm' suffixes for kbps and mbps.
-c, --chapter Download a single chapter of the video. Specify the chapter number or use the flag without a number to display a chapter select prompt.


Download a video by ID or URL:

twitch-dl download 221837124
twitch-dl download

Specify video quality to download to prevent a prompt:

twitch-dl download -q 720p 221837124

Setting quality to source will download the best available quality:

twitch-dl download -q source 221837124

Setting quality to audio_only will download only audio:

twitch-dl download -q audio_only 221837124

Download multiple videos one after the other:

twitch-dl download 1559928295 1557034274 1555157293 -q source

Overriding the target file name

The target filename can be defined by passing the --output option followed by the desired file name, e.g. --output strim.mkv.

The filename uses Python format string syntax and may contain placeholders in curly braces which will be replaced with relevant information tied to the downloaded video, e.g. --output "{date}_{id}.{format}".

The supported placeholders are:

{id}Video ID1255522958
{title}Video titleDark Souls 3 First playthrough
{title_slug}Slugified video titledark_souls_3_first_playthrough
{datetime}Video date and time2022-01-07T04:00:27Z
{date}Video date2022-01-07
{time}Video time04:00:27Z
{channel}Channel nameKatLink
{channel_login}Channel loginkatlink
{format}File extension, see --formatmkv
{game}Game nameDark Souls III
{game_slug}Slugified game namedark_souls_iii
{slug}Clip slug (clips only)AbrasivePlacidCatDxAbomb

A couple of examples:

Pattern{date}_{id}_{channel_login}_{title_slug}.{format} (default)
Expands to2022-01-07_1255522958_katlink_dark_souls_3_first_playthrough.mkv

Pattern{channel} - {game} - {title}.{format}
Expands toKatLink - Dark Souls III - Dark Souls 3 First playthrough.mkv

Downloading subscriber-only VODs

To download sub-only VODs, you need to find your auth token. It can be found using your browser, in a cookie named auth_token.

  1. Open in your browser and make sure you're logged in.
  2. Open developer tools (F12 shortcut in Firefox and Chrome).
  3. Open the Storage tab on Firefox, or Application tab in Chrome.
  4. Click on Cookies in the sidebar.
  5. Find the auth-token cookie in the list and copy it's value.

How to find the auth token in dev tools

The auth token will be a 30 character long string of random letters and numbers, something like iduetx4i107rn4b9wrgctf590aiktv. Then you can pass this to the download command:

twitch-dl download 221837124 --auth-token iduetx4i107rn4b9wrgctf590aiktv