Add a zoomed detail inset to a video: crop, scale, overlay
Show a magnified product detail in the corner of the same clip using one Sume video-filter graph: split, crop, scale 2.4x, white border, overlay. $0.02.

To put a magnified detail in the corner of the same video, send Sume's video filter a graph that splits the clip, crops a region from one copy, scales it up, adds a white border and overlays it back: split[a][b];[b]crop=w=iw*0.3:h=ih*0.2:x=iw*0.35:y=ih*0.4,scale=w=iw*2.4:h=-2,pad=w=iw+8:h=ih+8:x=4:y=4:color=white[c];[a][c]overlay=x=W*0.04:y=H-h-H*0.04. It costs $0.02 per encode and the check is free.
This is the tool for a callout of a label, a stitch or a button on a clip you already have, for instance a motion clip animated from a Nano Banana 2.1 product still. Timeline compose cannot do it: compose layers one still and one video, so a second view of the same video has to be built inside video filter.
How does the graph work?
Video filter takes filters only; the server supplies the input, so the graph starts at split and ends at overlay with no labels at either end. split[a][b] gives a full-frame branch and a branch to cut up.
On branch [b], crop keeps 30 percent of the width and 20 percent of the height, starting 35 percent across and 40 percent down. Inside the graph those are expressions on iw and ih, the input size of that filter. scale=w=iw*2.4:h=-2 enlarges the crop 2.4 times and keeps the aspect with an even height. pad adds a 4 pixel white frame on every side. Finally overlay places [c] on [a]; W and H are the main frame, h is the inset height, so the inset sits 4 percent from the left and bottom edges.
- The inset width is 0.3 x 2.4 = 72 percent of the frame width, plus the border. Keep crop width times scale under about 0.8 so it does not cover the frame.
- Move the crop with
xandyfractions; the inset shows the same region for the whole clip, so pick a spot where the subject stays still. - Do not use commas inside an expression: Sume refuses backslash escapes, so
min()andmax()calls are out. The recipe needs none.
What does the check return?
Run the check route with the same body. It lists the compiled filter names (split, crop, scale, pad, overlay) and tells you whether to submit or fix the program.
A source that is HDR or not a YUV format fails closed, so convert or regenerate that clip first.
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/clip.mp4",
"filtergraph": "split[a][b];[b]crop=w=iw*0.3:h=ih*0.2:x=iw*0.35:y=ih*0.4,scale=w=iw*2.4:h=-2,pad=w=iw+8:h=ih+8:x=4:y=4:color=white[c];[a][c]overlay=x=W*0.04:y=H-h-H*0.04"
}'What stays fixed and what can you tune?
Every value is a fraction, so the same graph works on a 480p or 720p source from the same model without edits.
| Value | In the graph | Effect |
|---|---|---|
| Crop size | w=iw*0.3, h=ih*0.2 | Region that gets magnified |
| Crop position | x=iw*0.35, y=ih*0.4 | Where the region starts |
| Zoom | scale w=iw*2.4 | Inset width relative to the crop |
| Border | pad +8, offset 4, white | Frame around the inset |
| Placement | x=W*0.04, y=H-h-H*0.04 | Bottom-left corner |
Where does it fit in the pipeline?
Run the inset on the clip before assembly and place the result in a Timeline slot, then add captions last so they are not magnified or covered. The inset is part of the picture, so the original clip is still available if you want a version without it.
Sources
Related posts
More in Media tools
- avgblur, boxblur, gblur or smartblur: which blur on Sume?
Sume's video filter allows four blur filters. What each does, which to pick for a soft background, and how to check a graph free before the $0.02 encode.
- Brighten an underexposed AI video: exposure in video-filter
To lift a dark clip in Sume, send filtergraph exposure=exposure=0.6 to video-filter. Range -3 to 3 stops, one $0.02 job, source clip up to 300 seconds.
- Thicken or thin bright shapes in a video: dilation and erosion by API
dilation grows bright areas and erosion shrinks them, two allowlisted filters in Sume's video filter. When they help and how to check cheaply.
- Make the spoken caption word bigger or bolder: typography ranges
Sume's design.typography sets weight, spoken-word scale, size, safe width and outline width for burned-in captions. Here are the exact ranges and the 400s.
Written by Sume