@mux/cli 1.0.0-beta.6 → 1.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +467 -866
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
A command-line interface for interacting with the Mux API, designed to provide a first-class development experience for working with Mux services locally.
|
|
4
4
|
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Installation](#installation)
|
|
8
|
+
- [Shell Completions](#shell-completions)
|
|
9
|
+
- [Getting Started](#getting-started)
|
|
10
|
+
- [Common Options](#common-options)
|
|
11
|
+
- [Commands](#commands)
|
|
12
|
+
- [Asset Management](#asset-management)
|
|
13
|
+
- [Live Stream Management](#live-stream-management)
|
|
14
|
+
- [Uploads](#uploads)
|
|
15
|
+
- [Playback ID Lookup](#playback-id-lookup)
|
|
16
|
+
- [Playback Restrictions](#playback-restrictions)
|
|
17
|
+
- [Signing Keys & Secure Playback](#signing-keys--secure-playback)
|
|
18
|
+
- [Transcription Vocabularies](#transcription-vocabularies)
|
|
19
|
+
- [Delivery Usage](#delivery-usage)
|
|
20
|
+
- [DRM Configurations](#drm-configurations)
|
|
21
|
+
- [Mux Data](#mux-data)
|
|
22
|
+
- [Authentication & Environment Management](#authentication--environment-management)
|
|
23
|
+
- [Configuration](#configuration)
|
|
24
|
+
- [Development](#development)
|
|
25
|
+
- [License](#license)
|
|
26
|
+
- [Support](#support)
|
|
27
|
+
|
|
5
28
|
## Installation
|
|
6
29
|
|
|
7
30
|
### Install via npm
|
|
@@ -50,54 +73,64 @@ sudo mv mux /usr/local/bin/
|
|
|
50
73
|
|
|
51
74
|
The binary is self-contained and has no dependencies.
|
|
52
75
|
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
### Authentication
|
|
56
|
-
|
|
57
|
-
Before using the Mux CLI, you need to authenticate with your Mux API credentials. You can obtain these from the [Mux Dashboard](https://dashboard.mux.com/settings/access-tokens).
|
|
76
|
+
## Shell Completions
|
|
58
77
|
|
|
59
|
-
|
|
78
|
+
Enable tab completion for commands, subcommands, and options in your shell:
|
|
60
79
|
|
|
61
|
-
|
|
80
|
+
**Bash** (add to `~/.bashrc`):
|
|
81
|
+
```bash
|
|
82
|
+
source <(mux completions bash)
|
|
83
|
+
```
|
|
62
84
|
|
|
85
|
+
**Zsh** (add to `~/.zshrc`):
|
|
63
86
|
```bash
|
|
64
|
-
mux
|
|
87
|
+
source <(mux completions zsh)
|
|
65
88
|
```
|
|
66
89
|
|
|
67
|
-
|
|
90
|
+
**Fish** (add to `~/.config/fish/config.fish`):
|
|
91
|
+
```fish
|
|
92
|
+
source (mux completions fish | psub)
|
|
93
|
+
```
|
|
68
94
|
|
|
69
|
-
|
|
95
|
+
Restart your shell or source the config file to activate completions.
|
|
70
96
|
|
|
71
|
-
|
|
97
|
+
## Getting Started
|
|
72
98
|
|
|
73
|
-
|
|
74
|
-
mux login --env-file .env
|
|
75
|
-
```
|
|
99
|
+
### Authentication
|
|
76
100
|
|
|
77
|
-
|
|
101
|
+
Before using the Mux CLI, you need to authenticate with your Mux API credentials. You can obtain these from the [Mux Dashboard](https://dashboard.mux.com/settings/access-tokens).
|
|
78
102
|
|
|
79
103
|
```bash
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
#### Named Environments
|
|
104
|
+
# Interactive login (prompts for Token ID and Secret)
|
|
105
|
+
mux login
|
|
85
106
|
|
|
86
|
-
|
|
107
|
+
# Login with .env file (expects MUX_TOKEN_ID and MUX_TOKEN_SECRET)
|
|
108
|
+
mux login --env-file .env
|
|
87
109
|
|
|
88
|
-
|
|
89
|
-
# Add a production environment
|
|
110
|
+
# Named environments for multi-environment workflows
|
|
90
111
|
mux login --name production
|
|
91
|
-
|
|
92
|
-
# Add a staging environment
|
|
93
|
-
mux login --name staging
|
|
112
|
+
mux login --name staging --env-file .env.staging
|
|
94
113
|
```
|
|
95
114
|
|
|
96
|
-
The first environment you add becomes the default.
|
|
115
|
+
The first environment you add becomes the default. See [Authentication & Environment Management](#authentication--environment-management) for more details.
|
|
116
|
+
|
|
117
|
+
## Common Options
|
|
118
|
+
|
|
119
|
+
These options are available on most commands and are not repeated in individual command docs below.
|
|
120
|
+
|
|
121
|
+
| Option | Description |
|
|
122
|
+
|--------|-------------|
|
|
123
|
+
| `--json` | Output raw JSON instead of pretty-printed format. Useful for scripting and piping to `jq`. |
|
|
124
|
+
| `--compact` | One-line-per-item output, grep-friendly. Available on `list` commands. |
|
|
125
|
+
| `--limit <n>` | Number of results to return (default: 25). Available on `list` commands. |
|
|
126
|
+
| `--page <n>` | Page number for pagination (default: 1). Available on `list` commands. |
|
|
127
|
+
| `-f, --force` | Skip confirmation prompts on destructive actions. **Required** when combining `--json` with `delete` commands. |
|
|
128
|
+
| `--wait` | Poll until the resource is ready before returning. Available on `create` commands. |
|
|
97
129
|
|
|
98
130
|
## Commands
|
|
99
131
|
|
|
100
|
-
|
|
132
|
+
<details open>
|
|
133
|
+
<summary><h3>Asset Management</h3></summary>
|
|
101
134
|
|
|
102
135
|
#### `mux assets create`
|
|
103
136
|
|
|
@@ -105,45 +138,30 @@ Create a new Mux video asset from a URL, local file, or JSON configuration.
|
|
|
105
138
|
|
|
106
139
|
**Options:**
|
|
107
140
|
- `--url <url>` - Video URL to ingest from the web
|
|
108
|
-
- `--upload <path>` - Local file(s) to upload (supports glob patterns like `*.mp4`
|
|
141
|
+
- `--upload <path>` - Local file(s) to upload (supports glob patterns like `*.mp4`)
|
|
109
142
|
- `--file, -f <path>` - JSON configuration file for complex asset creation
|
|
110
|
-
- `--playback-policy <policy>` -
|
|
143
|
+
- `--playback-policy <policy>` - `public` or `signed` (repeatable)
|
|
111
144
|
- `--test` - Create test asset (watermarked, 10s limit, deleted after 24h)
|
|
112
145
|
- `--passthrough <string>` - User metadata (max 255 characters)
|
|
113
|
-
- `--static-renditions <resolution>` -
|
|
114
|
-
- `--video-quality <quality>` -
|
|
146
|
+
- `--static-renditions <resolution>` - e.g. `1080p`, `720p`, `highest`, `audio-only` (repeatable)
|
|
147
|
+
- `--video-quality <quality>` - `basic`, `plus`, or `premium`
|
|
115
148
|
- `--normalize-audio` - Normalize audio loudness level
|
|
116
149
|
- `-y, --yes` - Skip confirmation prompts
|
|
117
|
-
- `--json` - Output JSON instead of pretty format
|
|
118
|
-
- `--wait` - Wait for asset processing to complete (polls until ready)
|
|
119
150
|
|
|
120
151
|
**Examples:**
|
|
121
152
|
|
|
122
153
|
```bash
|
|
123
|
-
# Create
|
|
154
|
+
# Create from URL
|
|
124
155
|
mux assets create --url https://example.com/video.mp4 --playback-policy public
|
|
125
156
|
|
|
126
|
-
# Upload
|
|
127
|
-
mux assets create --upload video.mp4 --playback-policy public --test
|
|
128
|
-
|
|
129
|
-
# Upload multiple files with glob pattern
|
|
157
|
+
# Upload local files (glob supported, each file becomes a separate asset)
|
|
130
158
|
mux assets create --upload ./videos/*.mp4 --playback-policy public
|
|
131
|
-
# Shows confirmation prompt with file list and total size
|
|
132
|
-
|
|
133
|
-
# Skip confirmation for multiple files
|
|
134
|
-
mux assets create --upload ./videos/*.mp4 --playback-policy public -y
|
|
135
159
|
|
|
136
|
-
#
|
|
160
|
+
# Complex config from JSON file (overlays, subtitles, multiple inputs)
|
|
137
161
|
mux assets create --file asset-config.json
|
|
138
162
|
|
|
139
|
-
#
|
|
140
|
-
mux assets create --file asset-config.json --test --playback-policy signed
|
|
141
|
-
|
|
142
|
-
# Wait for asset to be ready
|
|
163
|
+
# Wait for processing to complete
|
|
143
164
|
mux assets create --url https://example.com/video.mp4 --playback-policy public --wait
|
|
144
|
-
|
|
145
|
-
# Get JSON output for scripting
|
|
146
|
-
mux assets create --url https://example.com/video.mp4 --playback-policy public --json
|
|
147
165
|
```
|
|
148
166
|
|
|
149
167
|
**JSON Configuration File:**
|
|
@@ -164,10 +182,7 @@ For complex asset creation (overlays, subtitles, multiple input tracks), use a J
|
|
|
164
182
|
"opacity": "80%"
|
|
165
183
|
},
|
|
166
184
|
"generated_subtitles": [
|
|
167
|
-
{
|
|
168
|
-
"language_code": "en",
|
|
169
|
-
"name": "English"
|
|
170
|
-
}
|
|
185
|
+
{ "language_code": "en", "name": "English" }
|
|
171
186
|
]
|
|
172
187
|
}
|
|
173
188
|
],
|
|
@@ -179,1072 +194,672 @@ For complex asset creation (overlays, subtitles, multiple input tracks), use a J
|
|
|
179
194
|
}
|
|
180
195
|
```
|
|
181
196
|
|
|
182
|
-
Then create the asset:
|
|
183
|
-
|
|
184
197
|
```bash
|
|
185
198
|
mux assets create --file asset-config.json
|
|
186
199
|
```
|
|
187
200
|
|
|
188
|
-
**Multiple File Uploads:**
|
|
189
|
-
|
|
190
|
-
When using glob patterns, each file creates a separate asset:
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
mux assets create --upload ./videos/*.mp4 --playback-policy public
|
|
194
|
-
# Creates 3 separate assets if 3 files match
|
|
195
|
-
|
|
196
|
-
# Output:
|
|
197
|
-
# Found 3 files to upload:
|
|
198
|
-
# - intro.mp4 (45.2 MB)
|
|
199
|
-
# - main.mp4 (128.7 MB)
|
|
200
|
-
# - outro.mp4 (23.1 MB)
|
|
201
|
-
# Total size: 197.1 MB
|
|
202
|
-
# Continue with upload? (y/n):
|
|
203
|
-
```
|
|
204
|
-
|
|
205
201
|
#### `mux assets list`
|
|
206
202
|
|
|
207
|
-
List all video assets with pagination and filtering
|
|
208
|
-
|
|
209
|
-
**Options:**
|
|
210
|
-
- `--limit <number>` - Number of results to return (default: 25)
|
|
211
|
-
- `--page <number>` - Page number for pagination (default: 1)
|
|
212
|
-
- `--upload-id <id>` - Filter assets by upload ID
|
|
213
|
-
- `--live-stream-id <id>` - Filter assets by live stream ID
|
|
214
|
-
- `--json` - Output JSON instead of pretty format
|
|
215
|
-
- `--compact` - Output one line per asset in grep-friendly format
|
|
203
|
+
List all video assets with pagination and filtering.
|
|
216
204
|
|
|
217
|
-
**
|
|
205
|
+
**Unique options:**
|
|
206
|
+
- `--upload-id <id>` - Filter by upload ID
|
|
207
|
+
- `--live-stream-id <id>` - Filter by live stream ID
|
|
218
208
|
|
|
219
209
|
```bash
|
|
220
|
-
# List assets with default settings (25 assets, page 1)
|
|
221
210
|
mux assets list
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
mux assets list --limit 10
|
|
225
|
-
|
|
226
|
-
# List second page of results
|
|
227
|
-
mux assets list --page 2
|
|
228
|
-
|
|
229
|
-
# Filter by upload ID
|
|
230
|
-
mux assets list --upload-id abc123xyz
|
|
231
|
-
|
|
232
|
-
# Get JSON output for scripting
|
|
233
|
-
mux assets list --json
|
|
234
|
-
|
|
235
|
-
# Get compact output for grep and parsing
|
|
236
|
-
mux assets list --compact
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
**Output (default pretty format):**
|
|
240
|
-
|
|
241
|
-
```
|
|
242
|
-
Found 3 asset(s):
|
|
243
|
-
|
|
244
|
-
sRkgb02SMJOjf72PFIkegcrZR3knHPEPG ready 0:09 07/25 14:16
|
|
245
|
-
Details:
|
|
246
|
-
├─ Aspect Ratio: 240:427
|
|
247
|
-
├─ Resolution: 720p
|
|
248
|
-
└─ Quality: plus
|
|
249
|
-
Meta:
|
|
250
|
-
└─ Title: golf-swing
|
|
251
|
-
Playback IDs:
|
|
252
|
-
├─ 🔓 rFHdcXSf95EHT32qYnf6ZnBz01D7VyKR4
|
|
253
|
-
└─ 🔒 qo5Y6CpYtdZBgQlI6VskadqdNcQQVdPh
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
**Output (with --compact flag):**
|
|
257
|
-
|
|
258
|
-
```
|
|
259
|
-
sRkgb02SMJOjf72PFIkegcrZR3knHPEPG ready 0:09 07/25 14:16 720p "golf-swing" public,signed -
|
|
211
|
+
mux assets list --limit 10 --page 2
|
|
212
|
+
mux assets list --live-stream-id abc123
|
|
260
213
|
```
|
|
261
214
|
|
|
262
215
|
#### `mux assets get <asset-id>`
|
|
263
216
|
|
|
264
217
|
Get detailed information about a specific video asset.
|
|
265
218
|
|
|
266
|
-
**Arguments:**
|
|
267
|
-
- `<asset-id>` - The ID of the asset to retrieve
|
|
268
|
-
|
|
269
|
-
**Options:**
|
|
270
|
-
- `--json` - Output JSON instead of pretty format
|
|
271
|
-
|
|
272
|
-
**Examples:**
|
|
273
|
-
|
|
274
219
|
```bash
|
|
275
|
-
# Get asset details
|
|
276
220
|
mux assets get abc123xyz
|
|
277
|
-
|
|
278
|
-
# Get asset details as JSON
|
|
279
|
-
mux assets get abc123xyz --json
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
**Output:**
|
|
283
|
-
|
|
284
|
-
```
|
|
285
|
-
Asset ID: abc123xyz
|
|
286
|
-
Status: ready
|
|
287
|
-
Duration: 120.45s
|
|
288
|
-
Created: 1234567890
|
|
289
|
-
Aspect Ratio: 16:9
|
|
290
|
-
Resolution Tier: 1080p
|
|
291
|
-
Video Quality: plus
|
|
292
|
-
Max Resolution: HD
|
|
293
|
-
Max Frame Rate: 30.00 fps
|
|
294
|
-
|
|
295
|
-
Playback IDs:
|
|
296
|
-
- playback123 (public)
|
|
297
|
-
URL: https://stream.mux.com/playback123.m3u8
|
|
298
|
-
|
|
299
|
-
Tracks:
|
|
300
|
-
- audio: audio_track_id
|
|
301
|
-
Duration: 120.45s
|
|
302
|
-
- video: video_track_id
|
|
303
|
-
Duration: 120.45s
|
|
304
|
-
|
|
305
|
-
Passthrough: my-video-metadata
|
|
306
|
-
|
|
307
|
-
WARNING: This is a test asset (will be deleted after 24 hours)
|
|
308
221
|
```
|
|
309
222
|
|
|
310
223
|
#### `mux assets update <asset-id>`
|
|
311
224
|
|
|
312
|
-
Update metadata fields on a video asset.
|
|
313
|
-
|
|
314
|
-
**Arguments:**
|
|
315
|
-
- `<asset-id>` - The ID of the asset to update
|
|
225
|
+
Update metadata fields on a video asset. At least one field flag must be provided.
|
|
316
226
|
|
|
317
227
|
**Options:**
|
|
318
228
|
- `--title <string>` - Set `meta.title` (max 512 characters)
|
|
319
229
|
- `--creator-id <string>` - Set `meta.creator_id` (max 128 characters)
|
|
320
230
|
- `--external-id <string>` - Set `meta.external_id` (max 128 characters)
|
|
321
231
|
- `--passthrough <string>` - Set `passthrough` (max 255 characters)
|
|
322
|
-
- `--json` - Output JSON instead of pretty format
|
|
323
|
-
|
|
324
|
-
At least one field flag must be provided.
|
|
325
|
-
|
|
326
|
-
**Examples:**
|
|
327
232
|
|
|
328
233
|
```bash
|
|
329
|
-
|
|
330
|
-
mux assets update abc123xyz --title "
|
|
331
|
-
|
|
332
|
-
# Set multiple fields at once
|
|
333
|
-
mux assets update abc123xyz --title "My Video" --creator-id "user-42" --external-id "vid-001"
|
|
334
|
-
|
|
335
|
-
# Update passthrough metadata
|
|
336
|
-
mux assets update abc123xyz --passthrough "my-custom-metadata"
|
|
337
|
-
|
|
338
|
-
# Clear a field by passing an empty string
|
|
339
|
-
mux assets update abc123xyz --title ""
|
|
340
|
-
|
|
341
|
-
# Get JSON output
|
|
342
|
-
mux assets update abc123xyz --title "My Video" --json
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
**Output:**
|
|
346
|
-
|
|
347
|
-
```
|
|
348
|
-
Asset updated successfully.
|
|
349
|
-
|
|
350
|
-
Asset ID: abc123xyz
|
|
351
|
-
Status: ready
|
|
352
|
-
Duration: 120.45s
|
|
353
|
-
...
|
|
234
|
+
mux assets update abc123xyz --title "My Video" --creator-id "user-42"
|
|
235
|
+
mux assets update abc123xyz --title "" # clear a field
|
|
354
236
|
```
|
|
355
237
|
|
|
356
238
|
#### `mux assets delete <asset-id>`
|
|
357
239
|
|
|
358
240
|
Delete a video asset permanently.
|
|
359
241
|
|
|
360
|
-
**Arguments:**
|
|
361
|
-
- `<asset-id>` - The ID of the asset to delete
|
|
362
|
-
|
|
363
|
-
**Options:**
|
|
364
|
-
- `-f, --force` - Skip confirmation prompt
|
|
365
|
-
- `--json` - Output JSON instead of pretty format
|
|
366
|
-
|
|
367
|
-
**Examples:**
|
|
368
|
-
|
|
369
242
|
```bash
|
|
370
|
-
|
|
371
|
-
mux assets delete abc123xyz
|
|
372
|
-
|
|
373
|
-
# Delete asset without confirmation
|
|
374
|
-
mux assets delete abc123xyz --force
|
|
375
|
-
|
|
376
|
-
# Delete asset with JSON output (requires --force for safety)
|
|
377
|
-
mux assets delete abc123xyz --json --force
|
|
243
|
+
mux assets delete abc123xyz # with confirmation prompt
|
|
244
|
+
mux assets delete abc123xyz --force # skip confirmation
|
|
378
245
|
```
|
|
379
246
|
|
|
380
|
-
|
|
247
|
+
#### `mux assets manage`
|
|
381
248
|
|
|
382
|
-
|
|
249
|
+
Interactive terminal UI (TUI) to browse assets, view details, manage playback IDs, and copy URLs. Navigate with arrow keys, Enter, and `q` to quit.
|
|
383
250
|
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
Asset abc123xyz deleted successfully
|
|
251
|
+
```bash
|
|
252
|
+
mux assets manage
|
|
387
253
|
```
|
|
388
254
|
|
|
389
|
-
|
|
255
|
+
**Note:** Requires an interactive terminal (TTY). For scripting, use `mux assets list`, `mux assets get`, etc.
|
|
390
256
|
|
|
391
|
-
|
|
257
|
+
#### `mux assets input-info <asset-id>`
|
|
392
258
|
|
|
393
|
-
|
|
259
|
+
Retrieve input info for an asset, including file details, tracks, and encoding settings.
|
|
394
260
|
|
|
395
261
|
```bash
|
|
396
|
-
|
|
397
|
-
mux assets manage
|
|
262
|
+
mux assets input-info abc123xyz
|
|
398
263
|
```
|
|
399
264
|
|
|
400
|
-
|
|
265
|
+
#### `mux assets update-master-access <asset-id>`
|
|
401
266
|
|
|
402
|
-
|
|
403
|
-
- View detailed asset information
|
|
404
|
-
- Create and delete playback IDs
|
|
405
|
-
- Copy stream URLs (HLS) to clipboard
|
|
406
|
-
- Copy player URLs to clipboard
|
|
407
|
-
- Delete assets with confirmation
|
|
408
|
-
- Automatic URL signing for signed playback policies
|
|
267
|
+
Update master access settings for an asset (`temporary` or `none`).
|
|
409
268
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
- **Enter** - Select an asset or action
|
|
414
|
-
- **q** - Quit or go back to previous view
|
|
415
|
-
- **Escape** - Cancel current operation
|
|
416
|
-
|
|
417
|
-
**Note:** This command requires an interactive terminal (TTY). For scripting and non-interactive use cases, use `mux assets list`, `mux assets get`, and related commands instead.
|
|
269
|
+
```bash
|
|
270
|
+
mux assets update-master-access abc123xyz --master-access temporary
|
|
271
|
+
```
|
|
418
272
|
|
|
419
273
|
#### Playback ID Management
|
|
420
274
|
|
|
421
|
-
|
|
275
|
+
Manage playback IDs on assets. Each asset can have multiple playback IDs with different policies.
|
|
422
276
|
|
|
423
|
-
|
|
277
|
+
```bash
|
|
278
|
+
mux assets playback-ids list <asset-id>
|
|
279
|
+
mux assets playback-ids create <asset-id> [--policy signed]
|
|
280
|
+
mux assets playback-ids delete <asset-id> <playback-id> [--force]
|
|
281
|
+
```
|
|
424
282
|
|
|
425
|
-
|
|
283
|
+
#### Static Renditions Management
|
|
426
284
|
|
|
427
|
-
|
|
428
|
-
- `<asset-id>` - The ID of the asset
|
|
285
|
+
Static renditions are downloadable MP4 versions of your video assets at specific resolutions.
|
|
429
286
|
|
|
430
|
-
|
|
431
|
-
|
|
287
|
+
```bash
|
|
288
|
+
mux assets static-renditions list <asset-id>
|
|
289
|
+
mux assets static-renditions create <asset-id> --resolution 1080p [--wait]
|
|
290
|
+
mux assets static-renditions delete <asset-id> <rendition-id> [--force]
|
|
291
|
+
```
|
|
432
292
|
|
|
433
|
-
**
|
|
293
|
+
**Resolution options:** `highest`, `audio-only`, `2160p`, `1440p`, `1080p`, `720p`, `540p`, `480p`, `360p`, `270p`
|
|
434
294
|
|
|
435
|
-
|
|
436
|
-
# List playback IDs for an asset
|
|
437
|
-
mux assets playback-ids list abc123xyz
|
|
295
|
+
#### Track Management
|
|
438
296
|
|
|
439
|
-
|
|
440
|
-
mux assets playback-ids list abc123xyz --json
|
|
441
|
-
```
|
|
297
|
+
Manage text and audio tracks (subtitles, captions, audio) on video assets.
|
|
442
298
|
|
|
443
|
-
|
|
299
|
+
##### `mux assets tracks create <asset-id>`
|
|
444
300
|
|
|
445
|
-
|
|
446
|
-
Found 2 playback ID(s) for asset abc123xyz:
|
|
301
|
+
Add a text or audio track to an asset.
|
|
447
302
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
303
|
+
**Options:**
|
|
304
|
+
- `--url <url>` - URL of the track file (required)
|
|
305
|
+
- `--type <type>` - Track type: `text` or `audio` (required)
|
|
306
|
+
- `--language-code <code>` - BCP 47 language code, e.g., `en-US` (required)
|
|
307
|
+
- `--name <name>` - Human-readable name for the track
|
|
308
|
+
- `--text-type <type>` - Text track type: `subtitles` or `captions`
|
|
309
|
+
- `--closed-captions` - Indicates the track provides SDH
|
|
310
|
+
- `--passthrough <string>` - Passthrough metadata (max 255 characters)
|
|
451
311
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
URL: https://stream.mux.com/playback456.m3u8
|
|
312
|
+
```bash
|
|
313
|
+
mux assets tracks create abc123xyz --url https://example.com/subs.vtt --type text --language-code en --text-type subtitles
|
|
455
314
|
```
|
|
456
315
|
|
|
457
|
-
##### `mux assets
|
|
316
|
+
##### `mux assets tracks delete <asset-id> <track-id>`
|
|
458
317
|
|
|
459
|
-
|
|
318
|
+
Delete a track from an asset. Supports `--force`.
|
|
460
319
|
|
|
461
|
-
|
|
462
|
-
- `<asset-id>` - The ID of the asset
|
|
320
|
+
##### `mux assets tracks generate-subtitles <asset-id> <track-id>`
|
|
463
321
|
|
|
464
|
-
|
|
465
|
-
- `--policy <policy>` - Playback policy: `public` or `signed` (default: `public`)
|
|
466
|
-
- `--json` - Output JSON instead of pretty format
|
|
322
|
+
Generate subtitles for an audio track using automatic speech recognition.
|
|
467
323
|
|
|
468
|
-
**
|
|
324
|
+
**Options:** `--language-code <code>`, `--name <name>`, `--passthrough <string>`
|
|
469
325
|
|
|
470
326
|
```bash
|
|
471
|
-
|
|
472
|
-
mux assets playback-ids create abc123xyz
|
|
473
|
-
|
|
474
|
-
# Create a signed playback ID
|
|
475
|
-
mux assets playback-ids create abc123xyz --policy signed
|
|
476
|
-
|
|
477
|
-
# Get JSON output
|
|
478
|
-
mux assets playback-ids create abc123xyz --policy public --json
|
|
327
|
+
mux assets tracks generate-subtitles abc123xyz track456 --language-code en --name "English (auto)"
|
|
479
328
|
```
|
|
480
329
|
|
|
481
|
-
|
|
330
|
+
</details>
|
|
482
331
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
Policy: public
|
|
486
|
-
URL: https://stream.mux.com/playback123.m3u8
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
##### `mux assets playback-ids delete <asset-id> <playback-id>`
|
|
332
|
+
<details>
|
|
333
|
+
<summary><h3>Live Stream Management</h3></summary>
|
|
490
334
|
|
|
491
|
-
|
|
335
|
+
#### `mux live create`
|
|
492
336
|
|
|
493
|
-
|
|
494
|
-
- `<asset-id>` - The ID of the asset
|
|
495
|
-
- `<playback-id>` - The ID of the playback ID to delete
|
|
337
|
+
Create a new Mux live stream for broadcasting.
|
|
496
338
|
|
|
497
339
|
**Options:**
|
|
498
|
-
-
|
|
499
|
-
- `--
|
|
500
|
-
|
|
501
|
-
|
|
340
|
+
- `--playback-policy <policy>` - `public` or `signed` (repeatable)
|
|
341
|
+
- `--new-asset-settings <settings>` - Auto-create asset from stream. Use `none` to disable, or JSON string (e.g., `'{"playback_policies": ["public"]}'`)
|
|
342
|
+
- `--reconnect-window <seconds>` - Reconnect timeout (default: 60)
|
|
343
|
+
- `--latency-mode <mode>` - `low`, `reduced`, or `standard` (default: `low`)
|
|
344
|
+
- `--test` - Create test stream (deleted after 24h)
|
|
502
345
|
|
|
503
346
|
```bash
|
|
504
|
-
|
|
505
|
-
mux
|
|
347
|
+
mux live create --playback-policy public
|
|
348
|
+
mux live create --playback-policy public --latency-mode low --test
|
|
349
|
+
mux live create --playback-policy public --new-asset-settings '{"playback_policies": ["public"]}'
|
|
350
|
+
```
|
|
506
351
|
|
|
507
|
-
|
|
508
|
-
|
|
352
|
+
Once created, stream using:
|
|
353
|
+
- **RTMP URL:** `rtmp://global-live.mux.com/app`
|
|
354
|
+
- **Stream Key:** returned in the response
|
|
509
355
|
|
|
510
|
-
|
|
511
|
-
mux assets playback-ids delete abc123xyz playback123 --force --json
|
|
512
|
-
```
|
|
356
|
+
#### `mux live list`
|
|
513
357
|
|
|
514
|
-
|
|
358
|
+
List all live streams with pagination.
|
|
515
359
|
|
|
516
|
-
```
|
|
517
|
-
|
|
518
|
-
|
|
360
|
+
```bash
|
|
361
|
+
mux live list
|
|
362
|
+
mux live list --limit 10 --compact
|
|
519
363
|
```
|
|
520
364
|
|
|
521
|
-
####
|
|
365
|
+
#### `mux live get <stream-id>`
|
|
522
366
|
|
|
523
|
-
|
|
367
|
+
Get detailed information about a specific live stream.
|
|
524
368
|
|
|
525
|
-
|
|
369
|
+
```bash
|
|
370
|
+
mux live get abc123xyz
|
|
371
|
+
```
|
|
526
372
|
|
|
527
|
-
|
|
373
|
+
#### `mux live update <stream-id>`
|
|
528
374
|
|
|
529
|
-
|
|
530
|
-
- `<asset-id>` - The ID of the asset
|
|
375
|
+
Update configuration on a live stream. At least one option must be provided.
|
|
531
376
|
|
|
532
377
|
**Options:**
|
|
533
|
-
- `--
|
|
534
|
-
|
|
535
|
-
|
|
378
|
+
- `--latency-mode <mode>` - `low`, `reduced`, or `standard`
|
|
379
|
+
- `--reconnect-window <seconds>` - Reconnect window (0-1800)
|
|
380
|
+
- `--max-continuous-duration <seconds>` - Max continuous duration (60-43200)
|
|
381
|
+
- `--passthrough <string>` - Passthrough metadata (max 255 characters)
|
|
382
|
+
- `--reconnect-slate-url <url>` - Image to display during reconnect
|
|
383
|
+
- `--use-slate-for-standard-latency` - Display slate for standard latency streams
|
|
384
|
+
- `--title <string>` - Title for the live stream
|
|
536
385
|
|
|
537
386
|
```bash
|
|
538
|
-
|
|
539
|
-
mux
|
|
540
|
-
|
|
541
|
-
# Get JSON output
|
|
542
|
-
mux assets static-renditions list abc123xyz --json
|
|
387
|
+
mux live update abc123xyz --latency-mode standard
|
|
388
|
+
mux live update abc123xyz --reconnect-window 300 --title "My Stream"
|
|
543
389
|
```
|
|
544
390
|
|
|
545
|
-
|
|
391
|
+
#### `mux live delete <stream-id>`
|
|
546
392
|
|
|
547
|
-
|
|
548
|
-
Static renditions for asset abc123xyz:
|
|
393
|
+
Delete a live stream permanently.
|
|
549
394
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
ID: rendition456
|
|
395
|
+
```bash
|
|
396
|
+
mux live delete abc123xyz # with confirmation
|
|
397
|
+
mux live delete abc123xyz --force # skip confirmation
|
|
554
398
|
```
|
|
555
399
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
Create a new static rendition for an asset.
|
|
559
|
-
|
|
560
|
-
**Arguments:**
|
|
561
|
-
- `<asset-id>` - The ID of the asset
|
|
400
|
+
#### `mux live complete <stream-id>`
|
|
562
401
|
|
|
563
|
-
|
|
564
|
-
- `-r, --resolution <resolution>` - Target resolution (required): `highest`, `audio-only`, `2160p`, `1440p`, `1080p`, `720p`, `540p`, `480p`, `360p`, `270p`
|
|
565
|
-
- `-p, --passthrough <string>` - Custom metadata for the rendition (max 255 characters)
|
|
566
|
-
- `-w, --wait` - Wait for the rendition to be ready instead of returning immediately
|
|
567
|
-
- `--json` - Output JSON instead of pretty format
|
|
402
|
+
Signal that a live stream has ended and Mux should complete the recording.
|
|
568
403
|
|
|
569
|
-
|
|
404
|
+
#### `mux live enable <stream-id>`
|
|
570
405
|
|
|
571
|
-
|
|
572
|
-
# Create a 1080p rendition
|
|
573
|
-
mux assets static-renditions create abc123xyz --resolution 1080p
|
|
406
|
+
Enable a disabled live stream, allowing it to accept new connections.
|
|
574
407
|
|
|
575
|
-
|
|
576
|
-
mux assets static-renditions create abc123xyz --resolution 720p --wait
|
|
408
|
+
#### `mux live disable <stream-id>`
|
|
577
409
|
|
|
578
|
-
|
|
579
|
-
mux assets static-renditions create abc123xyz --resolution 1080p --passthrough "web-download"
|
|
410
|
+
Disable a live stream, preventing it from accepting new connections.
|
|
580
411
|
|
|
581
|
-
|
|
582
|
-
mux
|
|
412
|
+
```bash
|
|
413
|
+
mux live complete abc123xyz
|
|
414
|
+
mux live enable abc123xyz
|
|
415
|
+
mux live disable abc123xyz
|
|
583
416
|
```
|
|
584
417
|
|
|
585
|
-
|
|
418
|
+
#### `mux live reset-stream-key <stream-id>`
|
|
586
419
|
|
|
587
|
-
|
|
588
|
-
Static rendition created:
|
|
589
|
-
ID: rendition123
|
|
590
|
-
Name: 1080p.mp4
|
|
591
|
-
Resolution: 1080p
|
|
592
|
-
Status: preparing
|
|
420
|
+
Reset the stream key for a live stream. This invalidates the current key.
|
|
593
421
|
|
|
594
|
-
|
|
422
|
+
```bash
|
|
423
|
+
mux live reset-stream-key abc123xyz # with confirmation
|
|
424
|
+
mux live reset-stream-key abc123xyz --force # skip confirmation
|
|
595
425
|
```
|
|
596
426
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
Delete a static rendition from an asset.
|
|
600
|
-
|
|
601
|
-
**Arguments:**
|
|
602
|
-
- `<asset-id>` - The ID of the asset
|
|
603
|
-
- `<rendition-id>` - The ID of the rendition to delete
|
|
604
|
-
|
|
605
|
-
**Options:**
|
|
606
|
-
- `-f, --force` - Skip confirmation prompt
|
|
607
|
-
- `--json` - Output JSON instead of pretty format
|
|
427
|
+
#### Simulcast Targets
|
|
608
428
|
|
|
609
|
-
|
|
429
|
+
Manage simulcast targets to restream a live stream to third-party platforms (e.g., YouTube, Twitch).
|
|
610
430
|
|
|
611
431
|
```bash
|
|
612
|
-
#
|
|
613
|
-
mux
|
|
432
|
+
# Create a simulcast target
|
|
433
|
+
mux live simulcast-targets create <stream-id> --url rtmp://live.twitch.tv/app --stream-key live_xxxxx
|
|
614
434
|
|
|
615
|
-
#
|
|
616
|
-
mux
|
|
435
|
+
# Get details about a simulcast target
|
|
436
|
+
mux live simulcast-targets get <stream-id> <target-id>
|
|
617
437
|
|
|
618
|
-
# Delete
|
|
619
|
-
mux
|
|
438
|
+
# Delete a simulcast target
|
|
439
|
+
mux live simulcast-targets delete <stream-id> <target-id> [--force]
|
|
620
440
|
```
|
|
621
441
|
|
|
622
|
-
|
|
442
|
+
#### Embedded & Generated Subtitles
|
|
623
443
|
|
|
624
|
-
|
|
625
|
-
Are you sure you want to delete static rendition rendition123? (y/n): y
|
|
626
|
-
Static rendition rendition123 deleted from asset abc123xyz
|
|
627
|
-
```
|
|
444
|
+
##### `mux live update-embedded-subtitles <stream-id>`
|
|
628
445
|
|
|
629
|
-
|
|
446
|
+
Update embedded subtitle (CEA-608) configuration.
|
|
630
447
|
|
|
631
|
-
|
|
448
|
+
**Options:** `--language-channel <cc1|cc2|cc3|cc4>`, `--language-code <code>`, `--name <name>`, `--passthrough <string>`, `--clear`
|
|
632
449
|
|
|
633
|
-
|
|
450
|
+
```bash
|
|
451
|
+
mux live update-embedded-subtitles abc123xyz --language-channel cc1 --language-code en --name "English CC"
|
|
452
|
+
```
|
|
634
453
|
|
|
635
|
-
|
|
636
|
-
- `--playback-policy <policy>` - Playback policy: `public` or `signed` (can be specified multiple times)
|
|
637
|
-
- `--new-asset-settings <settings>` - Automatically create an asset from this live stream. Use `none` to disable, or provide a JSON string with asset settings (e.g., `'{"playback_policies": ["public"]}'`)
|
|
638
|
-
- `--reconnect-window <seconds>` - Time in seconds a stream can be disconnected before being considered finished (default: 60)
|
|
639
|
-
- `--latency-mode <mode>` - Latency mode: `low`, `reduced`, or `standard` (default: `low`)
|
|
640
|
-
- `--test` - Create test live stream (deleted after 24h)
|
|
641
|
-
- `--json` - Output JSON instead of pretty format
|
|
454
|
+
##### `mux live update-generated-subtitles <stream-id>`
|
|
642
455
|
|
|
643
|
-
|
|
456
|
+
Update generated subtitle (ASR) configuration.
|
|
644
457
|
|
|
645
|
-
|
|
646
|
-
# Create a basic live stream with public playback
|
|
647
|
-
mux live create --playback-policy public
|
|
458
|
+
**Options:** `--language-code <code>`, `--name <name>`, `--passthrough <string>`, `--transcription-vocabulary-ids <id>` (repeatable), `--clear`
|
|
648
459
|
|
|
649
|
-
|
|
650
|
-
mux live
|
|
460
|
+
```bash
|
|
461
|
+
mux live update-generated-subtitles abc123xyz --language-code en --name "English (auto)"
|
|
462
|
+
```
|
|
651
463
|
|
|
652
|
-
|
|
653
|
-
mux live create --playback-policy public --new-asset-settings '{"playback_policies": ["public"]}'
|
|
464
|
+
#### New Asset Static Renditions
|
|
654
465
|
|
|
655
|
-
|
|
656
|
-
mux live create --playback-policy public --test
|
|
466
|
+
Configure static rendition settings for assets automatically created from a live stream.
|
|
657
467
|
|
|
658
|
-
|
|
659
|
-
|
|
468
|
+
```bash
|
|
469
|
+
# Set rendition resolutions
|
|
470
|
+
mux live update-new-asset-static-renditions <stream-id> --resolution 1080p --resolution 720p
|
|
660
471
|
|
|
661
|
-
#
|
|
662
|
-
mux live
|
|
472
|
+
# Delete rendition settings
|
|
473
|
+
mux live delete-new-asset-static-renditions <stream-id> [--force]
|
|
663
474
|
```
|
|
664
475
|
|
|
665
|
-
|
|
476
|
+
#### Playback ID Management (Live)
|
|
666
477
|
|
|
667
|
-
|
|
668
|
-
Live stream created: abc123xyz
|
|
669
|
-
Status: idle
|
|
670
|
-
Stream Key: your-secret-stream-key
|
|
671
|
-
Playback URL: https://stream.mux.com/playback123.m3u8
|
|
478
|
+
Manage playback IDs on live streams, same interface as asset playback IDs.
|
|
672
479
|
|
|
673
|
-
|
|
480
|
+
```bash
|
|
481
|
+
mux live playback-ids list <stream-id>
|
|
482
|
+
mux live playback-ids create <stream-id> [--policy signed]
|
|
483
|
+
mux live playback-ids delete <stream-id> <playback-id> [--force]
|
|
674
484
|
```
|
|
675
485
|
|
|
676
|
-
|
|
486
|
+
</details>
|
|
677
487
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
- **Stream Key:** The `stream_key` returned in the response
|
|
488
|
+
<details>
|
|
489
|
+
<summary><h3>Uploads</h3></summary>
|
|
681
490
|
|
|
682
|
-
|
|
491
|
+
Manage direct uploads for client-side video uploading. Direct uploads provide a URL that clients can use to upload video files directly to Mux.
|
|
683
492
|
|
|
684
|
-
#### `mux
|
|
493
|
+
#### `mux uploads create`
|
|
685
494
|
|
|
686
|
-
|
|
495
|
+
Create a new direct upload URL.
|
|
687
496
|
|
|
688
497
|
**Options:**
|
|
689
|
-
- `--
|
|
690
|
-
-
|
|
691
|
-
- `--
|
|
692
|
-
- `--
|
|
693
|
-
|
|
694
|
-
**Examples:**
|
|
498
|
+
- `--cors-origin <origin>` - Allowed CORS origin for the upload (required)
|
|
499
|
+
- `-p, --playback-policy <policy>` - `public` or `signed`
|
|
500
|
+
- `--timeout <seconds>` - Seconds before the upload times out (default: 3600)
|
|
501
|
+
- `--test` - Create a test upload (asset deleted after 24 hours)
|
|
695
502
|
|
|
696
503
|
```bash
|
|
697
|
-
|
|
698
|
-
mux live list
|
|
699
|
-
|
|
700
|
-
# List first 10 streams
|
|
701
|
-
mux live list --limit 10
|
|
702
|
-
|
|
703
|
-
# List second page of results
|
|
704
|
-
mux live list --page 2
|
|
705
|
-
|
|
706
|
-
# Get JSON output for scripting
|
|
707
|
-
mux live list --json
|
|
708
|
-
|
|
709
|
-
# Get compact output for grep and parsing
|
|
710
|
-
mux live list --compact
|
|
711
|
-
```
|
|
712
|
-
|
|
713
|
-
**Output (default pretty format):**
|
|
714
|
-
|
|
715
|
-
```
|
|
716
|
-
Found 2 live stream(s):
|
|
717
|
-
|
|
718
|
-
waWxn5KIZCYmILAOWgXW9dFBPnOXq00JM idle 08/18 16:43
|
|
719
|
-
Details:
|
|
720
|
-
├─ Stream Key: c3eb...1724
|
|
721
|
-
├─ Latency Mode: standard
|
|
722
|
-
├─ Reconnect Window: 60s
|
|
723
|
-
└─ Max Duration: 12h
|
|
724
|
-
Recent Assets:
|
|
725
|
-
└─ 00QNOSkxzBdlASP3iIvTfvqxDN3u74hUX
|
|
726
|
-
Playback IDs:
|
|
727
|
-
└─ 🔒 EIyqm8p4VwGj5sO9rNBtykFbbKFFSNWA
|
|
504
|
+
mux uploads create --cors-origin "https://example.com" --playback-policy public
|
|
728
505
|
```
|
|
729
506
|
|
|
730
|
-
|
|
507
|
+
#### `mux uploads list`
|
|
731
508
|
|
|
732
|
-
|
|
733
|
-
waWxn5KIZCYmILAOWgXW9dFBPnOXq00JM idle 08/18 16:43 standard 60s signed 1 assets
|
|
734
|
-
```
|
|
509
|
+
List direct uploads with pagination. Supports `--limit`, `--page`, `--compact`.
|
|
735
510
|
|
|
736
|
-
#### `mux
|
|
737
|
-
|
|
738
|
-
Get detailed information about a specific live stream.
|
|
511
|
+
#### `mux uploads get <upload-id>`
|
|
739
512
|
|
|
740
|
-
|
|
741
|
-
- `<stream-id>` - The ID of the live stream to retrieve
|
|
513
|
+
Get details about a specific direct upload.
|
|
742
514
|
|
|
743
|
-
|
|
744
|
-
- `--json` - Output JSON instead of pretty format
|
|
515
|
+
#### `mux uploads cancel <upload-id>`
|
|
745
516
|
|
|
746
|
-
|
|
517
|
+
Cancel a waiting direct upload. Supports `--force`.
|
|
747
518
|
|
|
748
519
|
```bash
|
|
749
|
-
|
|
750
|
-
mux live get abc123xyz
|
|
751
|
-
|
|
752
|
-
# Get live stream details as JSON
|
|
753
|
-
mux live get abc123xyz --json
|
|
520
|
+
mux uploads cancel abc123xyz --force
|
|
754
521
|
```
|
|
755
522
|
|
|
756
|
-
|
|
523
|
+
</details>
|
|
757
524
|
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
Status: active
|
|
761
|
-
Created: 1234567890
|
|
762
|
-
Stream Key: your-secret-stream-key
|
|
763
|
-
Latency Mode: low
|
|
764
|
-
Reconnect Window: 60s
|
|
765
|
-
|
|
766
|
-
Playback IDs:
|
|
767
|
-
- playback123 (public)
|
|
768
|
-
URL: https://stream.mux.com/playback123.m3u8
|
|
769
|
-
|
|
770
|
-
New Asset Settings:
|
|
771
|
-
Playback Policy: public
|
|
772
|
-
Recording enabled: Yes
|
|
773
|
-
|
|
774
|
-
WARNING: This is a test stream (will be deleted after 24 hours)
|
|
775
|
-
```
|
|
525
|
+
<details>
|
|
526
|
+
<summary><h3>Playback ID Lookup</h3></summary>
|
|
776
527
|
|
|
777
|
-
#### `mux
|
|
778
|
-
|
|
779
|
-
Delete a live stream permanently.
|
|
528
|
+
#### `mux playback-ids <playback-id>`
|
|
780
529
|
|
|
781
|
-
|
|
782
|
-
- `<stream-id>` - The ID of the live stream to delete
|
|
530
|
+
Look up which asset or live stream a playback ID belongs to.
|
|
783
531
|
|
|
784
532
|
**Options:**
|
|
785
|
-
-
|
|
786
|
-
- `--json` - Output JSON instead of pretty format
|
|
787
|
-
|
|
788
|
-
**Examples:**
|
|
533
|
+
- `--expand` - Fetch the full asset or live stream object instead of just the reference
|
|
789
534
|
|
|
790
535
|
```bash
|
|
791
|
-
|
|
792
|
-
mux
|
|
793
|
-
|
|
794
|
-
# Delete stream without confirmation
|
|
795
|
-
mux live delete abc123xyz --force
|
|
796
|
-
|
|
797
|
-
# Delete stream with JSON output (requires --force for safety)
|
|
798
|
-
mux live delete abc123xyz --json --force
|
|
536
|
+
mux playback-ids abc123playbackid
|
|
537
|
+
mux playback-ids abc123playbackid --expand
|
|
799
538
|
```
|
|
800
539
|
|
|
801
|
-
**
|
|
540
|
+
**Note:** The nested `playback-ids` commands under `assets` and `live` are for managing playback IDs on known resources. This top-level command is for discovering what resource a playback ID belongs to.
|
|
802
541
|
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
```
|
|
806
|
-
Are you sure you want to delete live stream abc123xyz? (y/n): y
|
|
807
|
-
Live stream abc123xyz deleted successfully
|
|
808
|
-
```
|
|
809
|
-
|
|
810
|
-
#### Playback ID Management
|
|
542
|
+
</details>
|
|
811
543
|
|
|
812
|
-
|
|
544
|
+
<details>
|
|
545
|
+
<summary><h3>Playback Restrictions</h3></summary>
|
|
813
546
|
|
|
814
|
-
|
|
547
|
+
Manage playback restrictions to control where and how your content can be played.
|
|
815
548
|
|
|
816
|
-
|
|
549
|
+
#### `mux playback-restrictions create`
|
|
817
550
|
|
|
818
|
-
|
|
819
|
-
- `<stream-id>` - The ID of the live stream
|
|
551
|
+
Create a new playback restriction.
|
|
820
552
|
|
|
821
553
|
**Options:**
|
|
822
|
-
- `--
|
|
823
|
-
|
|
824
|
-
|
|
554
|
+
- `--allowed-domains <domain>` - Allowed referrer domains (required, repeatable)
|
|
555
|
+
- `--allow-no-referrer` - Allow playback when no referrer is sent
|
|
556
|
+
- `--allow-no-user-agent` - Allow playback when no user agent is sent
|
|
557
|
+
- `--allow-high-risk-user-agent` - Allow playback from high-risk user agents
|
|
825
558
|
|
|
826
559
|
```bash
|
|
827
|
-
|
|
828
|
-
mux live playback-ids list abc123xyz
|
|
829
|
-
|
|
830
|
-
# Get JSON output
|
|
831
|
-
mux live playback-ids list abc123xyz --json
|
|
560
|
+
mux playback-restrictions create --allowed-domains "example.com" --allowed-domains "*.example.com"
|
|
832
561
|
```
|
|
833
562
|
|
|
834
|
-
|
|
563
|
+
#### `mux playback-restrictions list`
|
|
835
564
|
|
|
836
|
-
|
|
837
|
-
Found 2 playback ID(s) for live stream abc123xyz:
|
|
565
|
+
List playback restrictions. Supports `--limit`, `--page`, `--compact`.
|
|
838
566
|
|
|
839
|
-
|
|
840
|
-
Policy: public
|
|
841
|
-
URL: https://stream.mux.com/playback123.m3u8
|
|
567
|
+
#### `mux playback-restrictions get <restriction-id>`
|
|
842
568
|
|
|
843
|
-
|
|
844
|
-
Policy: signed
|
|
845
|
-
URL: https://stream.mux.com/playback456.m3u8
|
|
846
|
-
```
|
|
569
|
+
Get details about a playback restriction.
|
|
847
570
|
|
|
848
|
-
|
|
571
|
+
#### `mux playback-restrictions delete <restriction-id>`
|
|
849
572
|
|
|
850
|
-
|
|
573
|
+
Delete a playback restriction. Supports `--force`.
|
|
851
574
|
|
|
852
|
-
|
|
853
|
-
- `<stream-id>` - The ID of the live stream
|
|
575
|
+
#### `mux playback-restrictions update-referrer <restriction-id>`
|
|
854
576
|
|
|
855
|
-
|
|
856
|
-
- `--policy <policy>` - Playback policy: `public` or `signed` (default: `public`)
|
|
857
|
-
- `--json` - Output JSON instead of pretty format
|
|
577
|
+
Update the referrer restriction.
|
|
858
578
|
|
|
859
|
-
**
|
|
579
|
+
**Options:** `--allowed-domains <domain>` (required, repeatable), `--allow-no-referrer`
|
|
860
580
|
|
|
861
|
-
|
|
862
|
-
# Create a public playback ID
|
|
863
|
-
mux live playback-ids create abc123xyz
|
|
581
|
+
#### `mux playback-restrictions update-user-agent <restriction-id>`
|
|
864
582
|
|
|
865
|
-
|
|
866
|
-
mux live playback-ids create abc123xyz --policy signed
|
|
583
|
+
Update the user agent restriction.
|
|
867
584
|
|
|
868
|
-
|
|
869
|
-
mux live playback-ids create abc123xyz --policy public --json
|
|
870
|
-
```
|
|
585
|
+
**Options:** `--allow-no-user-agent <boolean>` (required), `--allow-high-risk-user-agent <boolean>` (required)
|
|
871
586
|
|
|
872
|
-
|
|
587
|
+
</details>
|
|
873
588
|
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
Policy: public
|
|
877
|
-
URL: https://stream.mux.com/playback123.m3u8
|
|
878
|
-
```
|
|
589
|
+
<details>
|
|
590
|
+
<summary><h3>Signing Keys & Secure Playback</h3></summary>
|
|
879
591
|
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
Delete a playback ID from a live stream.
|
|
883
|
-
|
|
884
|
-
**Arguments:**
|
|
885
|
-
- `<stream-id>` - The ID of the live stream
|
|
886
|
-
- `<playback-id>` - The ID of the playback ID to delete
|
|
887
|
-
|
|
888
|
-
**Options:**
|
|
889
|
-
- `-f, --force` - Skip confirmation prompt
|
|
890
|
-
- `--json` - Output JSON instead of pretty format
|
|
891
|
-
|
|
892
|
-
**Examples:**
|
|
592
|
+
#### Signing Key Management
|
|
893
593
|
|
|
894
594
|
```bash
|
|
895
|
-
#
|
|
896
|
-
mux
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
mux live playback-ids delete abc123xyz playback123 --force
|
|
900
|
-
|
|
901
|
-
# Delete with JSON output
|
|
902
|
-
mux live playback-ids delete abc123xyz playback123 --force --json
|
|
595
|
+
mux signing-keys create # creates key and saves to current environment
|
|
596
|
+
mux signing-keys list # lists keys with environment indicators
|
|
597
|
+
mux signing-keys get <key-id>
|
|
598
|
+
mux signing-keys delete <key-id> [--force]
|
|
903
599
|
```
|
|
904
600
|
|
|
905
|
-
|
|
601
|
+
The private key is only returned once during creation. The CLI automatically stores it in your current environment configuration.
|
|
906
602
|
|
|
907
|
-
|
|
908
|
-
Are you sure you want to delete playback ID playback123 from live stream abc123xyz? (y/n): y
|
|
909
|
-
Playback ID playback123 deleted successfully
|
|
910
|
-
```
|
|
603
|
+
Deleting a signing key invalidates all tokens and signed URLs created with it and removes it from any local environment configurations.
|
|
911
604
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
#### `mux playback-ids <playback-id>`
|
|
915
|
-
|
|
916
|
-
Look up which asset or live stream a playback ID belongs to. This is useful when you have a playback ID and need to find the associated resource.
|
|
605
|
+
#### `mux sign <playback-id>`
|
|
917
606
|
|
|
918
|
-
|
|
919
|
-
- `<playback-id>` - The playback ID to look up
|
|
607
|
+
Sign a playback ID to generate a secure URL for video playback, thumbnails, GIFs, or storyboards. Used with assets or live streams that have a `signed` playback policy.
|
|
920
608
|
|
|
921
609
|
**Options:**
|
|
922
|
-
-
|
|
923
|
-
-
|
|
610
|
+
- `-e, --expiration <duration>` - Token expiration (default: `7d`). Examples: `7d`, `24h`, `30m`
|
|
611
|
+
- `-t, --type <type>` - `video` (default), `thumbnail`, `gif`, `storyboard`
|
|
612
|
+
- `-p, --param <key=value>` - JWT claim as key=value (repeatable)
|
|
613
|
+
- `--params-json <json>` - JWT claims as JSON object
|
|
614
|
+
- `--token-only` - Output only the JWT token (no URL)
|
|
615
|
+
|
|
616
|
+
When both `--param` and `--params-json` are provided, `--params-json` is applied first and `--param` values override on top.
|
|
924
617
|
|
|
925
618
|
**Examples:**
|
|
926
619
|
|
|
927
620
|
```bash
|
|
928
|
-
|
|
929
|
-
mux
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
mux
|
|
933
|
-
|
|
934
|
-
# Get JSON output
|
|
935
|
-
mux playback-ids abc123playbackid --json
|
|
621
|
+
mux sign abc123playbackid
|
|
622
|
+
mux sign abc123playbackid --expiration 24h
|
|
623
|
+
mux sign abc123playbackid --type thumbnail --param time=14 --param width=100
|
|
624
|
+
mux sign abc123playbackid --type gif
|
|
625
|
+
mux sign abc123playbackid --params-json '{"custom": {"session_id": "xxxx-123"}}'
|
|
626
|
+
mux sign abc123playbackid --token-only
|
|
936
627
|
```
|
|
937
628
|
|
|
938
|
-
**Output
|
|
629
|
+
**Output URLs by type:**
|
|
939
630
|
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
631
|
+
| Type | Domain | Example path |
|
|
632
|
+
|------|--------|-------------|
|
|
633
|
+
| `video` | `stream.mux.com` | `/{id}.m3u8?token=...` |
|
|
634
|
+
| `thumbnail` | `image.mux.com` | `/{id}/thumbnail.png?token=...` |
|
|
635
|
+
| `gif` | `image.mux.com` | `/{id}/animated.gif?token=...` |
|
|
636
|
+
| `storyboard` | `image.mux.com` | `/{id}/storyboard.vtt?token=...` |
|
|
946
637
|
|
|
947
|
-
**
|
|
638
|
+
**Thumbnail parameters** (embedded in JWT via `--param`):
|
|
639
|
+
|
|
640
|
+
| Parameter | Description |
|
|
641
|
+
|-----------|-------------|
|
|
642
|
+
| `time` | Video timestamp in seconds |
|
|
643
|
+
| `width` | Width in pixels |
|
|
644
|
+
| `height` | Height in pixels |
|
|
645
|
+
| `rotate` | Clockwise rotation: 90, 180, or 270 |
|
|
646
|
+
| `fit_mode` | `preserve`, `stretch`, `crop`, `smartcrop`, `pad` |
|
|
647
|
+
| `flip_v` | Flip vertically |
|
|
648
|
+
| `flip_h` | Flip horizontally |
|
|
948
649
|
|
|
949
|
-
|
|
650
|
+
**Prerequisite:** You must have a signing key in your current environment. Run `mux signing-keys create` to set one up.
|
|
950
651
|
|
|
951
|
-
|
|
652
|
+
</details>
|
|
952
653
|
|
|
953
|
-
|
|
654
|
+
<details>
|
|
655
|
+
<summary><h3>Transcription Vocabularies</h3></summary>
|
|
954
656
|
|
|
955
|
-
|
|
657
|
+
Manage custom transcription vocabularies to improve automatic speech recognition accuracy for domain-specific terms.
|
|
956
658
|
|
|
957
|
-
|
|
659
|
+
#### `mux transcription-vocabularies create`
|
|
958
660
|
|
|
959
661
|
**Options:**
|
|
960
|
-
- `--
|
|
961
|
-
|
|
962
|
-
|
|
662
|
+
- `--phrase <phrase>` - Phrase to include (required, repeatable)
|
|
663
|
+
- `--name <name>` - Name for the vocabulary
|
|
664
|
+
- `--passthrough <string>` - Passthrough metadata (max 255 characters)
|
|
963
665
|
|
|
964
666
|
```bash
|
|
965
|
-
|
|
966
|
-
mux signing-keys create
|
|
967
|
-
|
|
968
|
-
# Create a signing key with JSON output
|
|
969
|
-
mux signing-keys create --json
|
|
667
|
+
mux transcription-vocabularies create --phrase "Mux" --phrase "HLS" --phrase "RTMP" --name "Streaming Terms"
|
|
970
668
|
```
|
|
971
669
|
|
|
972
|
-
|
|
670
|
+
#### `mux transcription-vocabularies list`
|
|
973
671
|
|
|
974
|
-
|
|
975
|
-
Signing key created and saved to environment: default
|
|
976
|
-
Key ID: qrdSB18tYITC7GNQCFJWKr25M9JPkMxJ
|
|
977
|
-
```
|
|
672
|
+
List vocabularies. Supports `--limit`, `--page`, `--compact`.
|
|
978
673
|
|
|
979
|
-
|
|
674
|
+
#### `mux transcription-vocabularies get <vocabulary-id>`
|
|
980
675
|
|
|
981
|
-
|
|
676
|
+
Get details about a vocabulary.
|
|
982
677
|
|
|
983
|
-
|
|
678
|
+
#### `mux transcription-vocabularies update <vocabulary-id>`
|
|
984
679
|
|
|
985
|
-
|
|
986
|
-
- `--json` - Output JSON instead of pretty format
|
|
680
|
+
Update a vocabulary. This replaces all existing phrases.
|
|
987
681
|
|
|
988
|
-
**
|
|
682
|
+
**Options:** `--phrase <phrase>` (required, repeatable), `--name <name>`, `--passthrough <string>`
|
|
989
683
|
|
|
990
|
-
|
|
991
|
-
# List all signing keys
|
|
992
|
-
mux signing-keys list
|
|
684
|
+
#### `mux transcription-vocabularies delete <vocabulary-id>`
|
|
993
685
|
|
|
994
|
-
|
|
995
|
-
mux signing-keys list --json
|
|
996
|
-
```
|
|
997
|
-
|
|
998
|
-
**Output:**
|
|
999
|
-
|
|
1000
|
-
```
|
|
1001
|
-
Found 2 signing key(s):
|
|
1002
|
-
|
|
1003
|
-
Key ID: qrdSB18tYITC7GNQCFJWKr25M9JPkMxJ
|
|
1004
|
-
Created: 1234567890
|
|
1005
|
-
Active in environments: production, staging
|
|
686
|
+
Delete a vocabulary. Supports `--force`.
|
|
1006
687
|
|
|
1007
|
-
|
|
1008
|
-
Created: 1234567891
|
|
1009
|
-
Active in environments: development
|
|
1010
|
-
```
|
|
688
|
+
</details>
|
|
1011
689
|
|
|
1012
|
-
|
|
690
|
+
<details>
|
|
691
|
+
<summary><h3>Delivery Usage</h3></summary>
|
|
1013
692
|
|
|
1014
|
-
|
|
693
|
+
#### `mux delivery-usage list`
|
|
1015
694
|
|
|
1016
|
-
|
|
1017
|
-
- `<key-id>` - The ID of the signing key to retrieve
|
|
695
|
+
List delivery usage reports for video assets and live streams.
|
|
1018
696
|
|
|
1019
697
|
**Options:**
|
|
1020
|
-
- `--
|
|
1021
|
-
|
|
1022
|
-
|
|
698
|
+
- `--asset-id <id>` - Filter by asset ID
|
|
699
|
+
- `--live-stream-id <id>` - Filter by live stream ID
|
|
700
|
+
- `--timeframe <timeframe>` - Timeframe as Unix epoch timestamps (specify twice for start and end)
|
|
1023
701
|
|
|
1024
702
|
```bash
|
|
1025
|
-
|
|
1026
|
-
mux
|
|
1027
|
-
|
|
1028
|
-
# Get signing key details as JSON
|
|
1029
|
-
mux signing-keys get qrdSB18tYITC7GNQCFJWKr25M9JPkMxJ --json
|
|
1030
|
-
```
|
|
1031
|
-
|
|
1032
|
-
**Output:**
|
|
1033
|
-
|
|
1034
|
-
```
|
|
1035
|
-
Signing Key ID: qrdSB18tYITC7GNQCFJWKr25M9JPkMxJ
|
|
1036
|
-
Created: 1234567890
|
|
1037
|
-
Active in environments: production
|
|
703
|
+
mux delivery-usage list
|
|
704
|
+
mux delivery-usage list --asset-id abc123xyz
|
|
1038
705
|
```
|
|
1039
706
|
|
|
1040
|
-
|
|
707
|
+
Supports `--limit`, `--page`, `--compact`.
|
|
1041
708
|
|
|
1042
|
-
|
|
709
|
+
</details>
|
|
1043
710
|
|
|
1044
|
-
|
|
1045
|
-
|
|
711
|
+
<details>
|
|
712
|
+
<summary><h3>DRM Configurations</h3></summary>
|
|
1046
713
|
|
|
1047
|
-
|
|
1048
|
-
- `-f, --force` - Skip confirmation prompt
|
|
1049
|
-
- `--json` - Output JSON instead of pretty format
|
|
1050
|
-
|
|
1051
|
-
**Examples:**
|
|
714
|
+
View DRM configurations for your Mux environment. DRM configurations are provisioned by Mux and are read-only.
|
|
1052
715
|
|
|
1053
716
|
```bash
|
|
1054
|
-
|
|
1055
|
-
mux
|
|
1056
|
-
|
|
1057
|
-
# Delete signing key without confirmation
|
|
1058
|
-
mux signing-keys delete qrdSB18tYITC7GNQCFJWKr25M9JPkMxJ --force
|
|
1059
|
-
|
|
1060
|
-
# Delete signing key with JSON output
|
|
1061
|
-
mux signing-keys delete qrdSB18tYITC7GNQCFJWKr25M9JPkMxJ --force --json
|
|
717
|
+
mux drm-configurations list
|
|
718
|
+
mux drm-configurations get <drm-configuration-id>
|
|
1062
719
|
```
|
|
1063
720
|
|
|
1064
|
-
|
|
721
|
+
</details>
|
|
1065
722
|
|
|
1066
|
-
|
|
723
|
+
<details>
|
|
724
|
+
<summary><h3>Mux Data</h3></summary>
|
|
1067
725
|
|
|
1068
|
-
|
|
1069
|
-
WARNING: This signing key is configured in the following environments: production
|
|
726
|
+
Commands for video analytics, monitoring, and incident tracking via the Mux Data API.
|
|
1070
727
|
|
|
1071
|
-
|
|
1072
|
-
Are you sure you want to delete signing key qrdSB18tYITC7GNQCFJWKr25M9JPkMxJ? (y/n): y
|
|
728
|
+
#### Video Views
|
|
1073
729
|
|
|
1074
|
-
|
|
1075
|
-
|
|
730
|
+
```bash
|
|
731
|
+
mux video-views list [--filters "country:US"] [--timeframe "24:hours"] [--viewer-id <id>] [--error-id <id>]
|
|
732
|
+
mux video-views get <view-id>
|
|
1076
733
|
```
|
|
1077
734
|
|
|
1078
|
-
|
|
735
|
+
**List options:** `--filters`, `--metric-filters`, `--timeframe`, `--viewer-id`, `--error-id`, `--order-direction`, `--limit`, `--page`, `--compact`
|
|
1079
736
|
|
|
1080
|
-
|
|
737
|
+
#### Metrics
|
|
1081
738
|
|
|
1082
|
-
|
|
1083
|
-
|
|
739
|
+
```bash
|
|
740
|
+
# List available metrics
|
|
741
|
+
mux metrics list [--dimension <dimension>] [--value <value>]
|
|
1084
742
|
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
- Examples: '7d', '24h', '1h', '30m'
|
|
1088
|
-
- `-t, --type <type>` - Token type: `video`, `thumbnail`, `gif`, `storyboard` (default: 'video')
|
|
1089
|
-
- `-p, --param <key=value>` - JWT claim as key=value (repeatable). Used to embed parameters like `time`, `width`, or `height` directly in the signed token.
|
|
1090
|
-
- `--params-json <json>` - JWT claims as a JSON object. Useful for complex claims including nested values like `custom`.
|
|
1091
|
-
- `--json` - Output JSON instead of pretty format
|
|
1092
|
-
- `--token-only` - Output only the JWT token (no URL)
|
|
743
|
+
# Breakdown by dimension
|
|
744
|
+
mux metrics breakdown <metric-id> --group-by country --measurement median
|
|
1093
745
|
|
|
1094
|
-
|
|
746
|
+
# Overall metric values
|
|
747
|
+
mux metrics overall <metric-id> [--measurement avg]
|
|
1095
748
|
|
|
1096
|
-
|
|
749
|
+
# Timeseries data
|
|
750
|
+
mux metrics timeseries <metric-id> [--group-by hour]
|
|
1097
751
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
752
|
+
# Performance insights
|
|
753
|
+
mux metrics insights <metric-id> [--measurement 95th]
|
|
754
|
+
```
|
|
1101
755
|
|
|
1102
|
-
|
|
1103
|
-
mux sign abc123playbackid --expiration 24h
|
|
756
|
+
**Common options:** `--measurement <95th|median|avg|count|sum>`, `--filters`, `--metric-filters`, `--timeframe`
|
|
1104
757
|
|
|
1105
|
-
|
|
1106
|
-
mux sign abc123playbackid --type thumbnail --param time=14
|
|
758
|
+
**Breakdown/timeseries also support:** `--group-by`, `--order-by`, `--order-direction`, `--limit`, `--page`, `--compact`
|
|
1107
759
|
|
|
1108
|
-
|
|
1109
|
-
mux sign abc123playbackid --type thumbnail --param time=14 --param width=100
|
|
760
|
+
#### Monitoring
|
|
1110
761
|
|
|
1111
|
-
|
|
1112
|
-
mux sign abc123playbackid --type gif
|
|
762
|
+
Real-time monitoring data from Mux Data.
|
|
1113
763
|
|
|
1114
|
-
|
|
1115
|
-
mux
|
|
764
|
+
```bash
|
|
765
|
+
mux monitoring dimensions # list available dimensions
|
|
766
|
+
mux monitoring metrics # list available metrics
|
|
767
|
+
mux monitoring breakdown <metric-id> [--dimension <d>] [--timestamp <ts>]
|
|
768
|
+
mux monitoring breakdown-timeseries <metric-id> [--dimension <d>]
|
|
769
|
+
mux monitoring histogram-timeseries [--filters ...]
|
|
770
|
+
mux monitoring timeseries <metric-id> [--timestamp <ts>]
|
|
771
|
+
```
|
|
1116
772
|
|
|
1117
|
-
|
|
1118
|
-
mux sign abc123playbackid --json
|
|
773
|
+
#### Incidents
|
|
1119
774
|
|
|
1120
|
-
|
|
1121
|
-
mux
|
|
775
|
+
```bash
|
|
776
|
+
mux incidents list [--status open] [--severity alert]
|
|
777
|
+
mux incidents get <incident-id>
|
|
778
|
+
mux incidents related <incident-id>
|
|
1122
779
|
```
|
|
1123
780
|
|
|
1124
|
-
**
|
|
781
|
+
**List options:** `--status <open|closed|expired>`, `--severity <warning|alert>`, `--order-by`, `--order-direction`, `--limit`, `--page`, `--compact`
|
|
1125
782
|
|
|
1126
|
-
|
|
783
|
+
#### Annotations
|
|
1127
784
|
|
|
1128
|
-
|
|
1129
|
-
# Video (default) - uses stream.mux.com
|
|
1130
|
-
mux sign abc123playbackid
|
|
1131
|
-
https://stream.mux.com/abc123playbackid.m3u8?token=eyJ...
|
|
1132
|
-
|
|
1133
|
-
# Thumbnail - uses image.mux.com
|
|
1134
|
-
mux sign abc123playbackid --type thumbnail --param time=14
|
|
1135
|
-
https://image.mux.com/abc123playbackid/thumbnail.png?token=eyJ...
|
|
785
|
+
Mark significant events (deployments, config changes, etc.) on your analytics timeline.
|
|
1136
786
|
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
787
|
+
```bash
|
|
788
|
+
# Create annotation
|
|
789
|
+
mux annotations create --date 1700000000 --note "Deployed v2.1.0" [--sub-property-id <id>]
|
|
1140
790
|
|
|
1141
|
-
#
|
|
1142
|
-
mux
|
|
1143
|
-
|
|
791
|
+
# List, get, update, delete
|
|
792
|
+
mux annotations list [--timeframe ...]
|
|
793
|
+
mux annotations get <annotation-id>
|
|
794
|
+
mux annotations update <annotation-id> --date <timestamp> --note <text>
|
|
795
|
+
mux annotations delete <annotation-id> [--force]
|
|
1144
796
|
```
|
|
1145
797
|
|
|
1146
|
-
|
|
798
|
+
#### Dimensions
|
|
1147
799
|
|
|
1148
|
-
|
|
800
|
+
```bash
|
|
801
|
+
mux dimensions list # list available dimensions
|
|
802
|
+
mux dimensions values <dimension-id> [--timeframe "24:hours"]
|
|
803
|
+
```
|
|
1149
804
|
|
|
1150
|
-
|
|
1151
|
-
|-----------|-------------|
|
|
1152
|
-
| `time` | Video timestamp in seconds for the thumbnail |
|
|
1153
|
-
| `width` | Thumbnail width in pixels |
|
|
1154
|
-
| `height` | Thumbnail height in pixels |
|
|
1155
|
-
| `rotate` | Rotate clockwise: 90, 180, or 270 |
|
|
1156
|
-
| `fit_mode` | How to fit: `preserve`, `stretch`, `crop`, `smartcrop`, `pad` |
|
|
1157
|
-
| `flip_v` | Flip vertically |
|
|
1158
|
-
| `flip_h` | Flip horizontally |
|
|
805
|
+
#### Errors
|
|
1159
806
|
|
|
1160
|
-
|
|
807
|
+
```bash
|
|
808
|
+
mux errors list [--filters ...] [--timeframe ...]
|
|
809
|
+
```
|
|
1161
810
|
|
|
1162
|
-
|
|
811
|
+
#### Exports
|
|
1163
812
|
|
|
1164
813
|
```bash
|
|
1165
|
-
#
|
|
1166
|
-
mux signing-keys create
|
|
814
|
+
mux exports list # list video view export files
|
|
1167
815
|
```
|
|
1168
816
|
|
|
1169
|
-
|
|
817
|
+
</details>
|
|
1170
818
|
|
|
1171
|
-
|
|
819
|
+
<details>
|
|
820
|
+
<summary><h3>Authentication & Environment Management</h3></summary>
|
|
1172
821
|
|
|
1173
822
|
#### `mux login`
|
|
1174
823
|
|
|
1175
824
|
Authenticate with Mux and save credentials.
|
|
1176
825
|
|
|
1177
826
|
**Options:**
|
|
1178
|
-
- `-f, --env-file <path>` - Path to .env file containing
|
|
1179
|
-
- `-n, --name <name>` - Name for this environment (default:
|
|
1180
|
-
|
|
1181
|
-
**Examples:**
|
|
827
|
+
- `-f, --env-file <path>` - Path to .env file containing `MUX_TOKEN_ID` and `MUX_TOKEN_SECRET`
|
|
828
|
+
- `-n, --name <name>` - Name for this environment (default: `default`)
|
|
1182
829
|
|
|
1183
830
|
```bash
|
|
1184
|
-
#
|
|
1185
|
-
mux login
|
|
1186
|
-
|
|
1187
|
-
# Login with .env file
|
|
1188
|
-
mux login --env-file .env
|
|
1189
|
-
|
|
1190
|
-
# Login with a named environment
|
|
1191
|
-
mux login --name production --env-file .env.production
|
|
831
|
+
mux login # interactive
|
|
832
|
+
mux login --env-file .env # from .env file
|
|
833
|
+
mux login --name production --env-file .env.prod # named environment
|
|
1192
834
|
```
|
|
1193
835
|
|
|
1194
836
|
#### `mux logout <name>`
|
|
1195
837
|
|
|
1196
|
-
Remove credentials for a specific environment.
|
|
1197
|
-
|
|
1198
|
-
**Arguments:**
|
|
1199
|
-
- `<name>` - Name of the environment to remove
|
|
1200
|
-
|
|
1201
|
-
**Examples:**
|
|
838
|
+
Remove credentials for a specific environment. When you remove the default environment, the CLI automatically selects another as the new default.
|
|
1202
839
|
|
|
1203
840
|
```bash
|
|
1204
|
-
# Remove the default environment
|
|
1205
841
|
mux logout default
|
|
1206
|
-
|
|
1207
|
-
# Remove a named environment
|
|
1208
842
|
mux logout staging
|
|
1209
843
|
```
|
|
1210
844
|
|
|
1211
|
-
When you remove the default environment, the CLI automatically selects another environment as the new default.
|
|
1212
|
-
|
|
1213
845
|
#### `mux env list`
|
|
1214
846
|
|
|
1215
847
|
Display all configured environments.
|
|
1216
848
|
|
|
1217
|
-
**Examples:**
|
|
1218
|
-
|
|
1219
849
|
```bash
|
|
1220
850
|
mux env list
|
|
1221
851
|
```
|
|
1222
852
|
|
|
1223
|
-
**Output:**
|
|
1224
|
-
```
|
|
1225
|
-
Configured environments:
|
|
1226
|
-
|
|
1227
|
-
* production (default)
|
|
1228
|
-
staging
|
|
1229
|
-
development
|
|
1230
|
-
|
|
1231
|
-
3 environments total
|
|
1232
|
-
```
|
|
1233
|
-
|
|
1234
853
|
#### `mux env switch <name>`
|
|
1235
854
|
|
|
1236
855
|
Change the default environment.
|
|
1237
856
|
|
|
1238
|
-
**Arguments:**
|
|
1239
|
-
- `<name>` - Name of the environment to set as default
|
|
1240
|
-
|
|
1241
|
-
**Examples:**
|
|
1242
|
-
|
|
1243
857
|
```bash
|
|
1244
|
-
# Switch to staging environment
|
|
1245
858
|
mux env switch staging
|
|
1246
859
|
```
|
|
1247
860
|
|
|
861
|
+
</details>
|
|
862
|
+
|
|
1248
863
|
## Configuration
|
|
1249
864
|
|
|
1250
865
|
Credentials are stored securely in `~/.config/mux/config.json` with restrictive file permissions (readable/writable only by the owner).
|
|
@@ -1291,8 +906,6 @@ pnpm run build
|
|
|
1291
906
|
|
|
1292
907
|
### Testing
|
|
1293
908
|
|
|
1294
|
-
The project includes comprehensive test coverage for core functionality:
|
|
1295
|
-
|
|
1296
909
|
```bash
|
|
1297
910
|
# Run all tests
|
|
1298
911
|
bun test
|
|
@@ -1305,64 +918,52 @@ bun test --watch
|
|
|
1305
918
|
|
|
1306
919
|
```
|
|
1307
920
|
src/
|
|
1308
|
-
├── commands/
|
|
1309
|
-
│ ├── assets/
|
|
1310
|
-
│ │ ├── manage/
|
|
1311
|
-
│ │
|
|
1312
|
-
│ │
|
|
1313
|
-
│ │ ├──
|
|
1314
|
-
│ │
|
|
1315
|
-
│ │
|
|
1316
|
-
│ │
|
|
1317
|
-
│
|
|
1318
|
-
│ │ ├──
|
|
1319
|
-
│ │ ├──
|
|
1320
|
-
│ │ ├── list.ts
|
|
1321
|
-
│ │ ├──
|
|
1322
|
-
│ │ ├──
|
|
1323
|
-
│ │
|
|
1324
|
-
│ ├──
|
|
1325
|
-
│ │ ├──
|
|
1326
|
-
│ │
|
|
1327
|
-
│
|
|
1328
|
-
│
|
|
1329
|
-
│
|
|
1330
|
-
│
|
|
1331
|
-
│
|
|
1332
|
-
│
|
|
1333
|
-
│
|
|
1334
|
-
│
|
|
1335
|
-
│ ├──
|
|
1336
|
-
│
|
|
1337
|
-
│
|
|
1338
|
-
│
|
|
1339
|
-
│
|
|
1340
|
-
│
|
|
1341
|
-
│ ├── env/
|
|
1342
|
-
│
|
|
1343
|
-
│
|
|
1344
|
-
|
|
1345
|
-
│ ├──
|
|
1346
|
-
│ ├──
|
|
1347
|
-
│
|
|
1348
|
-
├──
|
|
1349
|
-
│ ├──
|
|
1350
|
-
│
|
|
1351
|
-
│
|
|
1352
|
-
│
|
|
1353
|
-
|
|
1354
|
-
│ │ ├── ConfirmDialog.tsx # Reusable confirmation dialog
|
|
1355
|
-
│ │ └── clipboard.ts # Clipboard utilities
|
|
1356
|
-
│ ├── config.ts # Configuration management
|
|
1357
|
-
│ ├── formatters.ts # Shared output formatting (timestamps, durations, statuses)
|
|
1358
|
-
│ ├── mux.ts # Mux API integration and auth helpers
|
|
1359
|
-
│ ├── json-config.ts # JSON configuration parsing
|
|
1360
|
-
│ ├── file-upload.ts # File upload utilities
|
|
1361
|
-
│ ├── urls.ts # URL generation (stream, player, thumbnail, gif, storyboard)
|
|
1362
|
-
│ ├── signing.ts # JWT signing utilities
|
|
1363
|
-
│ ├── playback-ids.ts # Playback ID operations
|
|
1364
|
-
│ └── xdg.ts # XDG base directory support
|
|
1365
|
-
└── index.ts # CLI entry point
|
|
921
|
+
├── commands/ # CLI command definitions
|
|
922
|
+
│ ├── assets/ # Asset management
|
|
923
|
+
│ │ ├── manage/ # Interactive TUI
|
|
924
|
+
│ │ ├── playback-ids/ # Playback ID sub-resource
|
|
925
|
+
│ │ ├── static-renditions/ # Static rendition sub-resource
|
|
926
|
+
│ │ ├── tracks/ # Track management (subtitles, audio)
|
|
927
|
+
│ │ ├── create.ts, list.ts, get.ts, update.ts, delete.ts
|
|
928
|
+
│ │ ├── input-info.ts # Retrieve input info
|
|
929
|
+
│ │ └── update-master-access.ts # Update master access settings
|
|
930
|
+
│ ├── live/ # Live stream management
|
|
931
|
+
│ │ ├── playback-ids/ # Playback ID sub-resource
|
|
932
|
+
│ │ ├── simulcast-targets/ # Simulcast target sub-resource
|
|
933
|
+
│ │ ├── create.ts, list.ts, get.ts, update.ts, delete.ts
|
|
934
|
+
│ │ ├── complete.ts, enable.ts, disable.ts
|
|
935
|
+
│ │ ├── reset-stream-key.ts
|
|
936
|
+
│ │ ├── update-embedded-subtitles.ts
|
|
937
|
+
│ │ ├── update-generated-subtitles.ts
|
|
938
|
+
│ │ ├── update-new-asset-static-renditions.ts
|
|
939
|
+
│ │ └── delete-new-asset-static-renditions.ts
|
|
940
|
+
│ ├── uploads/ # Direct upload management
|
|
941
|
+
│ ├── playback-restrictions/ # Playback restriction management
|
|
942
|
+
│ ├── transcription-vocabularies/ # Transcription vocabulary management
|
|
943
|
+
│ ├── delivery-usage/ # Delivery usage reports
|
|
944
|
+
│ ├── drm-configurations/ # DRM configuration management
|
|
945
|
+
│ ├── signing-keys/ # Signing key management
|
|
946
|
+
│ ├── video-views/ # Mux Data: video view analytics
|
|
947
|
+
│ ├── metrics/ # Mux Data: metric analytics
|
|
948
|
+
│ ├── monitoring/ # Mux Data: real-time monitoring
|
|
949
|
+
│ ├── incidents/ # Mux Data: incident tracking
|
|
950
|
+
│ ├── annotations/ # Mux Data: annotation management
|
|
951
|
+
│ ├── dimensions/ # Mux Data: dimension queries
|
|
952
|
+
│ ├── errors/ # Mux Data: error analytics
|
|
953
|
+
│ ├── exports/ # Mux Data: export files
|
|
954
|
+
│ ├── env/ # Environment management
|
|
955
|
+
│ ├── login.ts, logout.ts, sign.ts # Auth & signing commands
|
|
956
|
+
│ └── playback-ids.ts # Playback ID lookup
|
|
957
|
+
├── lib/ # Shared libraries
|
|
958
|
+
│ ├── tui/ # Reusable TUI components
|
|
959
|
+
│ ├── config.ts # Configuration management
|
|
960
|
+
│ ├── formatters.ts # Output formatting
|
|
961
|
+
│ ├── data-filters.ts # Mux Data filter utilities
|
|
962
|
+
│ ├── mux.ts # Mux API client
|
|
963
|
+
│ ├── urls.ts # URL generation
|
|
964
|
+
│ ├── signing.ts # JWT signing
|
|
965
|
+
│ └── ... # Other utilities
|
|
966
|
+
└── index.ts # CLI entry point
|
|
1366
967
|
```
|
|
1367
968
|
|
|
1368
969
|
## License
|