{
  "schemaVersion": 1,
  "slug": "video-file-size-calculator",
  "category": "photography",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "65a373ad8ba4c6d618c270997641a5a202370f516181e0e52bf4f61088833a65",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/video-file-size-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "b=B×k; GB=b×60d÷8÷1000; MB=GB×1000; q=GB÷d; n=C÷GB",
    "vars": [
      [
        "B",
        "Base bitrate (Mbps)"
      ],
      [
        "k",
        "Codec multiplier"
      ],
      [
        "d",
        "Duration (min)"
      ],
      [
        "C",
        "Card size (GB)"
      ],
      [
        "GB",
        "File size (GB)"
      ],
      [
        "n",
        "Clips on card"
      ]
    ],
    "note": "Decimal units: 1 GB=1000 MB; bitrate is Mbps and duration is minutes. k is a fixed illustrative factor (H.264 1, H.265 0.65, ProRes 4.5, RAW 6), not a guaranteed codec ratio. Audio, overhead, VBR and usable-card formatting are omitted."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "NIST — Binary prefixes and decimal storage units",
        "url": "https://physics.nist.gov/cuu/Units/binary.html"
      }
    ],
    "referenceRole": "definition",
    "implementationHash": "65a373ad8ba4c6d618c270997641a5a202370f516181e0e52bf4f61088833a65",
    "basis": "b=B×k; GB=b×60d÷8÷1000; MB=GB×1000; q=GB÷d; n=C÷GB",
    "limitations": "The references explain definitions and methods; any extra preset must be checked against the assumptions on this page."
  },
  "contract": {
    "compute": "const mbps=bitrate*(codec==='h264'?1:codec==='h265'?0.65:codec==='prores'?4.5:6);const seconds=duration*60;const sizeMB=mbps*seconds/8;const gb=sizeMB/1000;const perMin=mbps*60/8/1000;return {fileSizeGB:gb,fileSizeMB:sizeMB,perMinute:perMin,perHour:perMin*60,clipsOnCard:gb>0?cardSize/gb:0,totalMinutes:perMin>0?cardSize/perMin:0,dataRate:mbps/8};",
    "inputs": [
      {
        "name": "bitrate",
        "type": "number",
        "default": 100,
        "min": 0.1,
        "max": 10000,
        "step": 0.1
      },
      {
        "name": "duration",
        "type": "number",
        "default": 10,
        "min": 0.01,
        "max": 100000,
        "step": 0.01
      },
      {
        "name": "cardSize",
        "type": "number",
        "default": 128,
        "min": 0.1,
        "max": 100000,
        "step": 1
      },
      {
        "name": "codec",
        "type": "select",
        "default": "h265",
        "options": [
          {
            "value": "h264"
          },
          {
            "value": "h265"
          },
          {
            "value": "prores"
          },
          {
            "value": "raw"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "fileSizeGB",
        "precision": 2,
        "unit": "GB"
      },
      {
        "name": "fileSizeMB",
        "precision": 0,
        "unit": "MB"
      },
      {
        "name": "perMinute",
        "precision": 3,
        "unit": "GB/min"
      },
      {
        "name": "perHour",
        "precision": 1,
        "unit": "GB/hr"
      },
      {
        "name": "clipsOnCard",
        "precision": 1,
        "unit": ""
      },
      {
        "name": "totalMinutes",
        "precision": 1,
        "unit": "minutes"
      },
      {
        "name": "dataRate",
        "precision": 2,
        "unit": "MB/s"
      }
    ],
    "interpret": null
  }
}
