Timecode Display

Display comp time as professional timecode (HH:MM:SS:FF) synced to your composition frame rate.

Expression Code
// TIMECODE DISPLAY
// Apply to Source Text
// === SETTINGS ===
showHours = true; // true/false
showFrames = true; // true/false
dropFrame = false; // true for 29.97 drop-frame notation
separator = ":"; // use ";" for drop-frame convention
// === TIMECODE LOGIC ===
fps = 1 / thisComp.frameDuration;
totalFrames = Math.floor(time * fps);
// Calculate components
frm = totalFrames % fps;
totalSec = Math.floor(totalFrames / fps);
sec = totalSec % 60;
totalMin = Math.floor(totalSec / 60);
min = totalMin % 60;
hr = Math.floor(totalMin / 60);
function pad(n, digits) {
s = "" + Math.floor(n);
while (s.length < digits) s = "0" + s;
return s;
}
// Build timecode string
tc = "";
if (showHours) tc += pad(hr, 2) + separator;
tc += pad(min, 2) + separator + pad(sec, 2);
if (showFrames) {
frameSep = dropFrame ? ";" : separator;
tc += frameSep + pad(frm, 2);
}
tc
Apply to a text layer's Source Text property. The timecode will automatically sync to your composition's current time and frame rate. 1. Create a text layer 2. Alt/Option-click the Source Text stopwatch 3. Paste this expression 4. Toggle showHours and showFrames as needed
Back to Text & Numbers