# 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.

- Calculator id: `video-file-size` · Category: Everyday Life (`everyday`) · Tool name: `estimate_video_file_size`
- Canonical page: https://tttkmbb.com/everyday/video-file-size · This document: https://tttkmbb.com/everyday/video-file-size.md · JSON definition: https://tttkmbb.com/everyday/video-file-size.json

## Purpose

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.

**Use when:** 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).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `duration_minutes` | number | min | required | Length of the video in minutes. (> 0, max 100000) |
| `preset` | enum: 360p \| 480p \| 720p30 \| 720p60 \| 1080p30 \| 1080p60 \| 1440p30 \| 1440p60 \| 2160p30 \| 2160p60 |  | optional, default "1080p30" | Video bitrate preset (YouTube recommended H.264 SDR upload bitrates, upper values). Ignored when bitrate_mbps is given. |
| `bitrate_mbps` | number | Mbit/s | optional | Explicit average video bitrate; overrides the preset. (> 0, max 10000) |
| `audio_bitrate_kbps` | number | kbit/s | optional, default 0 | Audio track bitrate added to the video bitrate (e.g. 128 for AAC stereo, 384 for 5.1). (min 0, max 10000) |
| `upload_speed_mbps` | number | Mbit/s | optional | Optional connection speed for the upload-time estimate. (> 0, max 1000000) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `total_bitrate_mbps` | number | Mbit/s | Video bitrate plus audio bitrate. |
| `file_size_mb` | number | MB | Megabytes (10⁶ bytes). |
| `file_size_gb` | number | GB | Gigabytes (10⁹ bytes). |
| `file_size_gib` | number | GiB | Gibibytes (2³⁰ bytes), as shown by Windows and many file managers. |
| `size_per_minute_mb` | number | MB/min | total_bitrate × 60 / 8. |
| `size_per_hour_gb` | number | GB/h | total_bitrate × 3600 / 8 / 1000. |
| `upload_seconds` | number | s | bits / upload_speed (only when upload_speed_mbps is given). |
| `upload_time` | string |  | Same time as h:mm:ss. |

## 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.

## Data Sources

- YouTube Help – Recommended upload encoding settings (video bitrate table) — https://support.google.com/youtube/answer/1722171 (reference, retrieved 2026-09-24)
- Bit rate – video bitrates and file size (Wikipedia) — https://en.wikipedia.org/wiki/Bit_rate (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/video-file-size?duration_minutes=…`
- `POST https://tttkmbb.com/api/v1/calculate/video-file-size` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/video-file-size · OpenAPI operationId `estimate_video_file_size` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "video-file-size", "inputs": {…}}`

## Example

- 10 minutes at 8 Mbit/s, upload at 20 Mbit/s: inputs `{"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: inputs `{"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
```

## Limitations

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). 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. All values are computed from the formula above; no measurement or live data is involved.

## 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

- [Download Time Calculator](https://tttkmbb.com/everyday/download-time.md) — Transfer time for a known file size.
- [Data Storage Converter](https://tttkmbb.com/conversion/data-storage.md) — Convert MB, GiB, TB and other units.
- [Aspect Ratio Calculator](https://tttkmbb.com/everyday/aspect-ratio.md) — Frame dimensions for a resolution.
