Write output to S3

By default, processed files go to Ittybit’s CDN. If you want them in your own bucket, set an S3 output destination.

API

ittybit video \
  -i https://example.com/uploads/video.mov \
  -o s3://my-media-bucket/processed/video.mp4 \
  --width 1280 \
  --format mp4 \
  --cloud
const task = {
  input: "https://example.com/uploads/video.mov",
  kind: "video",
  options: {
    width: 1280,
    format: "mp4",
  },
  output: "s3://my-media-bucket/processed/video.mp4",
};

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

task = {
    "input": "https://example.com/uploads/video.mov",
    "kind": "video",
    "options": {
        "width": 1280,
        "format": "mp4",
    },
    "output": "s3://my-media-bucket/processed/video.mp4",
}

res = requests.post(
    "https://api.ittybit.com/tasks",
    headers={"Authorization": f"Bearer {api_key}"},
    json=task,
)
data = res.json()
TASK='{
  "input": "https://example.com/uploads/video.mov",
  "kind": "video",
  "options": {
    "width": 1280,
    "format": "mp4"
  },
  "output": "s3://my-media-bucket/processed/video.mp4"
}'

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

The output field takes an s3:// URL. The processed file lands directly in your bucket.

CLI

ittybit video \
  -i video.mov \
  -o s3://my-media-bucket/processed/video.mp4 \
  --width 1280

S3 to S3

Read from one bucket, write to another:

ittybit video \
  -i s3://raw-uploads/video.mov \
  -o s3://processed-media/video.mp4 \
  --width 1280 \
  --format mp4 \
  --cloud
const task = {
  input: "s3://raw-uploads/video.mov",
  kind: "video",
  options: {
    width: 1280,
    format: "mp4",
  },
  output: "s3://processed-media/video.mp4",
};

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

task = {
    "input": "s3://raw-uploads/video.mov",
    "kind": "video",
    "options": {
        "width": 1280,
        "format": "mp4",
    },
    "output": "s3://processed-media/video.mp4",
}

res = requests.post(
    "https://api.ittybit.com/tasks",
    headers={"Authorization": f"Bearer {api_key}"},
    json=task,
)
data = res.json()
TASK='{
  "input": "s3://raw-uploads/video.mov",
  "kind": "video",
  "options": {
    "width": 1280,
    "format": "mp4"
  },
  "output": "s3://processed-media/video.mp4"
}'

curl -X POST https://api.ittybit.com/tasks \
  -H "Authorization: Bearer $ITTYBIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$TASK"
ittybit video \
  -i s3://raw-uploads/video.mov \
  -o s3://processed-media/video.mp4 \
  --width 1280

Connection setup

You need a connection configured for the bucket. See Process files from S3 for setup instructions.