Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,20 @@ rawback videos list
rawback videos upload --file ~/Movies/hike.mp4
rawback videos upload --file ~/Movies/hike.mp4 --thumbnail ~/Pictures/poster.jpg
rawback videos repair --id 7 --file ~/Movies/hike.mp4
rawback videos update --id 7 --title "Hike, day two"
rawback videos get 7
rawback videos update --id 7 --title "Hike, day two" --title-zh "徒步第二天"
rawback videos update --id 7 --hashtag hiking,徒步 --link "https://example.com/route|Route|路线"
rawback videos subtitle upload --id 7 --language zh --file ~/Movies/hike.zh.srt
rawback videos audio upload --id 7 --language en --file ~/Music/narration.m4a --label Narration
rawback videos list --hashtag hiking
rawback videos delete --id 7
```

A video's title and description are English by default, with an optional
Chinese copy. Each video can also carry hashtags, external links, one uploaded
subtitle per language (SRT or WebVTT) and one audio-only attachment per
language, played and downloaded on its own.

Supported containers are MP4, M4V, MOV, WebM, MKV, AVI, MPEG, 3GP, and TS, up
to 100 GB. The file is sent in parts to presigned URLs and read from disk on
demand. Before upload, FFmpeg tools extract a poster and audio for transcription. Pass `--thumbnail` to use a JPEG,
Expand Down
81 changes: 71 additions & 10 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -727,11 +727,23 @@ disk on demand, so a very large file is never held in memory.
rawback videos list [options]
```

| Option | Description | Default |
| ---------------------- | ----------------------------- | ------- |
| `--page <number>` | Page number | `1` |
| `--page-size <number>` | Items per page, 1 through 100 | `24` |
| `--json` | Output machine-readable JSON | `false` |
| Option | Description | Default |
| ---------------------- | ------------------------------------------------------------------------------------------------- | ------- |
| `--page <number>` | Page number | `1` |
| `--page-size <number>` | Items per page, 1 through 100 | `24` |
| `--hashtag <tag>` | Only videos carrying any of these hashtags, case-insensitive; repeat or comma-separate | — |
| `--search <text>` | Match titles and descriptions in either language, hashtags, file names and transcripts (2+ chars) | — |
| `--json` | Output machine-readable JSON | `false` |

### `videos get`

```bash
rawback videos get <id> [--json]
```

Shows one video: its title and description in English and, when set, Chinese,
its hashtags, links, uploaded subtitles, audio attachments, file details and
playback URL. `view` is an alias. `--json` prints `{ "video": ... }`.

### `videos upload`

Expand Down Expand Up @@ -795,20 +807,69 @@ transcription enablement and recovery limits, see
### `videos update`

```bash
rawback videos update --id <id> [--title <title>] [--description <text>]
rawback videos update --id <id> [options]
rawback videos update --id 7 --title-zh "海港清晨" --hashtag travel,旅行
rawback videos update --id 7 --link "https://example.com/notes|Notes|笔记"
```

English is a video's default language; the Chinese title and description are
optional and shown to people using Rawback in Chinese.

| Option | Description |
| ------------------------- | ----------------------------------------------------------------------------- |
| `--title <title>` | English (default) title; cannot be empty |
| `--description <text>` | English description; an empty value clears it |
| `--title-zh <title>` | Chinese title; an empty value clears it |
| `--description-zh <text>` | Chinese description; an empty value clears it |
| `--hashtag <tag>` | Replace the hashtags; repeat or comma-separate, `#` optional, any language |
| `--clear-hashtags` | Remove every hashtag |
| `--link <link>` | Replace the links; each is `url`, `url\|title` or `url\|title\|Chinese title` |
| `--clear-links` | Remove every link |
| `--json` | Output machine-readable JSON |

At least one change is required. Hashtags and links replace the whole list, so
pass the ones you want to keep; `--hashtag` with `--clear-hashtags` (or `--link`
with `--clear-links`) is rejected. Hashtags may hold letters and numbers of any
script plus `_` and `-`, up to 50 characters and 30 per video; links must be
`http` or `https`, up to 10 per video. A link title defaults to its host.

### `videos subtitle`

```bash
rawback videos subtitle upload --id <id> --language <en|zh> --file <path>
rawback videos subtitle view --id <id> --language <en|zh> [--format srt|vtt|text] [--output <path>]
rawback videos subtitle delete --id <id> --language <en|zh>
```

A video has at most one uploaded subtitle per language (`en`, `zh`); uploading
again replaces it. `upload` takes an SRT or WebVTT file, UTF-8, up to 1 MiB, and
the server rejects one whose cues do not parse. `view` prints SRT by default,
WebVTT with `--format vtt`, or the words alone with `--format text`, to stdout or
to `--output`. These are separate from the server's generated transcript. All
three accept `--json`.

### `videos audio`

```bash
rawback videos audio upload --id <id> --language <en|zh> --file <path> [--label <text>]
rawback videos audio delete --id <id> --language <en|zh>
```

At least one of `--title` or `--description` is required. Passing an empty
description clears it.
Attaches an audio-only file — narration, a dub, the soundtrack — to a completed
video, one per language; uploading again replaces it. It is played and
downloaded on its own and never mixed into the video. MP3, M4A, AAC, WAV, FLAC,
Ogg, Opus and WebM are accepted, up to 2 GiB; the file is streamed to a
presigned URL and charged against the account's storage once confirmed.
`delete` releases that storage. Both accept `--json`.

### `videos delete`

```bash
rawback videos delete --id <id>
```

Deletes the video and its poster frame and releases the storage against the
account quota. This cannot be undone.
Deletes the video with its poster frame, subtitles and audio attachments, and
releases the storage against the account quota. This cannot be undone.

## `rawback dream`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"@inquirer/prompts": "^8.7.0",
"@rawback/ccapi-js": "1.1.3",
"@rawback/sdk": "0.3.5",
"@rawback/sdk": "0.3.6",
"ink": "^7.1.1",
"react": "^19.2.8",
"react-devtools-core": "^7.0.1",
Expand Down
Loading
Loading