Resource icon

OBS Lua Visibility Timer 1.0

cg2121

Member
cg2121 submitted a new resource:

Visibility Timer - Sets a source to show/hide on a timer.

This adds a visibility timer script with the following options:

Source - select source
Mode - Show source after specified time, Hide source after specified time, Repeat
Delay after activated (ms) - delay timer until after specified time (useful if using scene transition)
Duration (seconds) - time the source will hide or show
Repeat hold time (seconds) - repeat mode only - time until which the source will hide or show again
Start visible (repeat mode) - starts the source shown or...

Read more about this resource...
 
I tried to use this script, but it does not work.
I want to show a clip of a movie file every 15 mins, how do i achieve this?
 

I3ordo

Member
planning to use this for hiding the instant replay source then unhide it to get rid of the frozen frame of the last replay video. will see how it goes...
 

Ayenul

New Member
Nothing happens in OBS Studio 21.1.0 64-bit once the script is loaded and set. Script log also empty. Shame, because this was exactly what I needed ;)
 

Spectre

New Member
Please add the ability to add multiple actions/sources. I need is to start with showing one source and then after some time hide that and show another. Continue doing that for a certain number of sources then go back to the first source.
 

icabero0225

New Member
Hey, has anyone figured out how this works? Any tutorials? Currently it's not doing anything. I've added it in scripts and it shows up, but doesn't seem to work. Would much appreciate any replies as I am really looking forward to using this!

EDIT: Using OBS Studio 23.0.1
 

StephenG

New Member
Got your script working no problem, having one issue: I am loading a browser source that holds a Javascript function that fires on load.

the obs.obs_source_set_enabled() API function doesn't fully disable the source. I don't see one in the API documentation either. I am brand new to OBS scripting so I don't know if there is a function that would fully disable the source, so the next time it is shown the Javascript function would fire again.

I am so close to getting this to work. I would really appreciate any feed back / comments.

Thank you for your script.
 

adjstreams

New Member
Can someone explain how this is supposed to work with animated media sources?

I have a "follow me" animated media source that last 5 seconds. I'd like to show it once and then wait 10 minutes before showing again. Could this plugin be used to create that effect? By the looks of things it should be possible, but I don't quite understand what the media source properties should be set to and what the script settings should be set to so that it doesn't cut off or suddenly show the clip halfway through playing.
 

adjstreams

New Member
Can someone explain how this is supposed to work with animated media sources?

I have a "follow me" animated media source that last 5 seconds. I'd like to show it once and then wait 10 minutes before showing again. Could this plugin be used to create that effect? By the looks of things it should be possible, but I don't quite understand what the media source properties should be set to and what the script settings should be set to so that it doesn't cut off or suddenly show the clip halfway through playing.

part of the problem might be that it may last a few milliseconds more than 5 seconds, so my numbers are slightly out and it eventually goes out of sync. I'm trying to figure out what the numbers should be, but I'm doing it by trial and error with a delay of 5 seconds rather than 10 minutes. There must be simpler way of doing this?
 

gguevara

New Member
Hello,

This is working for me. I added a 1 second delay timer to my webcam, so it actually activates 1 second after switching into the Scene. I have my webcam resized as a 4:3 screen, within the main 16:9 scene (like a PIP). This way I can have a resized Stinger Transition source play first, only over the smaller 4:3 PIP position in the scene (not the entire 16:9 full screen) - followed by the webcam source timed to the transparent stinger.

The only issue is that this 1 second delay is applied globally for all Scenes that use the webcam. Is there a way for the script to apply the delay only to the source of a specific Scene, and not any other Scenes that use the same webcam source? In other words, can the script work at the Source level (globally), and also an option to work at the Source Level - per Scene level?

Thanks,
Galo
 

xchenda

New Member
plugin works as intended, although there's a problem: in the beta version of obs there are show/hide transitions, but it seems like this plugin doesn't work with the transitions.

apart from that it's a very good plugin and it works as intended
 

Gordon Freeman

New Member
I would like to show and repeat a media source after various minutes.
For some reason it doesn't work for me. If set up the script like this.
1596025516261.png

I assume the Duration is the time the source should be visible, right?
and the hold time is the time until it repeats again, right ?

using latest OBS-
 

rixax

New Member
I would like to show and repeat a media source after various minutes.
For some reason it doesn't work for me. If set up the script like this.
View attachment 59425
I assume the Duration is the time the source should be visible, right?
and the hold time is the time until it repeats again, right ?

using latest OBS-
You are correct. Note that at "ms" milliseconds your media is only visible for .01 seconds every 15 seconds
 

rixax

New Member
Is there any way to use a timer on a scene or a camera/video source that doesn't affect the camera on ALL other scenes. I thought I had this working at one time. I had a scene with only a media file (video) playing and my video camera (or maybe it was another scene with just the video camera) and every 30 seconds would show my "live" embed for 15 seconds. I think I re-installed the visibility timer or updated it and this not long works. Any suggestions?
 

RookieSteph

New Member
I could use a helping hand with this please.
I have a source (webcam) that i want to turn off 30 seconds after i turn it on. Can i use this for it, and if yes, how?
 
Top