Frame Counter
Display the current frame number with optional padding and custom start frame.
Expression Code
// FRAME COUNTER
// Apply to Source Text
// === SETTINGS ===
startFrame = 1; // first frame number (use 0 or 1)
padding = 4; // leading zeros (4 = 0001, 3 = 001)
prefix = ""; // text before number (e.g., "Frame ")
suffix = ""; // text after number (e.g., " of 300")
// === FRAME LOGIC ===
fps = 1 / thisComp.frameDuration;
currentFrame = Math.floor(time * fps) + startFrame;
function pad(n, digits) {
s = "" + n;
while (s.length < digits) s = "0" + s;
return s;
}
prefix + pad(currentFrame, padding) + suffixApply to a text layer's Source Text property. The frame number updates automatically as the playhead moves.
1. Create a text layer
2. Alt/Option-click the Source Text stopwatch
3. Paste this expression
4. Adjust startFrame (0 or 1 based) and padding as needed