# task


Run individual processing tasks

```bash
ittybit task <kind> -i '<json>' [flags]
```

Atomic operations. Unlike [`ittybit video`](/cli/video) (full pipeline), tasks run one thing at a time. Compose them into custom workflows — probe a file first, then decide what to encode based on the result.

## Kinds

### probe

```bash
ittybit task probe \
  -i '{"url":"https://example.com/video.mp4"}'
```

Returns format, dimensions, duration, codecs.

### import

```bash
ittybit task import \
  -i '{"url":"https://example.com/video.mp4"}'
```

Downloads to local storage.

### video · audio · image · animation · adaptive_video

Encode from a probed File object:

```bash
ittybit task video \
  -i '{"object":"file","url":"file://input.mp4","kind":"video","format":"mp4","width":1920,"height":1080,"duration":62.5,"codecs":{"video":"h264","audio":"aac"}}' \
  --width 1280 \
  --quality medium
```

### export

```bash
ittybit task export \
  -i '{"object":"file","url":"file://output.mp4","kind":"video","format":"mp4"}' \
  -o s3://bucket/key.mp4 \
  --connection my-s3
```

## Composing

```bash
ittybit task probe -i '{"url":"https://example.com/video.mp4"}' --json | \
  jq '.output' | \
  xargs -I {} ittybit task image -i '{}' --start 5 -o poster.jpg
```

## Local

Run a task locally using FFmpeg instead of cloud:

```bash
ittybit task probe \
  -i '{"url":"https://example.com/video.mp4"}' \
  --local
```

Requires FFmpeg installed. The task is executed on your machine.

## See also

- [API `POST /tasks`](/api/create-task) — create standalone tasks via HTTP
- [`video`](/cli/video), [`audio`](/cli/audio), [`image`](/cli/image), [`animation`](/cli/animation), [`adaptive`](/cli/adaptive) — full pipeline commands
- [`connections`](/cli/connections) — set up S3 for the `export` task