FA-78496 / Broadcast timecode arithmetic / Open access
EDL speed-change record out: duration rounding · case 01
Slow-motion events are a frame short on the record side.
ROOT CAUSE
The record duration is floored.
THE FAILURE
The record duration is floored.
Unsuccessful approach: Half-to-even rounding still shortens some exact half-frame durations.
Case contract
event [src_in, src_out, rec_in, speed_percent] with non-drop labels at fps; src_out is exclusive and may cross midnight. Record duration = source frames * 100 / |speed| rounded half up (reverse speeds use the magnitude; speed 0 returns None). Return [record_out label (exclusive, wrapped at 24 h), record duration].
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
N = 1
observations = []
def solve(event, fps):
def fr(t):
h,m,s,f=map(int,t.split(':'))
return ((h*60+m)*60+s)*fps+f
def tc(n):
n%=86400*fps
return '%02d:%02d:%02d:%02d'%(n//(3600*fps),n//(60*fps)%60,n//fps%60,n%fps)
src_in,src_out,rec_in,speed=event
if speed==0:
return None
sp=abs(speed)
dur=(fr(src_out)-fr(src_in))%(86400*fps)
rec=dur*100//sp
return [tc(fr(rec_in)+rec),rec]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: duration rounding', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('regression variant: duration rounding', [['00:29:00:12', '23:29:59:12', '00:59:01:00', 33], 25], ['22:43:48:22', 6277197]), ('partial repair probe: duration rounding', [['10:29:59:24', '10:00:00:12', '23:29:59:01', -200], 25], ['11:14:59:08', 1057507]), ('partial repair variant: duration rounding', [['01:59:01:24', '10:00:30:24', '23:29:30:01', 200], 25], ['03:30:14:14', 361113]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('normal control', [['00:01:59:01', '23:00:00:00', '23:00:01:12', 33], 25], ['20:35:49:21', 6263709]), ('normal control', [['00:29:01:12', '10:00:59:01', '23:00:59:01', -100], 24], ['08:32:56:14', 823621]), ('normal control', [['01:59:30:12', '23:00:01:24', '23:00:30:01', 100], 25], ['20:01:01:13', 1890787])], [('regression: duration rounding', [['10:01:00:12', '00:00:01:00', '23:29:30:24', 200], 25], ['06:29:01:06', 629257]), ('regression variant: duration rounding', [['10:29:59:24', '01:00:01:24', '00:59:01:24', 75], 25], ['20:19:04:16', 1740067]), ('partial repair probe: duration rounding', [['10:00:30:00', '10:01:00:29', '23:00:01:00', -200], 30], ['23:00:16:15', 465]), ('partial repair variant: duration rounding', [['00:00:01:12', '00:01:59:01', '01:00:01:23', -200], 24], ['01:01:00:18', 1411]), ('boundary control', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('normal control', [['23:01:01:01', '01:59:01:29', '23:59:01:01', 250], 30], ['01:10:13:12', 128171]), ('normal control', [['23:01:01:00', '00:00:30:23', '01:01:30:01', 100], 24], ['02:01:00:00', 85679]), ('normal control', [['10:59:00:23', '00:00:30:00', '23:00:30:00', -50], 24], ['01:03:28:02', 2250674])], [('regression: duration rounding', [['23:01:00:00', '01:01:00:23', '01:00:30:12', 75], 24], ['03:40:31:19', 230431]), ('regression variant: duration rounding', [['23:29:01:00', '23:59:00:23', '23:29:59:01', -200], 24], ['23:44:59:01', 21600]), ('partial repair probe: duration rounding', [['23:00:59:00', '00:01:59:01', '23:00:59:01', 200], 30], ['23:31:29:02', 54901]), ('partial repair variant: duration rounding', [['10:59:30:00', '01:59:00:29', '23:59:59:00', 200], 30], ['07:29:44:15', 809565]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('normal control', [['23:29:00:00', '23:59:00:23', '00:59:00:01', 0], 24], None), ('normal control', [['23:59:30:01', '00:00:01:01', '00:59:01:00', 75], 24], ['00:59:42:08', 992]), ('normal control', [['10:00:30:01', '23:00:00:01', '23:29:01:01', 100], 30], ['12:28:31:01', 1403100])], [('regression: duration rounding', [['01:59:30:00', '00:59:01:01', '23:29:59:00', 200], 30], ['10:59:44:16', 1241566]), ('regression variant: duration rounding', [['10:59:00:01', '10:29:59:00', '00:01:30:00', 150], 25], ['15:42:09:08', 1410983]), ('partial repair probe: duration rounding', [['10:59:30:00', '00:00:00:01', '00:59:00:23', -200], 24], ['07:29:16:00', 561961]), ('partial repair variant: duration rounding', [['23:00:59:01', '01:29:01:00', '23:01:59:12', -200], 25], ['00:16:00:12', 111025]), ('boundary control', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('normal control', [['00:29:59:01', '01:59:30:24', '00:01:59:12', 200], 25], ['00:46:45:11', 67149]), ('normal control', [['01:01:30:01', '10:59:01:01', '23:59:59:01', 100], 25], ['09:57:30:01', 896275]), ('normal control', [['00:29:59:12', '00:59:01:12', '01:29:00:12', 75], 24], ['02:07:43:04', 55744])], [('regression: duration rounding', [['10:29:30:23', '23:59:59:00', '00:59:30:01', -200], 24], ['07:44:44:02', 583537]), ('regression variant: duration rounding', [['10:01:30:12', '01:00:00:12', '00:59:59:01', 33], 25], ['22:22:42:17', 4084091]), ('partial repair probe: duration rounding', [['00:00:59:01', '10:00:01:00', '00:00:30:12', -200], 25], ['05:00:01:12', 449275]), ('partial repair variant: duration rounding', [['01:29:30:00', '23:01:30:01', '23:00:30:29', -200], 30], ['09:46:31:00', 1162801]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('normal control', [['01:00:59:24', '00:00:01:00', '00:59:59:01', -50], 25], ['22:58:01:03', 4137052]), ('normal control', [['23:00:01:00', '10:01:59:01', '01:00:30:24', 0], 25], None), ('normal control', [['00:01:59:23', '00:01:30:23', '23:59:00:12', -50], 24], ['23:58:02:12', 4145808])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: duration rounding | ['00:00:00:01', 1] | ['00:00:00:02', 2] | Failed |
| regression variant: duration rounding | ['22:43:48:21', 6277196] | ['22:43:48:22', 6277197] | Failed |
| partial repair probe: duration rounding | ['11:14:59:07', 1057506] | ['11:14:59:08', 1057507] | Failed |
| partial repair variant: duration rounding | ['03:30:14:13', 361112] | ['03:30:14:14', 361113] | Failed |
| boundary control | ['10:00:02:00', 50] | ['10:00:02:00', 50] | Passed |
| boundary control | ['00:00:02:00', 50] | ['00:00:02:00', 50] | Passed |
| normal control | ['20:35:49:21', 6263709] | ['20:35:49:21', 6263709] | Passed |
| normal control | ['08:32:56:14', 823621] | ['08:32:56:14', 823621] | Passed |
| normal control | ['20:01:01:13', 1890787] | ['20:01:01:13', 1890787] | Passed |
SHA-256 / d84b4089e3bb0ab7316b361a77a29b44723509553138fb146fcf86d05c344e53
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(event, fps):
def fr(t):
h,m,s,f=map(int,t.split(':'))
return ((h*60+m)*60+s)*fps+f
def tc(n):
n%=86400*fps
return '%02d:%02d:%02d:%02d'%(n//(3600*fps),n//(60*fps)%60,n//fps%60,n%fps)
src_in,src_out,rec_in,speed=event
if speed==0:
return None
sp=abs(speed)
dur=(fr(src_out)-fr(src_in))%(86400*fps)
rec=round(dur*100/sp)
return [tc(fr(rec_in)+rec),rec]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: duration rounding', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('regression variant: duration rounding', [['00:29:00:12', '23:29:59:12', '00:59:01:00', 33], 25], ['22:43:48:22', 6277197]), ('partial repair probe: duration rounding', [['10:29:59:24', '10:00:00:12', '23:29:59:01', -200], 25], ['11:14:59:08', 1057507]), ('partial repair variant: duration rounding', [['01:59:01:24', '10:00:30:24', '23:29:30:01', 200], 25], ['03:30:14:14', 361113]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('normal control', [['00:01:59:01', '23:00:00:00', '23:00:01:12', 33], 25], ['20:35:49:21', 6263709]), ('normal control', [['00:29:01:12', '10:00:59:01', '23:00:59:01', -100], 24], ['08:32:56:14', 823621]), ('normal control', [['01:59:30:12', '23:00:01:24', '23:00:30:01', 100], 25], ['20:01:01:13', 1890787])], [('regression: duration rounding', [['10:01:00:12', '00:00:01:00', '23:29:30:24', 200], 25], ['06:29:01:06', 629257]), ('regression variant: duration rounding', [['10:29:59:24', '01:00:01:24', '00:59:01:24', 75], 25], ['20:19:04:16', 1740067]), ('partial repair probe: duration rounding', [['10:00:30:00', '10:01:00:29', '23:00:01:00', -200], 30], ['23:00:16:15', 465]), ('partial repair variant: duration rounding', [['00:00:01:12', '00:01:59:01', '01:00:01:23', -200], 24], ['01:01:00:18', 1411]), ('boundary control', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('normal control', [['23:01:01:01', '01:59:01:29', '23:59:01:01', 250], 30], ['01:10:13:12', 128171]), ('normal control', [['23:01:01:00', '00:00:30:23', '01:01:30:01', 100], 24], ['02:01:00:00', 85679]), ('normal control', [['10:59:00:23', '00:00:30:00', '23:00:30:00', -50], 24], ['01:03:28:02', 2250674])], [('regression: duration rounding', [['23:01:00:00', '01:01:00:23', '01:00:30:12', 75], 24], ['03:40:31:19', 230431]), ('regression variant: duration rounding', [['23:29:01:00', '23:59:00:23', '23:29:59:01', -200], 24], ['23:44:59:01', 21600]), ('partial repair probe: duration rounding', [['23:00:59:00', '00:01:59:01', '23:00:59:01', 200], 30], ['23:31:29:02', 54901]), ('partial repair variant: duration rounding', [['10:59:30:00', '01:59:00:29', '23:59:59:00', 200], 30], ['07:29:44:15', 809565]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('normal control', [['23:29:00:00', '23:59:00:23', '00:59:00:01', 0], 24], None), ('normal control', [['23:59:30:01', '00:00:01:01', '00:59:01:00', 75], 24], ['00:59:42:08', 992]), ('normal control', [['10:00:30:01', '23:00:00:01', '23:29:01:01', 100], 30], ['12:28:31:01', 1403100])], [('regression: duration rounding', [['01:59:30:00', '00:59:01:01', '23:29:59:00', 200], 30], ['10:59:44:16', 1241566]), ('regression variant: duration rounding', [['10:59:00:01', '10:29:59:00', '00:01:30:00', 150], 25], ['15:42:09:08', 1410983]), ('partial repair probe: duration rounding', [['10:59:30:00', '00:00:00:01', '00:59:00:23', -200], 24], ['07:29:16:00', 561961]), ('partial repair variant: duration rounding', [['23:00:59:01', '01:29:01:00', '23:01:59:12', -200], 25], ['00:16:00:12', 111025]), ('boundary control', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('normal control', [['00:29:59:01', '01:59:30:24', '00:01:59:12', 200], 25], ['00:46:45:11', 67149]), ('normal control', [['01:01:30:01', '10:59:01:01', '23:59:59:01', 100], 25], ['09:57:30:01', 896275]), ('normal control', [['00:29:59:12', '00:59:01:12', '01:29:00:12', 75], 24], ['02:07:43:04', 55744])], [('regression: duration rounding', [['10:29:30:23', '23:59:59:00', '00:59:30:01', -200], 24], ['07:44:44:02', 583537]), ('regression variant: duration rounding', [['10:01:30:12', '01:00:00:12', '00:59:59:01', 33], 25], ['22:22:42:17', 4084091]), ('partial repair probe: duration rounding', [['00:00:59:01', '10:00:01:00', '00:00:30:12', -200], 25], ['05:00:01:12', 449275]), ('partial repair variant: duration rounding', [['01:29:30:00', '23:01:30:01', '23:00:30:29', -200], 30], ['09:46:31:00', 1162801]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('normal control', [['01:00:59:24', '00:00:01:00', '00:59:59:01', -50], 25], ['22:58:01:03', 4137052]), ('normal control', [['23:00:01:00', '10:01:59:01', '01:00:30:24', 0], 25], None), ('normal control', [['00:01:59:23', '00:01:30:23', '23:59:00:12', -50], 24], ['23:58:02:12', 4145808])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: duration rounding | ['00:00:00:02', 2] | ['00:00:00:02', 2] | Passed |
| regression variant: duration rounding | ['22:43:48:22', 6277197] | ['22:43:48:22', 6277197] | Passed |
| partial repair probe: duration rounding | ['11:14:59:07', 1057506] | ['11:14:59:08', 1057507] | Failed |
| partial repair variant: duration rounding | ['03:30:14:13', 361112] | ['03:30:14:14', 361113] | Failed |
| boundary control | ['10:00:02:00', 50] | ['10:00:02:00', 50] | Passed |
| boundary control | ['00:00:02:00', 50] | ['00:00:02:00', 50] | Passed |
| normal control | ['20:35:49:21', 6263709] | ['20:35:49:21', 6263709] | Passed |
| normal control | ['08:32:56:14', 823621] | ['08:32:56:14', 823621] | Passed |
| normal control | ['20:01:01:13', 1890787] | ['20:01:01:13', 1890787] | Passed |
SHA-256 / ec5f3bfcadcb2553ec0e05d06a9c8b98baba591abcafd84e0ad14fc228c762ad
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 9 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.915431+00:00.
Case digest / 5e5a7ed02f96dbc7822b6c611fb394050eb810c283164e00d02d395bbe5325f9