Phone clip with rotation metadata: vertical? Read video inspect

A phone MP4 can store 1920x1080 pixels plus a rotation tag and play as vertical. Read width, height and rotation from video inspect before you judge a Short.

5 min readSume
All posts

Not from width and height alone. A phone can record 1920x1080 stored pixels with a rotation tag of 90, and a player shows it as 1080x1920 vertical. Sume's video inspect returns width, height and rotation in its probe, so compute the displayed shape yourself: swap width and height when rotation is 90 or 270. Do that before you apply YouTube's square-or-vertical rule for Shorts.

The rule you are checking

YouTube Help: Understand three-minute Shorts, read 2026-10-04, says Shorts are square or vertical videos up to 3 minutes and that 16:9 stays long-form. So the aspect test has to run on displayed dimensions. A raw stored-pixel check of a rotated clip would call a vertical phone video landscape.

Stored size, rotation and displayed shape (YouTube rule read 2026-10-04; the displayed column is computed here)
Stored w x hrotationDisplayed w x hSquare or vertical?
1080 x 192001080 x 1920Yes, vertical
1920 x 1080901080 x 1920Yes, vertical
1920 x 108001920 x 1080No, landscape
1080 x 108001080 x 1080Yes, square

Read the probe

Video inspect is a probe on one Sume-hosted clip and returns duration_seconds, width, height, rotation and fps among others. Pass frames: false to skip stills. Import the clip first with POST /v1/media-imports, because the video must be on media.sume.com.

def displayed(width, height, rotation):
    if rotation in (90, 270, -90, -270):
        width, height = height, width
    return width, height

def shorts_shape(width, height, rotation, seconds):
    w, h = displayed(width, height, rotation)
    return h >= w and seconds <= 180

print(shorts_shape(1920, 1080, 90, 45))  # True

What to do with the answer

If the clip is landscape, a vertical Short means either a crop or a letterbox. Video filter crops with fractions of the frame, and Timeline 1.0 renders 1080x1920 by default with fit set to cover, contain, stretch or blur per slot. If the probe reports a duration above 180 s, video trim cuts it, since output can be 0.2 to 900 s. The docs read here do not say how trim treats a rotation tag, so probe the output as well.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume