# clip.set_framing

> Sets how the asset of a clip is fitted into the frame and how much of each side is cropped.

Source: https://alexgalhardo.github.io/vukem-video/docs/reference/commands/clip.set_framing/

Sets fit (cover, contain or none) and merges the given crop sides with the current ones. Each side is a fraction of the asset from 0 to 1; left plus right and top plus bottom must stay below 1.

## Arguments

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `crop` | `object` | no | Sides to crop, fractions 0 to 1; sides not given keep their value. |
| `fit` | `cover`, `contain`, `none` | no | cover (default), contain or none. |
| `item_id` | `string` | yes | A clip. |

## Example

As one operation of an `edit` batch (the `edit` tool of MCP, `vukem-video edit --ops`, or `POST /api/v1/projects/{id}/edit`):

```json
{
  "op": "clip.set_framing",
  "args": {
    "crop": {
      "left": 0.1,
      "right": 0.1
    },
    "fit": "contain",
    "item_id": "itm_m1n2p3q4r5"
  }
}
```

## Errors

[`E_VALIDATION`](/docs/reference/error-codes#e_validation), [`E_NOT_FOUND`](/docs/reference/error-codes#e_not_found), [`E_TYPE_MISMATCH`](/docs/reference/error-codes#e_type_mismatch)

## Scope and phase

Scope `edit`, phase `alpha`. Run `vukem-video command:help clip.set_framing` for the same description from the binary.
