Skip to content

Commit 160ee42

Browse files
committed
help rewrite 9
1 parent 400af96 commit 160ee42

1 file changed

Lines changed: 41 additions & 43 deletions

File tree

docs/cli.md

Lines changed: 41 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -27,76 +27,74 @@ vsd [OPTIONS] <COMMAND>
2727

2828
| Command | Description |
2929
|---------|-------------|
30-
| `capture` | Capture playlists and subtitles requests from a website |
31-
| `extract` | Extract subtitles from fragmented MP4 files |
30+
| `capture` | Capture playlist requests from a website |
31+
| `extract` | Extract subtitles from a fragmented MP4 file |
3232
| `license` | Request content keys from a license server |
3333
| `merge` | Merge multiple media segments into a single file |
34-
| `save` | Download DASH and HLS playlists |
34+
| `save` | Download streams from DASH or HLS playlist |
3535

3636
**Global Options:**
3737

3838
| Flag | Description |
3939
|------|-------------|
40-
| `--color` | When to output colored text<br>*Possible values:* `auto`, `always`, `never`<br>*Default:* `auto` |
41-
| `-q, --quiet` | Silence all output and only log errors |
42-
| `-v, --verbose` | Increase verbosity (-v [debug], -vv [trace]). Default logging level is set to info |
40+
| `--color` | When to use colored output<br>*Possible values:* `auto`, `always`, `never`<br>*Default:* `auto` |
41+
| `-q, --quiet` | Suppress all output except errors |
42+
| `-v, --verbose` | Increase verbosity: `-v` (debug), `-vv` (trace). The default log level is `info` |
4343

4444
[↑ Back to top](#command-overview)
4545

4646
### `vsd capture`
4747

48-
Capture playlists and subtitles requests from a website.
48+
Capture playlist requests from a website.
4949

50-
Requires one of the following browsers to be installed:
50+
Requires any one of these browsers:
5151

5252
- [chrome](https://www.google.com/chrome)
5353
- [chromium](https://www.chromium.org/getting-involved/download-chromium)
5454

55-
This command launches an automated browser instance and listen on requests. Behavior may vary, and it may not work as expected on all websites. This is equivalent to manually doing:
55+
This command launches an automated browser instance and listen on network requests. Behavior may vary, and it may not work as expected on all websites. This is equivalent to manually doing:
5656

5757
Inspect -> Network -> Fetch/XHR -> Filter by extension -> Copy as cURL (bash)
5858

5959
```
60-
vsd capture [OPTIONS] <URL>
60+
vsd capture [OPTIONS] <INPUT>
6161
```
6262

6363
**Arguments:**
6464

65-
- `<URL>`: http(s):// *(required)*
65+
- `<INPUT>`: HTTP(S):// *(required)*
6666

6767
**Options:**
6868

6969
| Flag | Description |
7070
|------|-------------|
71-
| `--cookies` | Launch browser with cookies loaded from a netscape cookie file |
72-
| `--extensions` | List of file extensions to be filter out seperated by comma<br>*Default:* `.m3u,.m3u8,.mpd,.vtt,.ttml,.srt` |
73-
| `--headless` | Launch browser without a window |
71+
| `--cookies` | Launch browser with cookies (netscape cookie file) |
72+
| `--extensions` | List of file extensions to be filtered out separated by comma<br>*Default:* `.m3u,.m3u8,.mpd,.vtt,.ttml,.srt` |
73+
| `--headless` | Launch browser in headless mode (without a window) |
7474
| `--proxy` | Launch browser with a proxy |
75-
| `--resource-types` | List of resource types to be filter out seperated by commas<br>*Possible values:* `document`, `stylesheet`, `image`, `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`, `prefetch`, `eventsource`, `websocket`, `manifest`, `signedexchange`, `ping`, `cspviolationreport`, `preflight`, `fedcm`, `other`<br>*Default:* `fetch,xhr` |
76-
| `--save-cookies` | Save browser cookies in cookies.txt netscape cookie file |
75+
| `--resource-types` | List of resource types to be filtered out separated by comma<br>*Possible values:* `document`, `stylesheet`, `image`, `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`, `prefetch`, `eventsource`, `websocket`, `manifest`, `signedexchange`, `ping`, `cspviolationreport`, `preflight`, `fedcm`, `other`<br>*Default:* `fetch,xhr` |
76+
| `--save-cookies` | Save browser cookies in cookies.txt (netscape cookie file) |
7777

7878
[↑ Back to top](#command-overview)
7979

8080
### `vsd extract`
8181

82-
Extract subtitles from fragmented MP4 files
82+
Extract subtitles from a fragmented MP4 file
8383

8484
```
8585
vsd extract [OPTIONS] <INPUT>
8686
```
8787

8888
**Arguments:**
8989

90-
- `<INPUT>`: Path to an MP4 file containing WVTT (WebVTT) or STPP (TTML) subtitle boxes.
91-
92-
For fragmented MP4 files split across multiple segments, use the `merge` sub-command first to combine them into a single file. *(required)*
90+
- `<INPUT>`: Path to an MP4 file containing WVTT (WebVTT) or STPP (TTML) subtitle boxes. For fragmented MP4 files split across multiple segments, use the `merge` sub-command first to combine them into a single file *(required)*
9391

9492
**Options:**
9593

9694
| Flag | Description |
9795
|------|-------------|
9896
| `-c, --codec` | Output subtitle format<br>*Possible values:* `subrip`, `webvtt`<br>*Default:* `webvtt` |
99-
| `-o, --output` | Destination file path for extracted subtitles.<br><br>If provided, the codec is inferred from the file extension (`.srt` or `.vtt`). If omitted, subtitles are printed to stdout. |
97+
| `-o, --output` | Destination file path for extracted subtitles.<br><br>If `provided`, the codec is inferred from the file extension (`.srt` or `.vtt`). If `omitted`, subtitles are printed to stdout. |
10098

10199
[↑ Back to top](#command-overview)
102100

@@ -116,7 +114,7 @@ vsd license [OPTIONS] <INPUT>
116114

117115
| Flag | Description |
118116
|------|-------------|
119-
| `-H, --header` | Extra headers for license request in same format as curl.<br><br>This option can be used multiple times. |
117+
| `-H, --header` | Additional headers for license request in same format as curl.<br><br>This option can be used multiple times. |
120118

121119
**Playready Options:**
122120

@@ -161,59 +159,59 @@ At least two files must match the provided patterns. *(required)*
161159

162160
### `vsd save`
163161

164-
Download DASH and HLS playlists
162+
Download streams from DASH or HLS playlist
165163

166164
```
167165
vsd save [OPTIONS] <INPUT>
168166
```
169167

170168
**Arguments:**
171169

172-
- `<INPUT>`: http(s):// | .mpd | .xml | .m3u8 *(required)*
170+
- `<INPUT>`: HTTP(S):// | .M3U8 | .MPD *(required)*
173171

174172
**Options:**
175173

176174
| Flag | Description |
177175
|------|-------------|
178-
| `--base-url` | Base url to be used for building absolute url to segment. This flag is usually needed for local input files. By default redirected playlist url is used |
179-
| `-d, --directory` | Change directory path for temporarily downloaded files. By default current working directory is used |
180-
| `-o, --output` | Mux all downloaded streams to a video container (.mp4, .mkv, etc.) using ffmpeg. Note that existing files will be overwritten and downloaded streams will be deleted |
181-
| `--parse` | Parse playlist and returns it in json format. Note that --output flag is ignored when this flag is used |
182-
| `--subs-codec` | Force some specific subtitle codec when muxing through ffmpeg. By default `mov_text` is used for .mp4 and `copy` for others<br>*Default:* `copy` |
176+
| `--base-url` | Base URL for resolving relative segment paths.<br><br>Required for local playlist files. For remote playlists, the final redirected URL is used by default. |
177+
| `-d, --directory` | Working directory for temporary segment files.<br><br>Defaults to the current directory. |
178+
| `-o, --output` | Mux downloaded streams into a video container using ffmpeg (`.mp4`, `.mkv`, etc.).<br><br>Overwrites existing files and deletes intermediate stream files after muxing. |
179+
| `--parse` | Output parsed playlist metadata as JSON instead of downloading |
180+
| `--subs-codec` | Subtitle codec to use when muxing with ffmpeg.<br><br>Defaults to `mov_text` for `.mp4` containers, `copy` for others. |
183181

184182
**Automation Options:**
185183

186184
| Flag | Description |
187185
|------|-------------|
188-
| `-i, --interactive` | Prompt for custom streams selection with modern style input prompts. By default proceed with defaults |
189-
| `-I, --interactive-raw` | Prompt for custom streams selection with raw style input prompts. By default proceed with defaults |
190-
| `-l, --list-streams` | List all the streams present inside the playlist |
191-
| `-s, --select-streams` | Filters to be applied for automatic stream selection.<br><br>SYNTAX: `v={}:a={}:s={}` where `{}` (in priority order) can contain<br>\|> all: select all streams.<br>\|> skip: skip all streams or select inverter.<br>\|> 1,2: indices obtained by --list-streams flag.<br>\|> 1080p,1280x720: stream resolution.<br>\|> en,fr: stream language.<br><br>EXAMPLES:<br>\|> v=skip:a=skip:s=all (download all sub streams)<br>\|> a:en:s=en (prefer en lang)<br>\|> v=1080p:a=all:s=skip (1080p with all audio streams)<br><br>*Default:* `v=best:s=en` |
186+
| `-i, --interactive` | Enable interactive stream selection with styled prompts |
187+
| `-I, --interactive-raw` | Enable interactive stream selection with plain text prompts |
188+
| `-l, --list-streams` | Display all available streams without downloading |
189+
| `-s, --select-streams` | Stream selection filters for automatic mode.<br><br>SYNTAX:<br><br>`v={}:a={}:s={}` where `{}` (in priority order) can contain<br><br>\|> all: select all streams.<br>\|> skip: skip all streams or select inverter.<br>\|> 1,2: indices obtained by --list-streams flag.<br>\|> 1080p,1280x720: stream resolution.<br>\|> en,fr: stream language.<br><br>EXAMPLES:<br><br>\|> 1,2,3 (indices 1, 2, and 3)<br>\|> v=skip:a=skip:s=all (all sub streams)<br>\|> a:en:s=en (prefer en lang)<br>\|> v=1080p:a=all:s=skip (1080p with all aud streams)<br><br>*Default:* `v=best:s=en` |
192190

193191
**Client Options:**
194192

195193
| Flag | Description |
196194
|------|-------------|
197-
| `--cookies` | Fill request client with some existing cookies value. It should be a path to a file containing cookies in netscape format |
198-
| `-H, --header` | Extra headers for requests in same format as curl.<br><br>This option can be used multiple times. |
199-
| `--no-certificate-checks` | Skip checking and validation of site certificates |
200-
| `--proxy` | Set http(s) / socks proxy address for requests |
201-
| `--query` | Set query parameters for requests |
195+
| `--cookies` | Path to a netscape cookie file for authenticated requests |
196+
| `-H, --header` | Additional headers for requests in same format as curl.<br><br>This option can be used multiple times. |
197+
| `--no-certificate-checks` | Disable TLS certificate verification (insecure) |
198+
| `--proxy` | Proxy server URL (HTTP, HTTPS, or SOCKS) |
199+
| `--query` | Additional query parameters for requests |
202200

203201
**Decrypt Options:**
204202

205203
| Flag | Description |
206204
|------|-------------|
207-
| `--keys` | Keys for decrypting encrypted streams. KID:KEY should be specified in hex format |
208-
| `--no-decrypt` | Download encrypted streams without decrypting them. Note that --output flag is ignored if this flag is used |
205+
| `--keys` | Decryption keys in `KID:KEY;…` hex format |
206+
| `--no-decrypt` | Skip decryption and download encrypted streams as-is.<br><br>Ignores `--output` when enabled. |
209207

210208
**Download Options:**
211209

212210
| Flag | Description |
213211
|------|-------------|
214-
| `--no-merge` | Download streams without merging them. Note that --output flag is ignored if this flag is used |
215-
| `--retries` | Maximum number of retries to download an individual segment<br>*Default:* `10` |
216-
| `-t, --threads` | Total number of threads for parllel downloading of segments. Number of threads should be in range 1-16 (inclusive)<br>*Default:* `5` |
212+
| `--no-merge` | Skip segment merging and keep individual files.<br><br>Ignores `--output` when enabled. |
213+
| `--retries` | Maximum retry attempts per segment<br>*Default:* `10` |
214+
| `-t, --threads` | Number of concurrent download threads (1–16)<br>*Default:* `5` |
217215

218216
[↑ Back to top](#command-overview)
219217

0 commit comments

Comments
 (0)