How to make a video square: crop it or fit it in 1:1

Make a video square by cropping a centered 1:1 window, or fit the whole frame in a square with black bars. Both are one FFmpeg filter job on Sume.

5 min readSume
All posts

To make a video square, either crop a centered 1:1 window out of the frame, which cuts off the sides of a landscape clip or the top and bottom of a vertical one, or fit the whole picture inside a square frame and fill the empty space with black bars or a blurred copy of the video. With Sume, one POST /v1/video-filter job does the crop or the black bars on a clip already hosted on media.sume.com, and a blurred fill takes a Timeline 1.0 render.

The FFmpeg syntax comes from the FFmpeg filters documentation, and the Sume facts from the Video filter and Timeline 1.0 docs and the Sume API reference, all read on 2026-09-27. Behavior read from Sume's code is described as it works today.

How do I crop a video to a square?

Cut a square as tall as the frame, or as wide for a vertical clip. In FFmpeg's crop filter the first two values are the output width and height, iw and ih are the input's width and height, and the window is centered unless you set x and y:

  • crop=ih:ih keeps the central square of a landscape clip. FFmpeg's docs write the same crop as crop=in_h.
  • crop=iw:iw keeps the central square of a vertical clip.
  • crop=ih:ih:0:0 keeps the left edge instead: x is where the window's left edge sits in the input.
  • scale=1080:1080 sets the size. By our arithmetic, a 1920×1080 source crops to 1080×1080 already, a 3840×2160 source to 2160×2160, and a 1280×720 source to 720×720, which scale then enlarges.
  • Send the chain as the filtergraph of a video filter job. The video_url must already be your workspace's media.sume.com artifact or asset, such as an earlier Sume job's output; which URLs each endpoint accepts explains the rule. The result is a new MP4 with the source's frame rate and audio.
curl -X POST https://api.sume.com/v1/video-filter \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: square-crop-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/landscape.mp4",
    "filtergraph": "crop=ih:ih,scale=1080:1080"
  }'

How do I make a video square without cropping?

Shrink the whole picture until it fits inside the square, then pad the empty space. For a clip of 300 seconds or less, one video filter job does both and keeps the clip's own sound, with this filtergraph: scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2.

  • force_original_aspect_ratio=decrease shrinks the output size where needed to keep the picture's aspect ratio, so a 1920×1080 clip becomes about 1080×608 (our arithmetic).
  • pad=1080:1080 makes a 1080×1080 frame. In its offsets, ow and oh are the padded size and iw and ih the picture's, so (ow-iw)/2:(oh-ih)/2 centers the picture.
  • The padding is black by default. For another color, add pad's color option, which takes a name or a hex value in FFmpeg's color syntax.
  • For a blurred copy of the video behind the picture, or for a clip longer than 300 seconds, render the clip into a Timeline 1.0 with output set to 1080×1080 and fit: "blur" (or "contain" for bars). Make a vertical video horizontal walks through that render, which takes the clip's sound as a separately detached track.
curl -X POST https://api.sume.com/v1/video-filter \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: square-pad-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/landscape.mp4",
    "filtergraph": "scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2"
  }'

What does each method keep?

For a 1920×1080 clip in a 1080×1080 square, the methods differ in how much of the picture you see and where the sound comes from:

Pixel sizes are our arithmetic for a 1920×1080 source. Behavior from Video filter, Timeline 1.0, the Sume API reference, the FFmpeg filters documentation, and Sume's Timeline compiler as it works today, read 2026-09-27.
MethodWhat the square showsSound
Crop: crop=ih:ih in a video filter jobThe middle 1080×1080; 420 pixels are cut from each sideThe source's audio
Black bars: scale plus pad in a video filter jobThe whole picture at about 1080×608, with black above and belowThe source's audio
Blurred fill: a Timeline 1.0 render with fit: "blur"The whole picture over a blurred copy of the frameOnly the track you pass as the render's audio

What are the limits and costs?

  • The video filter reads one clip of up to 300 seconds; a longer source fails with output_duration_exceeded. A Timeline 1.0 render's output runs 1–1800 seconds.
  • POST /v1/video-filter/check validates the same body for free, with no job and no reserved credits. A program that passes can still fail on the worker, for example on a bad expression, and that comes back as a job error.
  • Each filter encode is billed per job; the docs say to confirm the rate in GET /v1/catalog. The API pricing rate card lists a Timeline render at $0.10 per output minute.
  • Timeline output edges are even integers from 256 to 2160, so the largest square a render makes is 2160×2160.
  • The filter refuses HDR sources (PQ or HLG) with hdr_source_unsupported.
  • Every crop re-encodes and discards pixels; crop a video without losing quality covers keeping the loss small.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume