> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick start

> Describe a file, cut a clip, remux Matroska to MP4, check an upload, and run an ffprobe command line in strict-safe mode.

These steps use the `coreav` command from [Install](/docs/install.md) and two files of your own: an MP4 file, `input.mp4`, and a Matroska file, `input.mkv`. Every command exits with status 0 on success.

## Describe a file

```console theme={null}
$ coreav probe input.mp4
{
  "container": {
    "creation_time": null,
    "fragmented": false,
    "major_brand": "isom",
    "timescale": 1000
  },
  ...
  "schema": "coreav.probe/1",
  "streams": [
  ...
```

`coreav probe` also reads MOV, Matroska, WebM and MPEG-TS files. A Matroska or WebM file gives `coreav.probe-matroska/1`, and an MPEG-TS file gives `coreav.probe-mpegts/1`.

## Cut a clip

Cut from the keyframe at or before 1 s up to 3 s, without re-encoding:

```sh theme={null}
coreav clip --start 1 --end 3 input.mp4 clip.mp4
```

The summary (`coreav.clip/1`) says where the clip starts after the start time snaps back to a keyframe, and how many samples of each stream it holds.

## Remux Matroska to MP4

```sh theme={null}
coreav remux input.mkv output.mp4
```

The MP4 file has its movie header first (faststart). A stream other than video that MP4 cannot carry is dropped and listed in the summary (`coreav.remux/1`). A video stream that MP4 cannot carry fails the remux with exit status 1 and no output, unless you add `--drop-unsupported` ([`coreav remux`](/docs/commands/remux)).

## Check an upload against a policy

A policy is a `coreav.policy/1` JSON file. The repository has an example, [`web-upload.json`](https://github.com/coreav-dev/coreav/blob/main/docs/schema/policy-examples/web-upload.json).

```console theme={null}
$ coreav check --policy web-upload.json input.mp4
{
  "policy": "web-upload",
  "reasons": [],
  "schema": "coreav.verdict/1",
  "verdict": "accept"
}
```

Exit status 0 means that the file is accepted, and 1 that it is rejected. The verdict is on standard output in both cases.

## Run an ffprobe command line in strict-safe mode

Strict-safe mode is the mode for files you did not make. It runs only what CoreAV implements. For an H.264 file of 320 by 240 pixels with AAC audio, this command prints:

```console theme={null}
$ coreav --strict-safe ffprobe -v error -show_entries stream=codec_name,width,height -of csv=p=0 input.mp4
h264,320,240
aac
```

A command line that CoreAV does not implement is refused with exit status 4, and the real `ffprobe` does not run. [Strict-safe mode and the FFmpeg fallback](/docs/strict-safe.md) explains both modes.

## Next steps

* [Commands](/docs/commands.md) lists every command and its options. `coreav --help` and `coreav COMMAND --help` print the same text.
* [Python](/docs/python.md) shows the same operations from Python.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.