Comprehensive Stopwatch

OBS Lua Comprehensive Stopwatch 2.5

Fixed switching visibility for nested scenes as source.
1) Added Function, Timer Prefix: A Text Prefix to the Timer while the timer is active
2) Quality of life improvements
3) Fixed bug: Prevent recording if Timer Type is not Countdown
1) Performance optimization update for handling Text Sources
2) Fixed a calculation formula handling timing for media state
3) Media Visibility switch optimization.
Fixed Activating/Deactivating Sources placed inside Groups type Sources
Small fix and user experience improvements
* The action to start media ('caution') was fixed.
Small fix and user experience improvements

* The action to end media ('caution') was fixed.
All things up and all things down in time.


1) Stopwatch
2) Countdown

Property Configuration:

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


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 useris able to define a time tamp:

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

** 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"

** Stopwatch Timer Only:

1) Split Time Stamps

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

Note: Format options limited due to source type features.

** Global Features:

1) Text Effects (Caution Timstamp) defined by the user.
2) Play Media Source (Caution Timstamp) 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





Fixed incorrect reference
Fixed incorrect list type
Add new function: Split Time

For the Split function a new Text Source must be assigned.


Please report any issues, as there are always something missed during testing.
Stability fix.

Fixed an issue causing OBS to crash on exit
Fixed an issue where text color changes were not assigned.
Optimized code and cleanup