Extract GIF from video

“Chatter” (a team messaging app like Slack) lets users turn video moments into reaction GIFs.

API

ittybit image \
  -i https://chatter-app.com/clips/funny-moment.mp4 \
  --format gif \
  --start 3 \
  --width 320 \
  --cloud
const task = {
  input: "https://chatter-app.com/clips/funny-moment.mp4",
  kind: "image",
  options: {
    format: "gif",
    start: 3,
    width: 320,
  },
};

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://chatter-app.com/clips/funny-moment.mp4",
    "kind": "image",
    "options": {
        "format": "gif",
        "start": 3,
        "width": 320,
    },
}

res = requests.post(
    "https://api.ittybit.com/tasks",
    headers={"Authorization": f"Bearer {api_key}"},
    json=task,
)
data = res.json()
TASK='{
  "input": "https://chatter-app.com/clips/funny-moment.mp4",
  "kind": "image",
  "options": {
    "format": "gif",
    "start": 3,
    "width": 320
  }
}'

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

This extracts a frame at 3 seconds as a GIF. For animated GIFs from video segments, you’ll want to keep the segment short and the dimensions small — GIFs get large fast.

CLI

ittybit image \
  -i funny-moment.mp4 \
  -o reaction.gif \
  --start 3 \
  --width 320

Small and sharp

GIF files are uncompressed per frame. Keep them small:

ittybit image \
  -i clip.mp4 \
  -o reaction.gif \
  --start 5 \
  --width 240

Consider WebP instead

WebP supports animation and produces much smaller files than GIF:

ittybit image \
  -i clip.mp4 \
  -o reaction.webp \
  --start 5 \
  --width 320

If your platform supports WebP (most modern apps do), prefer it over GIF.