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.

4 min readSume
All posts

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.

Aspect filters on the video-filter allowlist, read 2026-10-02
FilterWhat it setsTypical use
setdarDisplay aspect ratioFix a stretched playback shape
setsarPixel aspect ratioForce square pixels
scalePixel dimensionsResize the frame
padCanvas around the frameLetterbox 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

All Media tools posts

Written by Sume