HomeEveryday Life › Video File Size Calculator

Video File Size Calculator

Estimates a video file's size from its duration and total bitrate, taken either from a resolution/frame-rate preset (YouTube's recommended H.264 upload bitrates, e.g. 1080p30 = 8 Mbit/s, 2160p30 = 45 Mbit/s) or an explicit bitrate, and the time to upload it at a given connection speed.

When to use

You need to know how large a recording or export will be, how much storage an hour of footage needs, or how long an upload will take.

Do not use when: The video uses variable bitrate with unknown average (file size then depends on content), or you only need transfer time for a known file size (use download-time).

Formula

total_bitrate = bitrate_mbps (or preset) + audio_bitrate_kbps / 1000; bytes = total_bitrate × 10⁶ × duration_minutes × 60 / 8; MB = bytes / 10⁶; GB = bytes / 10⁹; GiB = bytes / 2³⁰; upload_seconds = total_bitrate × duration_minutes × 60 / upload_speed_mbps

Container overhead (MP4/MKV) adds well under 1%. Presets are the upper values of YouTube's recommended constant-bitrate H.264 SDR upload settings; HEVC/AV1 exports and most phone recordings use different rates, so enter the actual bitrate where known.

Inputs

ParameterTypeUnitRequiredDescription
duration_minutesnumberminyesLength of the video in minutes. Range: > 0, ≤ 100000
presetenum: 360p | 480p | 720p30 | 720p60 | 1080p30 | 1080p60 | 1440p30 | 1440p60 | 2160p30 | 2160p60default 1080p30Video bitrate preset (YouTube recommended H.264 SDR upload bitrates, upper values). Ignored when bitrate_mbps is given.
bitrate_mbpsnumberMbit/snoExplicit average video bitrate; overrides the preset. Range: > 0, ≤ 10000
audio_bitrate_kbpsnumberkbit/sdefault 0Audio track bitrate added to the video bitrate (e.g. 128 for AAC stereo, 384 for 5.1). Range: ≥ 0, ≤ 10000
upload_speed_mbpsnumberMbit/snoOptional connection speed for the upload-time estimate. Range: > 0, ≤ 1000000

Outputs

OutputTypeUnitDescription
total_bitrate_mbpsnumberMbit/sVideo bitrate plus audio bitrate.
file_size_mbnumberMBMegabytes (10⁶ bytes).
file_size_gbnumberGBGigabytes (10⁹ bytes).
file_size_gibnumberGiBGibibytes (2³⁰ bytes), as shown by Windows and many file managers.
size_per_minute_mbnumberMB/mintotal_bitrate × 60 / 8.
size_per_hour_gbnumberGB/htotal_bitrate × 3600 / 8 / 1000.
upload_secondsnumbersbits / upload_speed (only when upload_speed_mbps is given).
upload_timestringSame time as h:mm:ss.

Example

10 minutes at 8 Mbit/s, upload at 20 Mbit/s: {"duration_minutes":10,"bitrate_mbps":8,"audio_bitrate_kbps":0,"upload_speed_mbps":20}{"total_bitrate_mbps":8,"file_size_mb":600,"file_size_gb":0.6,"file_size_gib":0.559,"size_per_minute_mb":60,"size_per_hour_gb":3.6,"upload_seconds":240,"upload_time":"0:04:00"}

90 minutes of 4K 30 fps (45 Mbit/s), upload at 50 Mbit/s: {"duration_minutes":90,"preset":"2160p30","upload_speed_mbps":50}{"total_bitrate_mbps":45,"file_size_mb":30375,"file_size_gb":30.375,"file_size_gib":28.289,"size_per_hour_gb":20.25,"upload_seconds":4860,"upload_time":"1:21:00"}

GET https://tttkmbb.com/api/v1/calculate/video-file-size?duration_minutes=10&bitrate_mbps=8&audio_bitrate_kbps=0&upload_speed_mbps=20

Machine access

Sources

FAQ

Why is the file smaller than the calculator says?

Most encoders use variable bitrate, so static scenes use far less than the target; the estimate is an upper bound for constant-bitrate encoding at the given rate.

Mbit/s or MB/s?

Bitrates are in megabits per second; divide by 8 for megabytes per second. 8 Mbit/s is 1 MB/s, i.e. 60 MB per minute.

Related calculators