View all expressions
Interpolation

Show Composition Duration

Automatically calculates your composition’s total length and formats it into a readable minutes:seconds:frames structure.

Contributed by:


d = thisComp.duration;
min = Math.floor(d / 60);
sec = Math.floor(d % 60);
fr = Math.floor((d % 1) / thisComp.frameDuration);
(min < 10 ? "0" : "") + min + ":" + (sec < 10 ? "0" : "") + sec + ":" + (fr < 10 ? "0" : "") + fr;

Show Composition Duration

Practical use case

Display the total duration of your video in templates, metadata overlays, or preview exports without manual updates.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image