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

# coreav clip

> Cut a keyframe-aligned clip of an MP4 or MOV file, without re-encoding.

`coreav clip --start TIME [--end TIME] INPUT OUTPUT` cuts a clip of an MP4 or MOV file into a new MP4 file by stream copy. The clip starts at the latest keyframe at or before `--start`, so nothing has to be re-encoded, and ends at `--end` or at the end of the video. It keeps one video stream and one audio stream, the first of each unless you name them.

The summary ([`coreav.clip/1`](https://github.com/coreav-dev/coreav/blob/main/docs/schema/clip-v1.md)) on standard output says where the clip starts after the start snaps to a keyframe.

## Examples

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

## Options

```text theme={null}
Cut a keyframe-aligned clip of an MP4/MOV file to MP4, without re-encoding

Usage: coreav clip [OPTIONS] --start <TIME> <INPUT> <OUTPUT>

Arguments:
  <INPUT>   The file to clip
  <OUTPUT>  Where to write the clip: a new file, or `-` for standard output

Options:
      --start <TIME>         Start in seconds (for example `12.5`). The clip starts at the latest keyframe at or before it
      --end <TIME>           End in seconds; the end of the video when absent
      --video <STREAM>       The video stream index (default: the first video stream)
      --audio <STREAM|none>  The audio stream index, or `none` (default: the first audio stream)
      --allow <CODEC>        Codecs to accept, comma separated, as for `coreav probe`
      --strict               Reject the whole file when a stream's codec is not allowed
      --force                Overwrite OUTPUT if it exists (a symbolic link is replaced, not written through; the new file keeps the old one's permissions)
  -h, --help                 Print help
```


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