Estimate video file size and bitrate
estimate_video_bitratePlan video exports by calculating file size from bitrate and duration. Determine the required total Kbps to meet a specific file size cap based on resolution and frame rate.
Instructions
Video size and bitrate arithmetic for a clip of durationSec. Pass totalKbps to get the encoded file size (bytes, binary MiB and decimal MB); pass targetBytes to get the highest total bitrate that fits that size; add widthPx, heightPx and fps (with totalKbps) to get bits per pixel, a codec-independent check of whether the bitrate suits the resolution. Kbps is decimal (1 kbps = 1000 bit/s) and covers video plus audio. Use it to plan an export or hit an upload cap; it does not inspect or encode files. Errors when neither totalKbps nor targetBytes is given, or when only some of the bits-per-pixel inputs are.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"durationSec": "<durationSec>"
},
"name": "estimate_video_bitrate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Frame rate, for bits per pixel. | |
| widthPx | No | Frame width in px, for bits per pixel. | |
| heightPx | No | Frame height in px, for bits per pixel. | |
| totalKbps | No | Combined video + audio bitrate in kbps. Needed for file size and bits per pixel. | |
| durationSec | Yes | Clip length in seconds. | |
| targetBytes | No | File-size cap in bytes (25 MB = 25000000) to solve for the maximum total kbps. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| totalKbps | Yes | ||
| durationSec | Yes | ||
| targetBytes | Yes | ||
| bitsPerPixel | Yes | ||
| estimatedBytes | Yes | ||
| formattedBinary | Yes | ||
| formattedDecimal | Yes | ||
| referenceToolUrl | Yes | ||
| targetBitrateKbps | Yes |