Extract thumbnails from video
Every video needs a poster image. Thumbnails drive click-through rates in feeds, search results, and video players.
API
ittybit image \
-i https://example.com/video.mp4 \
--cloudconst task = {
input: "https://example.com/video.mp4",
kind: "image",
};
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/video.mp4",
"kind": "image",
}
res = requests.post(
"https://api.ittybit.com/tasks",
headers={"Authorization": f"Bearer {api_key}"},
json=task,
)
data = res.json()TASK='{
"input": "https://example.com/video.mp4",
"kind": "image"
}'
curl -X POST https://api.ittybit.com/tasks \
-H "Authorization: Bearer $ITTYBIT_API_KEY" \
-H "Content-Type: application/json" \
-d "$TASK" At 5 seconds, resized:
{"input": "https://...", "kind": "image", "options": {"start": 5, "format": "webp", "width": 640}}
CLI
ittybit image \
-i video.mp4 \
-o poster.jpg
ittybit image \
-i video.mp4 \
-o poster.webp \
--start 5 \
--width 640
Multiple sizes
ittybit image \
-i video.mp4 \
-o large.webp \
--width 1280
ittybit image \
-i video.mp4 \
-o medium.webp \
--width 640
ittybit image \
-i video.mp4 \
-o small.webp \
--width 320
Format choice
| Format | Best for |
|---|---|
jpeg | Broadest compatibility |
webp | 25-35% smaller than JPEG |
avif | Smallest files, slower decode |
png | Lossless |
S3 input/output
Extract thumbnails from S3-hosted video using connections:
ittybit image \
-i s3://uploads/video.mp4 \
-o s3://media/poster.webp \
--connection my-s3 \
--start 5 \
--width 640
See also
- API
POST /taskswithkind: "image"— extract thumbnails via HTTP - CLI
image— full reference for image flags and options - Convert uploads for web playback — process the video itself
- Extract audio — pull the audio track from the same video