View all expressions
Interpolation

Show Composition Info

Displays real-time composition information directly inside a text layer. The expression reads properties like duration, frame rate, resolution, layer count, and current time from your active comp and updates them dynamically. Includes optional checkboxes to toggle each stat on or off for a fully customizable overlay.

Contributed by:


//  Apply to Source Texttry {
showDuration = effect("Show Duration")("Checkbox").value;
}
catch(e) {
showDuration = 1; }
try {
showFrameRate = effect("Show Frame Rate")("Checkbox").value; }
catch(e) {
showFrameRate = 1;
}
try {
showResolution = effect("Show Resolution")("Checkbox").value;
} catch(e) {
showResolutionx = 1;
}
try {
showLayerCount = effect("Show Layer Count")("Checkbox").value;
}
catch(e){
showLayerCount = 1;
}
try{
showCurrentTime = effect("Show Current Time")("Checkbox").value;
}
catch(e) {
showCurrentTime = 1;
}stats = "";
// Duration
if (showDuration == 1) {
d = thisComp.duration;
min = Math.floor(d / 60);
sec = Math.floor(d % 60);
fr = Math.floor((d % 1) / thisComp.frameDuration);
stats += "Duration: " + (min < 10 ? "0" : "") + min + ":" + (sec < 10 ? "0" : "") + sec + ":" + (fr < 10 ? "0" : "") + fr + "\n";
}
// Frame Rate
if (showFrameRate == 1) {
fps = 1 / thisComp.frameDuration;
frameDisplay = (fps % 1 === 0) ? fps.toFixed(0) : fps.toFixed(2);
stats += "Frame Rate: " + frameDisplay + " fps\n";
}
// Resolution
if (showResolution == 1) {
stats += "Resolution: " + thisComp.width + "x" + thisComp.height + "\n";
}
// Layer Count
if (showLayerCount == 1){
stats += "Layers: " + thisComp.numLayers + "\n";
}
// Current Time
if (showCurrentTime == 1){
t = time;
tmin = Math.floor(t / 60);
tsec = Math.floor(t % 60);
tfr = Math.floor((t % 1) / thisComp.frameDuration);
stats += "Time: " + (tmin < 10 ? "0" : "") + tmin + ":" + (tsec < 10 ? "0" : "") + tsec + ":" + (tfr < 10 ? "0" : "") + tfr;
}
stats;

Show Composition Info

Practical use case

Display live composition metadata for previews or template validation without opening comp settings.

Check out similar expressions

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

a mesh of elegant lines transparent image