Define the quantity before the equation.
A timecode label identifies a position or expresses a duration under a counting convention. A frame count is an integer. Physical elapsed seconds depend on the actual frame rate. Keep those three quantities distinct, especially at fractional rates.
| Rate label | Exact pictures/second r | Nominal label count N | DF labels skipped d |
|---|---|---|---|
| 23.976 | 24000/1001 | 24 | Not offered |
| 24, 25, 30, 48, 50, 60 | Same integer as label | Same integer | Not offered |
| 29.97 | 30000/1001 | 30 | 2, when DF selected |
| 59.94 | 60000/1001 | 60 | 4, when DF selected |
This reference's 59.94 representation uses a full-rate 00–59 frame field. It is not a byte-level specification for every high-frame-rate transport. Establish the representation before exchanging values. See the broadcast timing standards reference.
Convert a valid label to a frame index.
Let H, M, S and F be non-negative hour, minute, second and frame fields. The first label at the origin has index zero. For non-drop-frame:
L = ((3600H + 60M + S) × N) + F
K = L
For DF, subtract labels skipped before that position:
Validate first: M and S must be 00–59; F must be 0 through N−1. DF is supported here only at 29.97 and 59.94. When M is not divisible by ten and S is zero, F must be at least d. Thus 00:01:00;00 is invalid at 29.97 DF, while 00:01:00;02 maps to frame index 1,800.
At 01:00:00;00, N=30, d=2 and m=60. The index is 108000 − 2 × (60 − 6) = 107892. Dividing that by 30000/1001 gives 3,599.9964 physical seconds. DF closely tracks a clock; it is not an exact redefinition of the second.
Recover a label without inventing skipped values.
For NDF, split K into hours, minutes, seconds and the remainder after division by N. For DF, partition the non-negative frame index into ten-minute cycles, then recover the appropriate minute. These quantities are integers:
fullMinute = 60 × N
shortMinute = fullMinute − d
tenMinutes = 10 × fullMinute − 9 × d
q = floor(K / tenMinutes)
u = K mod tenMinutes
if u < fullMinute:
labelCount = q × 10 × fullMinute + u
else:
v = u − fullMinute
labelCount = q × 10 × fullMinute
+ fullMinute × (1 + floor(v / shortMinute))
+ d + (v mod shortMinute)
Split labelCount using nominal count N.At 29.97 DF, K=1,800 gives the first label of the second minute, 00:01:00;02. K=17,982 gives 00:10:00;00. At 59.94 DF, K=3,600 gives 00:01:00;04. No media frames are removed.
The website calculator treats a negative duration as the negative of its whole frame count, formatting the magnitude and then adding a minus sign. It does not wrap durations at 24 hours. This is an explicit calculator convention, not a universal file-format rule for negative timecode.
State endpoints and the conversion policy.
inclusive duration frames = Kout − Kin + 1
elapsed seconds = K × rate denominator / rate numerator
At 24 fps, 01:00:10:12 to 01:00:14:06 is 90 exclusive frames or 91 inclusive frames. Offsets are not themselves durations: the one-hour origin cancels out.
A confirmed following-day out point adds one timecode-label cycle. For NDF that cycle has 86400 × N frames. For DF it has 86400 × N − d × (1440 − 144) frames: 2,589,408 at 29.97 DF. That cycle lasts 86,399.9136 physical seconds. Never infer a date or source continuity from two labels alone. Endpoint and rollover guide.
For a frame-preserving conform, keep K constant:
new seconds = K / playback rate
speed ratio = playback rate / source rate
duration change = source rate / playback rate − 1
1,440 frames at 24 fps last 60 seconds. At 25 fps they last 57.6 seconds: speed is 104.1667% and duration falls by 4%. A duration-preserving standards conversion chooses a different picture-count/cadence policy; these equations do not synthesize or retime media. Try the conform calculator.
Round at the boundary you actually need.
- Integer frames: do label arithmetic in whole frames; reject impossible labels rather than silently correcting them.
- Elapsed displays: retain exact rational rates until the final decimal display. The website rounds physical seconds to three decimal places; this does not alter the frame count.
- Seconds to frames: the mathematical result may be fractional. Declare whether you choose nearest, floor or ceiling; also declare tie handling. The basic website converter accepts whole frames and does not silently choose a rounding policy for seconds.
- Film capacity: the roll estimator uses exact decimal length subtraction and metre conversion, then floors the final nominal picture capacity once. Three-perf uses 64/3 frames per foot, not a rounded 21.33.
- Source identifiers: frame zero, frame one, inclusive last image and exclusive end are different conventions. Retain them explicitly in a turnover.
For sound-to-picture counts, use the audio samples and picture frames calculator. Its fractions describe timing relationships; they do not resample a file.
Download the validation examples.
The original JSON file records inputs, expected results and intentional errors for NDF/DF conversion, signed durations, endpoint conventions, rollover and conform timing. Expected elapsed seconds include a numerical comparison tolerance; expected frame counts and labels are exact.
The examples cover this website's stated conventions. Passing them is a useful regression check; it is not SMPTE transport conformance certification or a substitute for testing a specific media application's behavior.
Technical references
- Apple TN2310: nominal fields, frame numbers, drop-frame counting and format flags
- Avid: version-specific timecode-day and wall-clock behavior
- Film footage reference: nominal factors and original Kodak/NIST sources
- Standards map: cited editions and transport scope
Equations, pseudocode and numerical examples on this page are original explanatory material under the stated assumptions.