# Convert uploads for web playback

Turn user uploads into browser-ready MP4

Users upload MOV, MKV, AVI, WebM. Browsers want h264 + AAC in MP4. Converting uploads on ingest means every video plays everywhere, without relying on browser codec support.

## API

<CodeGroup labels={["CLI", "TypeScript", "Python", "curl"]}>
```bash
ittybit video \
  -i https://your-bucket.s3.amazonaws.com/uploads/video.mov
```

```typescript
const task = {
  input: 'https://your-bucket.s3.amazonaws.com/uploads/video.mov',
  kind: 'video',
};

const res = await fetch('https://api.ittybit.com/jobs', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ITTYBIT_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(task),
});
const data = await res.json();
```

```python

task = {
    "input": "https://your-bucket.s3.amazonaws.com/uploads/video.mov",
    "kind": "video",
}

res = requests.post(
    "https://api.ittybit.com/jobs",
    headers={"Authorization": f"Bearer {api_key}"},
    json=task,
)
data = res.json()
```

```bash
TASK='{
  "input": "https://your-bucket.s3.amazonaws.com/uploads/video.mov",
  "kind": "video"
}'

curl -X POST https://api.ittybit.com/jobs \
  -H "Authorization: Bearer $ITTYBIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$TASK"
```

</CodeGroup>

No options needed — defaults produce MP4 with h264 + AAC.

Compress with `quality`:

```json
{ "input": "https://...", "kind": "video", "options": { "quality": "medium" } }
```

## CLI

```bash
ittybit video \
  -i upload.mov \
  -o web.mp4

ittybit video \
  -i upload.mov \
  -o web.mp4 \
  --quality medium
```

## Resizing

```bash
ittybit video \
  -i upload.mov \
  -o web.mp4 \
  --width 1280 \
  --quality medium
```

Height auto-calculates to preserve aspect ratio.

## Quality guide

| Level       | Use case    | Typical savings |
| ----------- | ----------- | --------------- |
| `very_low`  | Previews    | ~90% smaller    |
| `low`       | Mobile      | ~85% smaller    |
| `medium`    | General web | ~75% smaller    |
| `high`      | Streaming   | ~50% smaller    |
| `very_high` | Archival    | ~30% smaller    |

## S3 input/output

Process files directly from and to your own S3 storage using [connections](/cli/connections):

```bash
ittybit video \
  -i s3://uploads/raw.mov \
  -o s3://media/web.mp4 \
  --connection my-s3 \
  --quality medium
```

## See also

- [API `POST /jobs`](/api/create-job) — create video jobs via HTTP
- [CLI `video`](/cli/video) — full reference for video flags and options
- [CLI `adaptive`](/cli/adaptive) — create HLS streams for adaptive playback
- [Extract thumbnails](/guides/extract-thumbnails-from-video) — pull poster frames from the same video
- [Extract audio](/guides/extract-audio-from-video) — pull the audio track