Resource icon

OBS Lua Count down time and Switch Scene Dont realy have a version string yet

Sigvald Refsum

New Member
Sigvald Refsum submitted a new resource:

Count down time and Switch Scene - Count down to a given time and switch scene

A modification of the original countdown.lua made by Jim
A couple of extra settings make it possible to:

1. Activate a given Scene at the end of the countdown
If this is not set the Final Text is activated

2. Count down to a given time in the form hh:mm:ss
If this is not set the Duration is used as time

3. Set a text on a line above the count down timer
Read more about this resource...
 

ThatGirlSlays

New Member
This causes my OBS to crash. Specifically, the function
Code:
obs.obs_frontend_set_current_scene()
on line 59 causes my OBS to crash. I have tried using the function in another script and get the same result. I am using OBS Studio version 22.0.2. I was wondering if anyone else had the same issue.
 

Sigvald Refsum

New Member
This causes my OBS to crash. Specifically, the function
Code:
obs.obs_frontend_set_current_scene()
on line 59 causes my OBS to crash. I have tried using the function in another script and get the same result. I am using OBS Studio version 22.0.2. I was wondering if anyone else had the same issue.
Sorry about the late reply.

I will need a bit more information about the setup to be able to help you.
I see that it fails if I start the script before I create the resources it use;
'Text source'
'Sceen'

I use the 64bit version and Windows 10.
 

Torath'Kal

New Member
Wont start on mine. I set the duration, text source and scene to switch to but when it runs it ignores the timer and just switches immediately.
Not that it should make any difference but im on W7.
 

Sigvald Refsum

New Member

Sigvald Refsum

New Member
Wont start on mine. I set the duration, text source and scene to switch to but when it runs it ignores the timer and just switches immediately.
Not that it should make any difference but im on W7.
I was able to reproduce the issue, but unable to find a solution. The workaround was to reload the script.
I will work for a solution, but that may take some time.
 

fenghuyu

New Member
Use the timer to switch scenes when the timer ends, but there are repeated delays in the intermediate transition animation. I read your source code, guessing that the program should still be refreshed every second during the transition, it takes about 2 seconds from the switch scene to the end of the program.
 

Adamyk

New Member
I couldn't get the drop down "Text Source" box to work in OBS 25.0.8. I compared your script with the countdown.lua included with OBS. In line 208? I changed the line
source_id = obs.obs_source_get_id(source)
to
source_id = obs.obs_source_get_unversioned_id(source)
and it is working now.
 
Top