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.

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?
| Option | What it does |
|---|---|
split[a][b] | Duplicates the frame into two internal labels. |
crop=iw/4:ih/4:iw*0.4:ih*0.3 | Takes a quarter-size region starting at 40% across and 30% down. |
scale=iw*2:ih*2 | Doubles the cropped region; iw here is the cropped width. |
overlay=W-w-24:H-h-24 | Places 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
- A/B test two LLMs on one Sume Format input with the model field
Run one Sume Format twice with a different model, then compare the receipt's model and debited cost. A short Python script with an Idempotency-Key and polling.
- Agent Completions 404 agent_run_not_found: which id to poll
A 404 agent_run_not_found means the id is not an Agent Completion run of your account, often an Action or Format run id. Poll, list and cancel agrun_ runs.
- Agent Completions 400: generation_spend_cap_usd is required
POST /v1/agent/completions returns 400 invalid_request without generation_spend_cap_usd. It has no default: why, how to size it, and what the receipt echoes.
- Agent Completions input_image: send a photo in messages[]
Send an image to Sume's Agent Completions as an input_image content part inside messages[], merge it with attachments, and get a caption back as typed output.
Written by Sume