Probe a finished video before upload: duration, size and aspect

Run video inspect with frames false to read a render's duration, size and frame rate before posting. Check it against the 3-minute Shorts limit.

5 min readSume
All posts

Call POST /v1/video-inspect on the finished MP4 with frames set to false and read the probe block of the result for duration, size and frame rate before you upload it anywhere. Video inspect is synchronous by default and waits up to 30 seconds. Probing first stops a render that is 4 seconds over a limit from being rejected after you have already queued the post. YouTube's help pages say Shorts can be up to 3 minutes and that a three-minute Short needs a square or vertical aspect ratio, which are both properties you can read from a probe.

The probe tells you facts about the file; whether a platform accepts them is the platform's decision, so compare against the page you read, not against this post.

What video inspect returns

The request takes the Sume-hosted video URL and optional frames (at[] or fps, max_edge from 64 to 2160 with a default of 768) and transcribe, which runs speech-to-text at $0.01 per audio minute. The result always carries probe. If you omit frames you get 8 stills, so send frames: false for the probe alone. Stills use Modal compute, and the source can be up to 1800 seconds.

If you need a still at the exact source size, use video frames instead: it always returns 202, takes 1 to 24 at values, max_edge from 16 to 2160, a source of up to 300 seconds, and is billed by Modal compute.

What to read from a probe and what to compare it with (read 2026-10-07)
Probe valueCompare withSource of the limit
duration3 minutes for a ShortYouTube Help: Shorts
width and heightSquare or vertical for a three-minute ShortYouTube Help: three-minute Shorts
frame rateThe rate you meant to deliverYour own plan
file sizeThe platform's file capThe platform's own page

A probe call

The request below asks only for the probe, with frames set to false. It needs an Idempotency-Key like the other Sume media writes, and the source has to be a media.sume.com artifact. If it does not finish in 30 seconds you get a 202 and can read GET /v1/video-inspect/:id later. Read the numbers from the response and test them with a few lines of your own code.

curl -X POST https://api.sume.com/v1/video-inspect \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: probe-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/final.mp4",
    "frames": false
  }'

A pre-upload gate

Wrap the call in a small check: refuse to upload when the duration is over 180 seconds or the shape is wider than tall. Keep the limits in one place in your code, with the date you read the pages, since platforms change them; the reading date for this post is 2026-10-07.

When the probe passes, store its output beside the file. If a platform later rejects the upload, you can compare the rejected file's values with the probe rather than guess.

When the numbers are wrong

If the duration is over, shorten the audio spine and re-render, or cut with video trim, which is $0.02 per job. If the shape is wrong, re-render with different output.width and output.height; the price is by output minute, not by pixel, so a re-render of a clip of a minute or less is $0.10.

Putting the gate in a pipeline

The natural place for the probe is the step right after the render finishes and before anything is published. The render result already reports duration_seconds, so the probe is a second opinion on the delivered file, plus width, height and frame rate, which the render result does not repeat.

Log the probe with the render's job id. When a platform's page changes, you can search your logs for every file that would have passed or failed the old and the new limit, without re-probing anything.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume