Will YouTube treat my video as a Short? Check it in Python
YouTube says Shorts are up to 3 minutes and square or vertical. A short Python script reads Sume's probe and tells you which side of the line a file falls on.

YouTube's upload page for Shorts says a Short can be up to 3 minutes long and square or vertical. Those are the two tests a file can fail before you upload, and both are readable from a probe. A short Python script can fetch the clip's width, height and duration from Sume and print which side of the line it falls on.
The rules are from Upload YouTube Shorts (read 2026-10-03). The three-minute length is newer than many tutorials assume. Understand three-minute YouTube Shorts (read 2026-10-03) says it applies to uploads made after October 15, 2024 on standard channels, and that earlier uploads stay long-form.
What the script tests
- Duration at most 180 seconds, taken from the probe's
duration_seconds. - Width no greater than height, which is how I read "square or vertical". The help pages give no ratio cutoff, so a 4:5 file is a judgement call, not a documented pass.
- Nothing about upload processing. YouTube decides on its side, and these are the only two limits the page states.
The check
Sume's video inspect returns a probe with duration_seconds, width and height when you pass frames: false. The call is sync for up to 30 seconds, then returns 202 and you poll the GET route. The source can be up to 1800 seconds long and has to be on media.sume.com.
import json, os, time, urllib.request as u
def call(method, path, body=None, key=None):
h = {"Authorization": "Bearer " + os.environ["SUME_API_KEY"],
"Content-Type": "application/json"}
if key:
h["Idempotency-Key"] = key
data = json.dumps(body).encode() if body is not None else None
req = u.Request("https://api.sume.com" + path, data, h, method=method)
with u.urlopen(req) as r:
out = json.load(r)
return out.get("data", out)
def probe(url, key):
d = call("POST", "/v1/video-inspect", {"video_url": url, "frames": False}, key)
for _ in range(30):
if d.get("probe"):
return d["probe"]
time.sleep(2)
d = call("GET", "/v1/video-inspect/" + d["id"])
raise TimeoutError("probe not ready")
URL = "https://media.sume.com/artifacts/artf_demo/clip.mp4"
p = probe(URL, "short-check-1")
w, h, s = p["width"], p["height"], p["duration_seconds"]
print("duration <= 180 s:", s <= 180, round(s, 1))
print("square or vertical:", w <= h, f"{w}x{h}")
Reading the result
A few cases show where the line sits.
| File | Length | Verdict |
|---|---|---|
| 1080x1920 | 58 s | Passes both tests |
| 1080x1080 | 175 s | Passes; square, under 3 minutes |
| 1920x1080 | 40 s | Fails shape: wider than tall |
| 1080x1920 | 181 s | Fails length by one second |
If a file fails on length, cut it with video trim, which takes start and duration and costs $0.02 per job. If it fails on shape, re-render it with a Timeline output of 1080x1920.
Before you upload
The probe reads the file, not the channel. YouTube's three-minute page ties the longer limit to the upload date and the channel type, so a file that passes both tests can still be treated as long-form on an older upload. Read the page's dates for your channel, and use Studio's own message on upload as the last word.
Sources
Related posts
More in Media tools
- YouTube A/B tests skip Shorts: make two caption-style variants
YouTube's A/B tool does not cover Shorts. Re-burn one Short in a second caption style with source_caption_id, then publish both and compare by hand.
- YouTube Auto-sync captions vs Sume script_text: track or burned in
YouTube Auto-sync times your transcript into a caption track. Sume script_text aligns your wording into burned-in captions. What each needs and which to use.
- YouTube Create drops library music past 15 seconds: bring a bed
Create's Audio Library music is removed on exports over 15 seconds. Generate a bed with Music Router and lay it under your Short with a Timeline soundtrack.
- YouTube in-feed video ad: vertical video and thumbnail size
Can a vertical video run as a YouTube in-feed ad, and what thumbnail size does Google list? Specs from Google Ads Help, plus a 1:1 crop and a still on Sume.
Written by Sume