← Back to the lap timer

Lap timer overlay for DaVinci Resolve

Put live lap times on your HDZero footage. You mark your laps in the lap timer, copy one script, and paste it into Resolve. It works in the free version of DaVinci Resolve. Click any picture to enlarge it.

1Install the HDZero OSD font

Do this first, so the font is in Resolve's list later. The goggle OSD is drawn from a bitmap, not a normal font, so Resolve has nothing like it. This font is that bitmap converted to a real .ttf: wide, rounded-square letters and digits that are all the same width, so the numbers do not jitter as they count.

F:4:25 4S 3.93V MAXDAX 3 0123456789
Live preview: this text is set in the font itself.

Install

  1. Download the file with the green button.
  2. Windows: right-click the file → Install for all users.
  3. Mac: double-click the file → Install Font.
  4. If DaVinci Resolve is open, close it and start it again. Resolve only reads the font list at start.
  5. That is all. The script in step 3 picks the font HDZero OSD by itself.

What is in it

Digits, capital letters A–Z (lowercase shows as capitals, like the OSD), and . : - + / % & ( ) ! ? , ; = < > @ [ ] \ ^ _ #. No arrows or battery symbols. It is a pixel font: scaled up a lot it looks blocky, like the OSD itself. It has no black edge, which is why the script adds a black outline.

The shapes come from the HDZero goggle firmware font BTFL_000.bmp (hd-zero/hdzero-goggle, MIT license). This is an unofficial conversion, not made or endorsed by HDZero.

Flying analog? The Betaflight OSD font

The same idea for analog footage: Betaflight's default analog OSD font (MAX7456) as a .ttf. Install it the same way, then pick Betaflight OSD at the top of the Font list in the lap timer's Resolve settings.

F:4:25 4S 3.93V MAXDAX 3 0123456789
Live preview in the Betaflight OSD font.

Converted from default.mcm in betaflight/betaflight-configurator (GPL-3.0). Capitals, digits and the usual punctuation; no symbols. Unofficial, not made or endorsed by Betaflight.

2Project and video

2.1Create a project

Create New Project dialog with a name typed in
  1. Start Resolve, double-click New Project and type a name, for example Lap Timer Overlay.
  2. Click Create.

2.2Add your video to the Media Pool

Dragging the video file from a folder window into the empty Media Pool
  1. Drag your video file from its folder.
  2. Drop it into the Media Pool.

2.3Put your video on the timeline

The clip in the Media Pool and dragged onto the empty timeline
  1. On the Edit page the clip now sits in the Media Pool. Drag it from there...
  2. ...into the empty timeline. Resolve creates the timeline for you, and your video is on track Video 1.
HDZero .ts files import fine. If Resolve cannot read yours, convert it to MP4 first with the ts2mp4 converter (ffmpeg scripts for converting, upscaling and cropping .ts files).
Any frame rate works; the script reads it from your timeline. The timer is added on Video 2, above your video.

3Copy the script and run it

3.1Copy it from the lap timer

First mark your laps in the lap timer until it shows your best 3 consecutive laps, with the same video file that is in Resolve.

Lap timer page with the Copy Resolve script button, the Font box and Dashes per character marked
  1. Click Copy Resolve script. The script now holds your best 3 laps.
  2. Font: the page uses HDZero OSD when it is installed on your computer (step 1). If it is not, it starts with Open Sans. You can type any font name or pick one from the list. Load my fonts lists the fonts installed on this computer (Chrome and Edge ask once for permission). The font must be installed on the computer that runs Resolve.
  3. Optional: Dashes per character is the length of the dashed line under the total. 1 fits the HDZero OSD font, about 1.5 fits normal fonts. It changes to 1 or 1.5 when you change the font, and you can set it by hand.

3.2Paste it into Resolve's console

  1. In Resolve, open your project and make sure the timeline with your video on Video 1 is open (Edit page).
  2. Press F6 (or open the menu Workspace → Console). A small console window opens.
  3. Click into the line at the bottom of the console, press Ctrl+V and then Enter. (If the console has a language button, choose Lua.)
  4. The console prints lines that start with VLTL:. The last one says done. The timer is now on Video 2 above your video.

3.3Check the result

Console output ending in done, the timer clip on Video 2 and the VLTL bin in the Media Pool
  1. The console prints lines that start with VLTL:. The last one says done.
  2. The timer is on Video 2, over the whole video.
  3. The very first time, the script also adds a small Text+ template to your Media Pool (a bin called VLTL). You do not need to touch it.
If the video FPS and the timeline FPS do not divide evenly (for example a 90 fps video on a 60 fps timeline), the timers start and stop on the nearest timeline frame, a few milliseconds off. The frozen lap times shown at the end are still exact.

3.4What the script does for you

  • Reads your timeline frame rate and finds your video on Video 1 (by file name, or the clip under the playhead).
  • Adds the timer on Video 2 with the same start and length as your video. It also works if the start of the clip is trimmed.
  • Sets the font you chose, the size, the position in the top right, and a black outline.
  • Fills in the timer so it counts the best 3 laps live and freezes each lap at its exact time.
The look it sets (if you want to change it afterwards)

You can change any of these in the Inspector: click the timer on Video 2, then the Title tab.

WhereSettingValue
Text tabFontthe font you chose on the page (HDZero OSD, Regular by default)
Text tabSize0.025
Text tabV Anchor-1 (top: the lines grow downwards and the first line stays put)
Layout tabCenter X / Y0.78 / 0.844
Shading tab, element 2Enabled, outline, blackThickness 0.06
Using another resolution or aspect ratio? Change only Size until the digits are as tall as the OSD digits, then adjust Center X/Y. If you change Size, scale the outline Thickness by the same factor.

4Result

Back on the Edit page, move the playhead over your best 3 laps. The counters count up live, freeze when each lap ends, and show the 3-lap total on top.

Finished overlay in the top right of the video
  1. Total of the 3 laps, a dashed line, then lap 1, lap 2 and lap 3 (frozen at their exact times).

This is how it looks with 1 dash per character:

14.956 ------ 04.989 05.078 04.889
With the HDZero OSD font and a black outline.

5Trim and edit your video

When the timer looks right, you can cut and trim as much as you like. Link the video and the timer first, so they stay lined up (the timers count from the start of the timer clip).

  1. In the timeline, select the timer clip on Video 2 and your video clip.
  2. Right-click one of them → Link Clips (shortcut Ctrl+Alt+L). A tick next to it means they are linked.
  3. Now trim, cut and move the clips as much as you want. The video and the timer move together, so the timers stay in step with the video.
If you trim the video or the timer on its own (not linked) after the script ran, the timers no longer match the video. To redo it, delete the timer clip on Video 2 and run the script again.

If something looks wrong