How do I make a countdown timer in DaVinci Resolve?

Well, you will need a Fusion component and an expression.

  • Go to Edit mode
  • Find the Effects window to the left, open Toolbox and click effects
  • Drag the Fusion Composition to an empty track

Right-click the Fusion Composition and choose “Open in Fusion Page”

Drag a text block (T) onto the canvas. Select the text block and turn on the inspector if it is not already on. Then, right click the text Styled Text and add an expression. The expression is the following.

“-” .. string.format(“%02d”,floor((comp.RenderEnd-time+24)/24/60)) .. “:” .. string.format(“%02d”,ceil((comp.RenderEnd-time)/24)%60)

Let’s deep dive into this expression and explore the parts that make up the expression

“-” ..

  • since this is a countdown timer, it will go backwards. I used this for a timer that displays how long is left so I preceded the timer with a minus sign. The parentheses around the minus sign tell Fusion that it’s a piece of text and the two dots tell Fusion to glue this text to whatever comes next

string.format(“%02d”,floor((comp.RenderEnd-time+24)/24/60))

  • string.format(#%02d”, aNumber) will format the aNumber to have a leading zero. This means it will always have two digits. If the value is smaller than 10, it will display a leading zero

floor((comp.RenderEnd-time+24)/24/60)

  • floor will take the numeric expression and round it down
  • comp.RenderEnd returns the end timecode of the current clip
  • time returns the current timecode
  • we divide by 24 because the project has 24 frames per second
  • we divide by 60 because we want to have the minutes and there are 60 seconds in a minute
  • we add +24 to the time because we are counting down. That means that when the next minute has already started and the seconds flip back to 00, we still need to show the previous minute. This is the best way to do it that I know of

.. “:” >>

  • this glues the colon to the minutes part and the seconds part

ceil(((comp.RenderEnd-time)/24)%60))

  • ceil rounds the number in the expression up. So if there are 25 frames left, then it will show 2 seconds because 25/24 is 1.somethingsmall. If we round that up, it becomes 2. The seconds will only drop to 0 when there are 0 frames left.
  • %60 divides the expression by 60 and returns the remainder. What this basically does is remove all the passed minutes from the counter and keep only the seconds.