How to rotate a video 90 degrees and save it
Rotate a video 90 degrees with ffmpeg's transpose filter: clock turns it clockwise, cclock counterclockwise. Sume's video filter saves a new MP4.

To rotate a video 90 degrees and save it, re-encode the clip with ffmpeg's transpose filter: transpose=clock turns the picture 90° clockwise and transpose=cclock turns it 90° counterclockwise, so the frame's width and height swap. With Sume, for a clip already hosted on Sume, send that filter as the filtergraph of POST /v1/video-filter, and you get back a new MP4 in the new orientation.
The FFmpeg facts come from its ffmpeg tool and filters documentation and the Sume facts from the Video filter docs and the Sume API reference, all read on 2026-09-27. Which filter names Sume accepts is read from its filter compiler and describes current behavior.
Which transpose value rotates the video which way?
On your own computer, FFmpeg applies the filter with -vf while it re-encodes the file: ffmpeg -i input.mp4 -vf transpose=clock output.mp4 saves a copy turned 90° clockwise.
transpose takes a direction. FFmpeg's docs mark the numeric values as deprecated in favor of the names, but both still turn up in scripts, so the table lists both. Plain transpose with no value is not a plain rotation: its default, cclock_flip, also flips the picture vertically.
- To rotate only the clips that are landscape, add
passthrough:transpose=dir=clock:passthrough=portraitleaves a clip alone when its height is at least its width.
| Filtergraph | Old numeric form | Result |
|---|---|---|
transpose=clock | transpose=1 | 90° clockwise |
transpose=cclock | transpose=2 | 90° counterclockwise |
transpose=cclock_flip | transpose=0 (the default) | 90° counterclockwise and flipped vertically |
transpose=clock_flip | transpose=3 | 90° clockwise and flipped vertically |
How do I rotate a video 90 degrees with the Sume API?
Send the clip and the filter to POST /v1/video-filter. The video_url must already be your workspace's media.sume.com artifact or asset, such as the output of an earlier Sume job: the filter does not fetch from the open internet, and Sume has no public upload route for a file on your computer (which URLs each endpoint accepts). The encode needs an Idempotency-Key.
- Check it for free first:
POST /v1/video-filter/checktakes the same body, runs the same schema, allowlist, and source checks, and returns diagnostics instead of a400. It creates no job and reserves no credits. - The default
modeisasync, so pollGET /v1/jobs/:id/statusand thenGET /v1/jobs/:id/result. Thekind: video_filterresult carries a newvideo_url, never the source, which stays untouched.mode: "sync"waits up to 30 seconds for a finished job. - The docs say the output inherits the source's geometry, frame rate, and audio unless the program changes them. A rotation changes the geometry, so a 1920×1080 clip comes back 1080×1920 and keeps its 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: rotate-clip-001" \
-d '{
"video_url": "https://media.sume.com/artifacts/artf_demo/sideways.mp4",
"filtergraph": "transpose=clock"
}'How do I rotate a video 180 degrees or by a few degrees?
For a half turn, chain two quarter turns, transpose=clock,transpose=clock, or flip the picture both ways with hflip,vflip. transpose, hflip, and vflip are all on Sume's allowlist today.
For a small tilt, use rotate, also on the allowlist, which takes an angle in radians and turns clockwise; a negative angle turns counterclockwise. FFmpeg's docs rotate by 45 degrees with rotate=45*PI/180, so a 5-degree fix is rotate=5*PI/180. The output keeps the input's width and height by default, so the corners of the turned picture are cut off and the uncovered area is filled with fillcolor, black by default.
Will rotating turn a landscape video into a portrait video?
It changes the frame's shape, not the framing: a rotated landscape clip becomes a portrait frame with the scene lying on its side. To put a landscape shot upright into a 9:16 frame, crop it or fit it into the frame instead, as in convert a landscape video to vertical.
What does it cost, and what are the limits?
One job rotates one clip, so a batch of clips is one job per clip, each with its own Idempotency-Key. The check is free, and each encode is billed per job at the rate GET /v1/catalog lists, plus a 5.5% agent fee by default. The graph rules and encoder settings are in Sume's ffmpeg filter allowlist.
| Limit | What the docs say |
|---|---|
| Source length | Up to 300 seconds; a longer source fails with output_duration_exceeded. |
| Source URL | Your workspace's media.sume.com artifact or asset; off-host URLs are rejected at admit. |
| HDR sources | PQ and HLG sources are refused with hdr_source_unsupported. |
Sources
Related posts
More in Media tools
- Shopify product image size and video specs for AI media
Shopify says 2048 x 2048 px usually displays best for square product images. Request that size from Sume, then check Shopify's other caps.
- Snapchat ad specs: 9:16 video at 720×1280, 3 to 180 seconds
Snapchat video ads are 9:16 at 720×1280, .mp4 or .mov, 3 to 180 seconds; Commercials keep the first 6 seconds unskippable. How to make one with Sume.
- Spotify video ad specs: 9:16 or 16:9, up to 30 seconds
Spotify video ads run up to 30 s, 9:16 or 16:9 at about 720x1280 or 1280x720, as MOV or MP4 up to 500 MB, with sound at -14 dBFS RMS.
- Threads ads specs: video ratios, the 4:5 crop, and captions
Threads ads take image, video, and carousel creatives. Video from 1.91:1 to 9:16 is supported, but anything taller than 4:5 is cropped to 4:5.
Written by Sume