Skip to main content

Recipe: Edit & clean up video

Goal: take raw footage and transcode it, split it into frames/segments, or remove an unwanted object from the shot.

Nodes you'll use: Video InputVideo Converter / Video Split / FFmpeg GPU Video Process, and for object removal SAM2 Video MaskVideo Object Remover / Video Painter.

Transcode or split

  1. Add a Video Input node pointing at your clip.
  2. Add Video Converter (change format/codec) or Video Split (to frames or segments).
  3. Connect, Save, Run, download.

For heavy jobs, FFmpeg GPU Video Process runs the transcode on a GPU worker.

Remove an object from a shot

  1. Video Input → a masking node (e.g. SAM2 Video Mask) to select the object across frames.
  2. Feed the masked video into Video Object Remover (or Video Painter) to inpaint where the object was.
  3. Run, then download the cleaned clip.

Object removal is frame-by-frame inpainting and is GPU-heavy — expect longer runs on longer clips, and watch the per-node progress.

Over the API

Same loop as any workflow — upload the clip, run your saved video workflow:

# $AUTH is "Authorization: Bearer <token>" — get it from your sk_ key,
# see /api-reference#authentication
COG=$(curl -s -X POST "$BASE/cogs/upload-file" -H "$AUTH" \
-F "file=@./clip.mp4" | jq -r .id)
curl -s -X POST "$BASE/workflows/workflow-versions/<your_version_id>/run" -H "$AUTH" \
-H "Content-Type: application/json" -d "{\"cog_ids\": [$COG]}"