Comprehensive Stopwatch & Countdown Timer

OBS Lua Comprehensive Stopwatch & Countdown Timer 3.2

All things up and all things down in time.

Stopwatch 1.gif


1) Stopwatch
2) Countdown

Property Configuration:

1) Basic - Hides all advanced settings
2) Advanced - Show all available configurations

3.2 a.png


Properties defined in 'Advanced' settings will remain active even if the config is set to 'Basic'. The purpose here is to remove clutter settings.

Some options are hidden, and will only become available if they are relevant to the parent property.

The user is able to define a time stamp:

Stopwatch 4.gif

1) Full (Hours:Minutes:Seconds:Splitseconds)
2) Leading Zeros Removed (Cleaner look)
3) Leading Zeros Removed & Splitseconds removed (Cleaner look)
4) Split-seconds removed

** Countdown Timer Only:

1) Count Down time defined by the user (Hours:Minutes:Seconds)

2) Auto Record at Defined Events:

2.1) "Timer Expires"
2.2) "Caution Time"
2.3) "Warning Time"
2.4 ) "Timer Visible"
2.5) "Timer Start"

3) Switch Scene to defined scene when "Timer Expires"

4) Render user defined "TIMER END TEXT" when "Timer Expires"

5) Define a list of scenes or sources and when the timer expire it will change to the next item in the list and restart the timer. This feature is useful to cycle through a list of scenes / sources / cameras.

A (1).gif

B (1).gif

6) Define a specific Date and Time when the timer must expire (Days, Hours, Minutes, Seconds)

Stopwatch (1).png

6.1) Timer will count down to that specific date and time 'X Days 00:00:00,00'
6.2) Able to customise the text for Day / Days and include line breaks (\n)

** Stopwatch Timer Only:

1) Stopwatch 00:00:00,00 (HH:MM:SS:FF)

Stopwatch 1.gif

2) Split Time Stamps

Stopwatch 2.gif

2.1) Split times rendered in a secondary Text Source defined by the user.
2.2) Various format options available.

3) Styling and audio triggers available on specific time for Warning and Caution feedback.


Note: Format options limited due to source type features.

** Global Features:

1) Text Effects (Caution Time stamp) defined by the user.
2) Play Media Source (Caution Time stamp) defined by the user.
3) Define max play time (Seconds) for Media sources which have looping enabled (In Media Source properties)
4) Trim Timestamp
5) Hotkeys:


5.1) Start/Pause
5.2) Split Time
5.3) Reset

6) Start on Source Visible

*** Bugs:

Any feedback will be great as there might be some issues.

** Contributors & Credits

Although I coded this Script from scratch, much of it was inspered by various other Scripts created by very talented people:

1) Tom Dymel
2) cg2121
3) Tormy
4) bfxdev


To use this script:
  1. Download the Script from the download link and place the file in your script folder :
    • C:\Program Files\obs-studio\data\obs-plugins\frontend-tools\scripts (Windows)
  2. You may rename the script to any name that makes sense to you.

  3. If you need to use the script multiple times, you may also duplicate the script and provide each copy with a unique name.

  4. Open OBS

  5. Create a new <scene> and add any sources you may need:
    • Start with at least one <text source> source that will be used as a 'Timer' source.
    • Depending on the functions of the script you wish to use, you may also want to add some optional sources.
    • Optional Sources you may use:
      • 1 x <media source> with a sound clip used for the Audio Caution trigger
      • 1 x <media source> with a sound clip used for the Audio Warning trigger
      • 1 x <text source> used for the Stopwatch Split Data
      • 1 x <text source> used to diplay the active scene name (Used on timer expire when 'Next Scene' is set to 'Source List' or 'Scene List' )
      • - Warning and Caution Text Notes
        • Use two additional <text sources> one for each state.
        • The Warning & Caution notes may be styled individually to suit your needs through the text properties and custom filters,
  6. From OBS Menu, open up the Scripts dialog found under 'Tools -> Scripts'

  7. Click the Plus '+' to add a new Script, select the file 'StopWatch.lua'

  8. Configure the Script properties:
    1. Select the Source for the Timer, this is the Text Source that will render your timer.
    2. Set your timer Caution & Warning time stamps at the desired setting (00:00:00) if needed.
    3. Then define the colors for Caution & Warning as desired (these steps should be easy to configure)
  9. Assign Hotkeys for the 'Split', 'Reset' & 'Start/Pause' Button:
It should be noted that the Miliseconds render is limited (based on) the Video Frame Rate. For best results a Frame Rate of 60 FPS is recommended.

* Also See File>Settings>Video>FPS Values
  • Like
Reactions: Presm
First release
Last update
4.67 star(s) 3 ratings

More resources from JEJ

Latest updates

  1. Version 3.2

    Please backup your old file before replacing it. Report any issues (: Thank you wgp123 for your...
  2. Version 3.1

    Quality of life improvement. This update hides the 'Active Source' control property until it is...
  3. Version 3.0

    Added Suffix Text for Countdown timer Added timer format option to remove split seconds only...

Latest reviews

Thought I'd rated this already! It's excellent.
Thank you for the rating!
I appreciate this script! It's actually very versatile and useful :)

Just got a tiny issue. I was setting up a time up sound for when the countdown gets to 00:00:00, but it only gets played for a second before it gets muted. But if i use it as a stopwatch, the sound gets played just fine. Hope you can fix it soon ^-^.

EDIT: Also, im changing now manually the displayed names on hotkeys menu because i have a copy of your script in order to have two timers. Maybe naming the script file on the hotkey name would be more convenient?
Thank you, this was fixed from Version 2.7
thank you for the great job
Thank you for the feedback