mirror of
https://github.com/ihabunek/twitch-dl
synced 2024-08-30 18:32:25 +00:00
Generate docs
This commit is contained in:
120
docs/commands/clips.md
Normal file
120
docs/commands/clips.md
Normal file
@ -0,0 +1,120 @@
|
||||
<!-- ------------------- generated docs start ------------------- -->
|
||||
# twitch-dl clips
|
||||
|
||||
List or download clips for a channel.
|
||||
|
||||
### USAGE
|
||||
|
||||
```
|
||||
twitch-dl clips <channel_name> [FLAGS] [OPTIONS]
|
||||
```
|
||||
|
||||
### ARGUMENTS
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="code"><channel_name></td>
|
||||
<td>Name of the channel to list clips for.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### FLAGS
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="code">-a, --all</td>
|
||||
<td>Fetch all videos, overrides --limit</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-j, --json</td>
|
||||
<td>Show results as JSON. Ignores <code>--pager</code>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-d, --download</td>
|
||||
<td>Download all videos in given period (in source quality)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### OPTIONS
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="code">-l, --limit</td>
|
||||
<td>Number of videos to fetch (default 10, max 100)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-P, --period</td>
|
||||
<td>Period from which to return clips. Defaults to <code>all_time</code>. Possible values: <code>last_day</code>, <code>last_week</code>, <code>last_month</code>, <code>all_time</code>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-p, --pager</td>
|
||||
<td>Number of clips to show per page. Disabled by default.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- ------------------- generated docs end ------------------- -->
|
||||
|
||||
## Listing clips
|
||||
|
||||
By default returns top 10 clips of all time.
|
||||
|
||||
```
|
||||
twitch-dl clips bananasaurus_rex
|
||||
```
|
||||
|
||||
Increase the number of clips returned.
|
||||
|
||||
```
|
||||
twitch-dl clips bananasaurus_rex --limit 50
|
||||
```
|
||||
|
||||
Return all clips, may require multiple requests, see notes.
|
||||
|
||||
```
|
||||
twitch-dl clips bananasaurus_rex --all
|
||||
```
|
||||
|
||||
Return clips from past day/week/month by changing the period:
|
||||
|
||||
```
|
||||
twitch-dl clips bananasaurus_rex --period past_week
|
||||
```
|
||||
|
||||
List all clips, 10 clips at the time:
|
||||
|
||||
```
|
||||
twitch-dl clips bananasaurus_rex --pager
|
||||
```
|
||||
|
||||
Print clips data in JSON. Useful for scripting.
|
||||
|
||||
```
|
||||
twitch-dl clips bananasaurus_rex --json
|
||||
```
|
||||
|
||||
Download all clips of the past week, won't overwrite exisitng ones:
|
||||
|
||||
```
|
||||
twitch-dl clips bananasaurus_rex --download --period last_week
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
Clips are fetched in batches no larger than 100. When requesting more than 100
|
||||
clips, it takes more than one request so it can take a little time. You can see
|
||||
individual requests by passing the `--debug` flag.
|
||||
|
||||
Currently it doesn't seem to be possible to get a list of clips ordered by time
|
||||
of creation, only by view count. Clips with the same view count seem to be
|
||||
returned in random order. This can break paging resulting in duplicate clips
|
||||
listed or clips missed.
|
148
docs/commands/download.md
Normal file
148
docs/commands/download.md
Normal file
@ -0,0 +1,148 @@
|
||||
<!-- ------------------- generated docs start ------------------- -->
|
||||
# twitch-dl download
|
||||
|
||||
Download a video or clip.
|
||||
|
||||
### USAGE
|
||||
|
||||
```
|
||||
twitch-dl download <video> [FLAGS] [OPTIONS]
|
||||
```
|
||||
|
||||
### ARGUMENTS
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="code"><video></td>
|
||||
<td>Video ID, clip slug, or URL</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### FLAGS
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="code">-k, --keep</td>
|
||||
<td>Don't delete downloaded VODs and playlists after merging.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">--no-join</td>
|
||||
<td>Don't run ffmpeg to join the downloaded vods, implies --keep.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">--overwrite</td>
|
||||
<td>Overwrite the target file if it already exists without prompting.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### OPTIONS
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="code">-w, --max-workers</td>
|
||||
<td>Maximal number of threads for downloading vods concurrently (default 20)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-s, --start</td>
|
||||
<td>Download video from this time (hh:mm or hh:mm:ss)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-e, --end</td>
|
||||
<td>Download video up to this time (hh:mm or hh:mm:ss)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-f, --format</td>
|
||||
<td>Video format to convert into, passed to ffmpeg as the target file extension. Defaults to <code>mkv</code>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-q, --quality</td>
|
||||
<td>Video quality, e.g. 720p. Set to 'source' to get best quality.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-o, --output</td>
|
||||
<td>Output file name template. See docs for details.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- ------------------- generated docs end ------------------- -->
|
||||
|
||||
### Examples
|
||||
|
||||
Download a video by ID or URL:
|
||||
|
||||
```
|
||||
twitch-dl download 221837124
|
||||
twitch-dl download https://www.twitch.tv/videos/221837124
|
||||
```
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
### 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](https://docs.python.org/3/library/string.html#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:
|
||||
|
||||
| Placeholder | Description | Sample |
|
||||
| ----------------- | ------------------------------ | ------------------------------ |
|
||||
| `{id}` | Video ID | 1255522958 |
|
||||
| `{title}` | Video title | Dark Souls 3 First playthrough |
|
||||
| `{title_slug}` | Slugified video title | dark_souls_3_first_playthrough |
|
||||
| `{datetime}` | Video date and time | 2022-01-07T04:00:27Z |
|
||||
| `{date}` | Video date | 2022-01-07 |
|
||||
| `{time}` | Video time | 04:00:27Z |
|
||||
| `{channel}` | Channel name | KatLink |
|
||||
| `{channel_login}` | Channel login | katlink |
|
||||
| `{format}` | File extension, see `--format` | mkv |
|
||||
| `{game}` | Game name | Dark Souls III |
|
||||
| `{game_slug}` | Slugified game name | dark_souls_iii |
|
||||
| `{slug}` | Clip slug (clips only) | AbrasivePlacidCatDxAbomb |
|
||||
|
||||
A couple of examples:
|
||||
|
||||
| | |
|
||||
| -- | -- |
|
||||
| Pattern | `{date}_{id}_{channel_login}_{title_slug}.{format}` *(default)* |
|
||||
| Expands to | `2022-01-07_1255522958_katlink_dark_souls_3_first_playthrough.mkv` |
|
||||
|
||||
<br />
|
||||
|
||||
| | |
|
||||
| -- | -- |
|
||||
| Pattern | `{channel} - {game} - {title}.{format}` |
|
||||
| Expands to | `KatLink - Dark Souls III - Dark Souls 3 First playthrough.mkv` |
|
31
docs/commands/env.md
Normal file
31
docs/commands/env.md
Normal file
@ -0,0 +1,31 @@
|
||||
<!-- ------------------- generated docs start ------------------- -->
|
||||
# twitch-dl env
|
||||
|
||||
Print environment information for inclusion in bug reports.
|
||||
|
||||
### USAGE
|
||||
|
||||
```
|
||||
twitch-dl env
|
||||
```
|
||||
|
||||
<!-- ------------------- generated docs end ------------------- -->
|
||||
|
||||
Includes the twitch-dl version, platform details and python version. Does not
|
||||
include any personal information.
|
||||
|
||||
On Linux this may return something like:
|
||||
|
||||
```
|
||||
twitch-dl 1.21.0
|
||||
Platform: Linux-5.10.0-10-amd64-x86_64-with-glibc2.31
|
||||
Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
|
||||
```
|
||||
|
||||
On Windows:
|
||||
|
||||
```
|
||||
twitch-dl 1.21.0
|
||||
Platform: Windows-10-10.0.19041-SP0
|
||||
Python 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
|
||||
```
|
55
docs/commands/info.md
Normal file
55
docs/commands/info.md
Normal file
@ -0,0 +1,55 @@
|
||||
<!-- ------------------- generated docs start ------------------- -->
|
||||
# twitch-dl info
|
||||
|
||||
Print information for a given Twitch URL, video ID or clip slug.
|
||||
|
||||
### USAGE
|
||||
|
||||
```
|
||||
twitch-dl info <video> [FLAGS]
|
||||
```
|
||||
|
||||
### ARGUMENTS
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="code"><video></td>
|
||||
<td>Video ID, clip slug, or URL</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### FLAGS
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="code">-j, --json</td>
|
||||
<td>Show results as JSON</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- ------------------- generated docs end ------------------- -->
|
||||
|
||||
### Examples
|
||||
|
||||
|
||||
Print info about a video:
|
||||
|
||||
```
|
||||
twitch-dl info 863849735
|
||||
```
|
||||
|
||||
Print info about a clip:
|
||||
|
||||
```
|
||||
twitch-dl info BusyBlushingCattleItsBoshyTime
|
||||
```
|
||||
|
||||
Print JSON encoded info:
|
||||
|
||||
```
|
||||
twitch-dl info BusyBlushingCattleItsBoshyTime --json
|
||||
```
|
108
docs/commands/videos.md
Normal file
108
docs/commands/videos.md
Normal file
@ -0,0 +1,108 @@
|
||||
<!-- ------------------- generated docs start ------------------- -->
|
||||
# twitch-dl videos
|
||||
|
||||
List videos for a channel.
|
||||
|
||||
### USAGE
|
||||
|
||||
```
|
||||
twitch-dl videos <channel_name> [FLAGS] [OPTIONS]
|
||||
```
|
||||
|
||||
### ARGUMENTS
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="code"><channel_name></td>
|
||||
<td>Name of the channel to list videos for.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### FLAGS
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="code">-a, --all</td>
|
||||
<td>Fetch all videos, overrides --limit</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-j, --json</td>
|
||||
<td>Show results as JSON. Ignores <code>--pager</code>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### OPTIONS
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="code">-g, --game</td>
|
||||
<td>Show videos of given game (can be given multiple times)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-l, --limit</td>
|
||||
<td>Number of videos to fetch. Defaults to 10.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-s, --sort</td>
|
||||
<td>Sorting order of videos. Defaults to <code>time</code>. Possible values: <code>views</code>, <code>time</code>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-t, --type</td>
|
||||
<td>Broadcast type. Defaults to <code>archive</code>. Possible values: <code>archive</code>, <code>highlight</code>, <code>upload</code>.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="code">-p, --pager</td>
|
||||
<td>Print videos in pages. Ignores <code>--limit</code>. Defaults to 10.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- ------------------- generated docs end ------------------- -->
|
||||
|
||||
### Examples
|
||||
|
||||
List recent channel videos (10 by default):
|
||||
|
||||
```
|
||||
twitch-dl videos bananasaurus_rex
|
||||
```
|
||||
|
||||
Limit to videos of one or more games:
|
||||
|
||||
```
|
||||
twitch-dl videos --game "doom eternal" --game "cave story" bananasaurus_rex
|
||||
```
|
||||
|
||||
List all channel videos at once:
|
||||
|
||||
```
|
||||
twitch-dl videos bananasaurus_rex --all
|
||||
```
|
||||
|
||||
List all channel videos in pages of 10:
|
||||
|
||||
```
|
||||
twitch-dl videos bananasaurus_rex --pager
|
||||
```
|
||||
|
||||
Page size can be adjusted by passing number of items per page:
|
||||
|
||||
```
|
||||
twitch-dl videos bananasaurus_rex --pager 5
|
||||
```
|
||||
|
||||
Returns all videos as a JSON list. Useful for scripting.
|
||||
|
||||
```
|
||||
twitch-dl videos bananasaurus_rex --json --all
|
||||
```
|
Reference in New Issue
Block a user