FAILURE MAP
← Case archive

FA-78406 / Broadcast timecode arithmetic / Open access

Drop-frame 29.97 label to frame count: dropped frame total · case 01

Frame counts after the first hour are too high by 108 frames per hour.

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The dropped count uses the minute-of-hour instead of total minutes.

VERIFIED REPAIR

Subtract two frames for every elapsed total minute except multiples of ten.

Unsuccessful approach: Rounding the tenth-minute exemptions up under-counts dropped frames in the first minutes of each ten.

Case contract

Parse HH:MM:SS;FF drop-frame 29.97 labels (the last separator may be ";", "," or "."). Labels ;00 and ;01 at second 00 of minutes not divisible by 10 do not exist and return None, as do out-of-range fields (hours 0-23, frames 0-29). Frame count = nominal 30 fps count minus 2 per elapsed minute except every tenth minute.

Why this case matters

Timecode arithmetic errors misplace edits, commercial breaks and captions against the broadcast clock.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re
N = 1
observations = []
def solve(tc):
    m=re.fullmatch(r'(\d{2}):(\d{2}):(\d{2})[;,.](\d{2})',tc)
    if not m:
        return None
    h,mi,s,f=map(int,m.groups())
    if h>23 or mi>59 or s>59:
        return None
    if f>29:
        return None
    if s==0 and f<2 and mi%10!=0:
        return None
    tm=h*60+mi
    return (tm*60+s)*30+f-2*(mi-mi//10)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: dropped frame total', ['01:00:00;00'], 107892), ('regression variant: dropped frame total', ['01:09:59;03'], 125847), ('partial repair probe: dropped frame total', ['00:01:59;01'], 3569), ('partial repair variant: dropped frame total', ['01:59:01;29'], 214043), ('boundary control', ['00:01:00;00'], None), ('boundary control', ['00:10:00;00'], 17982), ('normal control', ['00:00:59;29'], 1799), ('normal control', ['24:01:01.01'], None), ('normal control', ['00:60:01:01'], None)], [('regression: dropped frame total', ['23:59:59;29'], 2589407), ('regression variant: dropped frame total', ['23:11:59;00'], 2503066), ('partial repair probe: dropped frame total', ['09:59:01.03'], 1077153), ('partial repair variant: dropped frame total', ['23:09:00;15'], 2497713), ('boundary control', ['00:10:00;00'], 17982), ('boundary control', ['00:00:59;29'], 1799), ('normal control', ['09:11:60.03'], None), ('normal control', ['00:59:00;31'], None), ('normal control', ['01:60:00,02'], None)], [('regression: dropped frame total', ['23:00:00.02'], 2481518), ('regression variant: dropped frame total', ['09:01:00;03'], 972829), ('partial repair probe: dropped frame total', ['00:11:00.03'], 19783), ('partial repair variant: dropped frame total', ['01:01:00,02'], 109692), ('boundary control', ['00:00:59;29'], 1799), ('boundary control', ['00:01:00;00'], None), ('normal control', ['23:59:60,00'], None), ('normal control', ['01:59:00;01'], None), ('normal control', ['09:60:00:31'], None)], [('regression: dropped frame total', ['09:59:01.03'], 1077153), ('regression variant: dropped frame total', ['09:00:01.02'], 971060), ('partial repair probe: dropped frame total', ['01:09:59;03'], 125847), ('partial repair variant: dropped frame total', ['01:11:01;29'], 127731), ('boundary control', ['00:01:00;00'], None), ('boundary control', ['00:10:00;00'], 17982), ('normal control', ['01:11:01;30'], None), ('normal control', ['24:00:01.30'], None), ('normal control', ['23:00:01:29'], None)], [('regression: dropped frame total', ['23:10:01.01'], 2499529), ('regression variant: dropped frame total', ['01:59:01;29'], 214043), ('partial repair probe: dropped frame total', ['00:01:01;03'], 1831), ('partial repair variant: dropped frame total', ['23:09:00,15'], 2497713), ('boundary control', ['00:10:00;00'], 17982), ('boundary control', ['00:00:59;29'], 1799), ('normal control', ['23:09:00.00'], None), ('normal control', ['24:10:00,02'], None), ('normal control', ['00:60:59.29'], None)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression: dropped frame total108000107892Failed
regression variant: dropped frame total125955125847Failed
partial repair probe: dropped frame total35693569Passed
partial repair variant: dropped frame total214151214043Failed
boundary controlNoneNonePassed
boundary control1798217982Passed
normal control17991799Passed
normal controlNoneNonePassed
normal controlNoneNonePassed

SHA-256 / 0ed4eab96763a536b7ed767074134b63db8a0b8360f68ec3962b24611580d0b7

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re
N = 1
observations = []
def solve(tc):
    m=re.fullmatch(r'(\d{2}):(\d{2}):(\d{2})[;,.](\d{2})',tc)
    if not m:
        return None
    h,mi,s,f=map(int,m.groups())
    if h>23 or mi>59 or s>59:
        return None
    if f>29:
        return None
    if s==0 and f<2 and mi%10!=0:
        return None
    tm=h*60+mi
    return (tm*60+s)*30+f-2*(tm-(tm+9)//10)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: dropped frame total', ['01:00:00;00'], 107892), ('regression variant: dropped frame total', ['01:09:59;03'], 125847), ('partial repair probe: dropped frame total', ['00:01:59;01'], 3569), ('partial repair variant: dropped frame total', ['01:59:01;29'], 214043), ('boundary control', ['00:01:00;00'], None), ('boundary control', ['00:10:00;00'], 17982), ('normal control', ['00:00:59;29'], 1799), ('normal control', ['24:01:01.01'], None), ('normal control', ['00:60:01:01'], None)], [('regression: dropped frame total', ['23:59:59;29'], 2589407), ('regression variant: dropped frame total', ['23:11:59;00'], 2503066), ('partial repair probe: dropped frame total', ['09:59:01.03'], 1077153), ('partial repair variant: dropped frame total', ['23:09:00;15'], 2497713), ('boundary control', ['00:10:00;00'], 17982), ('boundary control', ['00:00:59;29'], 1799), ('normal control', ['09:11:60.03'], None), ('normal control', ['00:59:00;31'], None), ('normal control', ['01:60:00,02'], None)], [('regression: dropped frame total', ['23:00:00.02'], 2481518), ('regression variant: dropped frame total', ['09:01:00;03'], 972829), ('partial repair probe: dropped frame total', ['00:11:00.03'], 19783), ('partial repair variant: dropped frame total', ['01:01:00,02'], 109692), ('boundary control', ['00:00:59;29'], 1799), ('boundary control', ['00:01:00;00'], None), ('normal control', ['23:59:60,00'], None), ('normal control', ['01:59:00;01'], None), ('normal control', ['09:60:00:31'], None)], [('regression: dropped frame total', ['09:59:01.03'], 1077153), ('regression variant: dropped frame total', ['09:00:01.02'], 971060), ('partial repair probe: dropped frame total', ['01:09:59;03'], 125847), ('partial repair variant: dropped frame total', ['01:11:01;29'], 127731), ('boundary control', ['00:01:00;00'], None), ('boundary control', ['00:10:00;00'], 17982), ('normal control', ['01:11:01;30'], None), ('normal control', ['24:00:01.30'], None), ('normal control', ['23:00:01:29'], None)], [('regression: dropped frame total', ['23:10:01.01'], 2499529), ('regression variant: dropped frame total', ['01:59:01;29'], 214043), ('partial repair probe: dropped frame total', ['00:01:01;03'], 1831), ('partial repair variant: dropped frame total', ['23:09:00,15'], 2497713), ('boundary control', ['00:10:00;00'], 17982), ('boundary control', ['00:00:59;29'], 1799), ('normal control', ['23:09:00.00'], None), ('normal control', ['24:10:00,02'], None), ('normal control', ['00:60:59.29'], None)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression: dropped frame total107892107892Passed
regression variant: dropped frame total125849125847Failed
partial repair probe: dropped frame total35713569Failed
partial repair variant: dropped frame total214045214043Failed
boundary controlNoneNonePassed
boundary control1798217982Passed
normal control17991799Passed
normal controlNoneNonePassed
normal controlNoneNonePassed

SHA-256 / 95f01375b566f4d877c6d41a65a1177886bf7cc40cdfd591e1529ce424174022

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import re
N = 1
observations = []
def solve(tc):
    m=re.fullmatch(r'(\d{2}):(\d{2}):(\d{2})[;,.](\d{2})',tc)
    if not m:
        return None
    h,mi,s,f=map(int,m.groups())
    if h>23 or mi>59 or s>59:
        return None
    if f>29:
        return None
    if s==0 and f<2 and mi%10!=0:
        return None
    tm=h*60+mi
    return (tm*60+s)*30+f-2*(tm-tm//10)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: dropped frame total', ['01:00:00;00'], 107892), ('regression variant: dropped frame total', ['01:09:59;03'], 125847), ('partial repair probe: dropped frame total', ['00:01:59;01'], 3569), ('partial repair variant: dropped frame total', ['01:59:01;29'], 214043), ('boundary control', ['00:01:00;00'], None), ('boundary control', ['00:10:00;00'], 17982), ('normal control', ['00:00:59;29'], 1799), ('normal control', ['24:01:01.01'], None), ('normal control', ['00:60:01:01'], None)], [('regression: dropped frame total', ['23:59:59;29'], 2589407), ('regression variant: dropped frame total', ['23:11:59;00'], 2503066), ('partial repair probe: dropped frame total', ['09:59:01.03'], 1077153), ('partial repair variant: dropped frame total', ['23:09:00;15'], 2497713), ('boundary control', ['00:10:00;00'], 17982), ('boundary control', ['00:00:59;29'], 1799), ('normal control', ['09:11:60.03'], None), ('normal control', ['00:59:00;31'], None), ('normal control', ['01:60:00,02'], None)], [('regression: dropped frame total', ['23:00:00.02'], 2481518), ('regression variant: dropped frame total', ['09:01:00;03'], 972829), ('partial repair probe: dropped frame total', ['00:11:00.03'], 19783), ('partial repair variant: dropped frame total', ['01:01:00,02'], 109692), ('boundary control', ['00:00:59;29'], 1799), ('boundary control', ['00:01:00;00'], None), ('normal control', ['23:59:60,00'], None), ('normal control', ['01:59:00;01'], None), ('normal control', ['09:60:00:31'], None)], [('regression: dropped frame total', ['09:59:01.03'], 1077153), ('regression variant: dropped frame total', ['09:00:01.02'], 971060), ('partial repair probe: dropped frame total', ['01:09:59;03'], 125847), ('partial repair variant: dropped frame total', ['01:11:01;29'], 127731), ('boundary control', ['00:01:00;00'], None), ('boundary control', ['00:10:00;00'], 17982), ('normal control', ['01:11:01;30'], None), ('normal control', ['24:00:01.30'], None), ('normal control', ['23:00:01:29'], None)], [('regression: dropped frame total', ['23:10:01.01'], 2499529), ('regression variant: dropped frame total', ['01:59:01;29'], 214043), ('partial repair probe: dropped frame total', ['00:01:01;03'], 1831), ('partial repair variant: dropped frame total', ['23:09:00,15'], 2497713), ('boundary control', ['00:10:00;00'], 17982), ('boundary control', ['00:00:59;29'], 1799), ('normal control', ['23:09:00.00'], None), ('normal control', ['24:10:00,02'], None), ('normal control', ['00:60:59.29'], None)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression: dropped frame total107892107892Passed
regression variant: dropped frame total125847125847Passed
partial repair probe: dropped frame total35693569Passed
partial repair variant: dropped frame total214043214043Passed
boundary controlNoneNonePassed
boundary control1798217982Passed
normal control17991799Passed
normal controlNoneNonePassed
normal controlNoneNonePassed

SHA-256 / 0a215dee5923d5b85699762209718484be9da8554bf97c14038ddc1162d56d9b

Verification & scope

A deterministic bounded teaching model with a stipulated toy contract; it does not claim conformance to SMPTE or any broadcast standard. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:49:35.023764+00:00.

Case digest / e0a61f4adff9d5f5066624890d5db66784b6bb34f158563375d0b8844c93eb1a