Fix a wrong display aspect ratio: setdar in Sume video-filter
If a video plays stretched, send setdar to Sume video-filter: setdar is on the allowlist, setsar too. Use check first, then encode a new MP4.

To fix a video that plays stretched or squeezed, send a setdar filter to Sume's POST /v1/video-filter, for example "filtergraph": "setdar=16/9". setdar and setsar are both on the allowlist, and the call returns a new MP4.
Two stored posts cover setsar=1 for platforms that need square pixels. This one is about the display aspect ratio, which is the shape players draw.
What is the difference between DAR and SAR?
The display aspect ratio is the shape of the picture a player shows. The sample aspect ratio is the shape of one pixel. A file can carry correct pixels and a wrong display ratio, and then it plays stretched.
Sume does not decide which is wrong for you. Probe the clip with video inspect to see its size and compare it with what the player shows.
| Filter | What it sets | Typical use |
|---|---|---|
| setdar | Display aspect ratio | Fix a stretched playback shape |
| setsar | Pixel aspect ratio | Force square pixels |
| scale | Pixel dimensions | Resize the frame |
| pad | Canvas around the frame | Letterbox to a ratio |
What is the request?
The source must be a Sume-hosted clip (import it first), and the encode call needs an Idempotency-Key. The check endpoint accepts the same body, needs no key and costs nothing.
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/talk.mp4",
"filtergraph": "setdar=16/9"
}'When is setdar the wrong tool?
If the picture is the wrong shape in pixels, for example a 16:9 file where you need 9:16, setdar will not help; it only relabels. Use crop in ops[] or pad in the filtergraph to change what is in the frame.
The output inherits the source frame rate and audio, so the sound is unchanged. The source must be at most 300 seconds.
What should I check after the job?
Read filters[] in the result: it lists the compiled filter names, so you can confirm setdar ran. Then open the new video_url in the player that showed the problem. Poll the job; the default mode is async and sync waits at most 30 seconds, per the jobs page.
Sources
Related posts
More in Media tools
- Flip a video upside down with the API: vflip in video-filter
To flip a video upside down in Sume, send filtergraph vflip to video-filter; hflip mirrors it. vflip, hflip and transpose are all on the allowlist.
- Flow Insert: add an object to a video, and the Sume API equivalent
Flow's Insert adds objects to a generated scene. What Google's launch post says, and how to add a prop to an existing clip with Gemini Omni video edit on Sume.
- Gemini Omni Flash outputs 24 FPS: conform to 25 or 30 with Sume
The Gemini API model card lists 24 FPS for Omni Flash output. If your timeline is 25, 30 or 60, Sume's video trim can conform it with an output fps field.
- Gemini video understanding: 100 vs 300 tokens a second vs Sume
Gemini reads video at about 100 tokens a second, or 300 at high resolution: 60,000 or 180,000 tokens for 10 minutes. How Sume's stills route compares.
Written by Sume