# Share videos for review

[Back to the CLI overview](https://unpkg.com/@osmo.inc/cli/README.md)

Share a rendered video from any tool, including drafts and work in progress.
Requires an Osmo login and ffprobe, with no project setup or Git repository.

```sh
osmo login
osmo share ./film.mp4 --name "Launch film"
osmo share ./film-v2.mp4 --to SHARE
```

Without `--to`, each upload creates a new share. With `--to`, the upload adds a
version to that share. SHARE is the share's link (`/share/project/<id>`), one of
its version links, or its ID, and `osmo shares` lists yours, the one with the
newest version first. The command does not initialize or write anything in the
working folder.

Add `--json` for machine-readable output containing `share`, `version`, `link`,
and `versionLink`. When the command made a new share, a failed upload reports its
ID for retrying; only completed uploads appear in review history.

## Supported videos

Upload MP4 with H.264 8-bit 4:2:0 video and optional AAC audio, up to 2 GiB.
Files are uploaded as supplied; export a compatible MP4 from your video tool
before sharing. Uploads stream from disk without buffering the full file.

Fractional frame rates are preserved. Variable-frame-rate videos retain playback
duration and seconds-based comments; timeline frame positions use the average
frame rate.

## Review links and comments

`link` is the stable review URL. Refresh it after a successful upload to see the
newest completed version. An already open review stays on its version while you
comment. Failed uploads leave the previous video available.

`versionLink` points to one specific video version. Comments stay attached to that
version, and existing version links continue to work while sharing is enabled.
Anyone with a review link can access the review.

```sh
osmo comments list SHARE --open --json
osmo comments add SHARE "The logo lands late." --at 3.5
osmo comments reply COMMENT "Updated in the latest version."
osmo comments resolve COMMENT
osmo comments reopen COMMENT
```

`comments list` covers every version of a share, newest first, and says which
version each comment is on. A comment is addressed by its ID alone; a reply's ID
stands for its thread. Reviews support time ranges, canvas annotations, replies,
and resolving comments.

## Disable review links

```sh
osmo unshare SHARE
```

Requires login and owner or editor access to the share. Works from any folder
without local project files, Git, or FFmpeg. Add `--json` for
`{ "status": "unshared", "share": "SHARE_ID", "restore": "..." }`, where `restore`
is the command that would turn the links back on. Repeating `unshare` is safe.

Videos, comments, and history remain stored. The main review link, all version
links, public comment reads/writes, and new public download links stop working.
The people on the share can still read its comments with `osmo comments list SHARE`,
and its owners and editors can still answer them with `osmo comments reply`.

Previously obtained direct media URLs and downloaded copies are not revoked;
already issued signed downloads can remain valid until expiry.

A successful new `osmo share FILE.mp4 --to SHARE` restores the review links for
the share and its existing versions. Uploads begun before links were disabled,
failed uploads, and retries of old completion requests do not restore them.
Start a new upload to restore sharing.

## Delete a share

```sh
osmo shares delete SHARE
osmo shares delete SHARE --yes
```

Deletes a share for good: its videos, comments and history are removed, and this
can't be undone. Only the share's owner can delete it. SHARE is the share's link
or ID; a version's link is refused, since every version goes.

Without `--yes` nothing is deleted. The command exits 1 and says what would go:
with `--json`, `{ "status": "error", "error": "confirmation_required", "message": "...",
"share": "SHARE_ID", "name": "NAME", "versions": N }` on stderr. With `--yes` it
deletes, and `--json` prints `{ "status": "deleted", "share": "SHARE_ID", "versions": N }`.
While a video is still uploading to the share the command is refused; run it again
once the upload has finished.
