How to check a video's bitrate from its size and length

Check a video's average bitrate: size in bytes × 8 ÷ length in seconds. Sume's free probe returns both numbers, size_bytes and duration_seconds.

4 min readSume
All posts

To check a video's bitrate, divide its size in bits by its length in seconds: the file size in bytes × 8 ÷ the duration in seconds is its average bitrate, in bits per second, for everything in the file, video and audio together. Sume's free video inspect probe has no bitrate field, but it returns both numbers the formula needs, size_bytes and duration_seconds.

The facts come from the Video inspect, Video trim, Video filter, and Timeline 1.0 docs, the probe's field list in the Sume API reference, and FFmpeg's codecs documentation, read on 2026-09-27. Anything described as current behavior is read from Sume's code.

How do I calculate bitrate from file size and length?

The same arithmetic works with any tool that shows a file's size and length:

  • Bits per second = size in bytes × 8 ÷ length in seconds. Divide by 1,000 for kbps or by 1,000,000 for Mbps.
  • Example: 45,000,000 bytes over 60 seconds is 45,000,000 × 8 ÷ 60 = 6,000,000 bits per second, or 6 Mbps.
  • The reverse turns a bitrate into a file size: bits per second × seconds ÷ 8. At 8 Mbps, one minute is 60,000,000 bytes, or 60 MB.

How do I read the size and length with Sume?

Run a probe-only inspect, POST /v1/video-inspect with frames: false, on your workspace's media.sume.com file, such as an earlier Sume job's output; which URLs each endpoint accepts explains the rule. The probe is unbilled, and the default sync mode answers within 30 seconds or returns a job to poll. Every field below except has_audio can come back null, so check both numbers before you divide.

Probe fields from the Sume API reference for Video inspect, read 2026-09-27.
FieldTypeUse in the calculation
size_bytesintegerThe file's size in bytes; × 8 gives bits
duration_secondsnumberThe file's length, the divisor
has_audio, audio_codecboolean, stringWhether the average includes an audio track, and in which codec
width, height, fpsinteger, integer, numberThe frame size and rate the bits are spread over
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-bitrate-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/clip.mp4",
    "frames": false
  }'

Why is the average not the whole story?

  • It includes the audio. Today a Sume exact trim, filter, or Timeline render encodes kept audio as AAC at 192 kbps, so subtract about 192 kbps to estimate the video's share of one of those files.
  • It counts the container's own bytes too, not only the audio and video streams.
  • It hides peaks. A variable-bitrate encode spends more bits on busy scenes than on still ones, so the rate at a given moment can sit well above the average.

Can I set the bitrate of a Sume video?

No. Trim, filter, and Timeline take no bitrate field and refuse encoder keys: codec and crf fail with ffmpeg_fields_rejected on trim and filter, and with a 400 on Timeline. Today they encode to a constant quality instead, libx264 at CRF 18 for exact trims and CRF 20 for filters and renders, a setting FFmpeg's docs describe as constant quality mode, so the bitrate follows the picture.

To bring a clip's bitrate down, give the encoder less to carry, as in reduce a video's file size.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume