task

View Markdown
ittybit task <kind> -i '<json>' [flags]

Atomic operations. Unlike ittybit 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

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

Returns format, dimensions, duration, codecs.

import

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:

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

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

Composing

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:

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

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

See also