TheCatAndI
New Member
I wrote a script that hides an image and shows a video.
However, when the script is run, it turns out that the image is no longer visible, and the video does not appear immediately, but only after a few frames. How can this be fixed?
Lua:
local obs = obslua
local SourceVideo = obs.obs_get_source_by_name("Video")
local SourceImage = obs.obs_get_source_by_name("Image")
local Scene = obs.obs_scene_from_source(obs.obs_frontend_get_current_scene())
local SceneItemVideo = obs.obs_scene_sceneitem_from_source(Scene, Source)
local SceneItemImage = obs.obs_scene_sceneitem_from_source(Scene, Source2)
obs.obs_source_update(SourceVideo, nil)
obs.obs_sceneitem_set_visible(SceneItemVideo, true)
obs.obs_sceneitem_set_visible(SceneItemImage, false)
However, when the script is run, it turns out that the image is no longer visible, and the video does not appear immediately, but only after a few frames. How can this be fixed?