Magnified inset callout in video: split, crop, overlay

Sume's video filter has one input, but split, crop, scale and overlay are allowlisted, so a zoomed copy of one region can sit in a corner of the same frame.

4 min readSume
All posts

A magnifier inset shows a zoomed copy of one region in a corner of the frame, useful for screen recordings and product detail. Video filter takes only one clip, but it allowlists split, crop, scale and overlay, so a single graph can copy the picture, crop a region from the copy, enlarge it and overlay it back. See Video filter. Only internal labels are allowed.

Which parts of the graph do what?

Options of overlay as listed in the FFmpeg filter documentation, read 2026-10-01.
OptionWhat it does
split[a][b]Duplicates the frame into two internal labels.
crop=iw/4:ih/4:iw*0.4:ih*0.3Takes a quarter-size region starting at 40% across and 30% down.
scale=iw*2:ih*2Doubles the cropped region; iw here is the cropped width.
overlay=W-w-24:H-h-24Places the inset 24 px from the bottom-right corner of the main frame.

How do I run it?

The graph below passed Sume's graph validator and encoded in a local ffmpeg test on a 640x360 pattern, with the inset coming out at half the frame width. Change the crop origin to move the target region, the scale factor to change magnification, and the overlay offsets to move the inset.

curl -X POST https://api.sume.com/v1/video-filter/check \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/screen-recording.mp4",
    "filtergraph": "split[a][b];[b]crop=iw/4:ih/4:iw*0.4:ih*0.3,scale=iw*2:ih*2[z];[a][z]overlay=W-w-24:H-h-24"
  }'

Does the inset follow a moving subject?

No. Crop coordinates are fixed for the whole clip, and there is no keyframe control, so this suits static regions such as a UI corner. For a zoom on the whole picture, see punch-in zoom with zoompan.

How do I outline the inset so it reads as a callout?

Add a drawbox around the region in the main copy before the overlay, or chain drawbox on the inset. Draw a box on a video frame shows the options. Keep the graph under 32 filters and 2,048 characters.

What does a filter job cost and where are the limits?

The docs list $0.02 per encode job, with a source of at most 300 seconds, a filtergraph of at most 2048 characters and 32 named filters. The /v1/video-filter/check route runs the same allowlist and source checks for free and returns valid and next_action; a graph that passes can still fail on the worker (bad expression, memory, time), which comes back as a structured job error.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume