Creative workflow

Fix Stretched Video With Square Pixels in FFmpeg

A stretched charcoal fold rests in an ivory depression with a narrow amber seam

The fictional Marshlight clip contained a circle that looked narrow in a viewer reading only the stored pixels. We encoded an anamorphic sample, verified its metadata with ffprobe, and captured both the stored raster and the square-pixel output for review in production Ciyo.

Quick answer

Inspect width, height, sample aspect ratio and display aspect ratio. Resample to dimensions that preserve the intended display shape, set SAR to 1:1, and confirm both the output stream and a known round object.

Read the stream rather than guessing from the filename

Use ffprobe to show width, height, sample_aspect_ratio and display_aspect_ratio. Our source stored 180 × 120 samples and had SAR 4:3. Multiplying the stored ratio 180÷120 by 4÷3 gives a display ratio of 2:1. A player honoring that metadata should display the circle round.

Production canvas at the start

Ciyo displays the uncorrected 180 by 120 stored raster with its narrow circle
Production canvas at the start

Resample to the intended square-pixel raster

For the example, use -vf 'scale=240:120,setsar=1'. Keep the intended display ratio and select dimensions allowed by your delivery codec. Setting SAR to 1 on the old stored size alone would leave its display ratio at 3:2. Export to a new file and decide whether to map or encode audio separately.

Verify metadata and a geometry reference

The result reported 240 × 120, SAR 1:1 and the same display ratio of 2:1. Open the output and compare a known circle or square. The left proof is the raw stored raster without its display correction. The right is the resampled frame. The Ciyo canvas displays screenshots of those states.

Production canvas after the comparison

Ciyo compares the squeezed stored raster with the round circle in the 240 by 120 square-pixel output
Production canvas after the comparison

Check the intended destination player

Reopen the exported file in the intended browser or editor. If SAR is already 1:1 and the shape is wrong, investigate the source crop, a scale transform or letterboxing before applying this recipe. Confirm the actual handoff dimensions match the platform requirement.

Example files

Sources and related reading

Quick questions

Is setting a new display ratio enough?

Changing metadata can work if all players respect it. For a square-pixel delivery requirement, resample the pixels and verify SAR 1:1.

Does a correct display ratio guarantee the subject will look right?

It corrects how the whole raster is displayed. A source that was distorted earlier may still need a separate visual repair.

Try it on your canvas

Keep the input and reviewed result on separate layers so you can revisit the decision before handing off the final file.