Python script, image loading performance

Xunkar

New Member
I am writing a script that dynamically changes the file loaded in an image source. Whenever the image is modified, it creates a visible lag on stream. Is there any better way to achieve this? I'm not convinced this is threaded. For reference, here's what I'm doing:

Python:
settings = obs.obs_data_create()
obs.obs_data_set_string(settings, "file", image_path)
obs.obs_source_update(image_source, settings)
obs.obs_data_release(settings)
obs.obs_source_release(image_source)
 
Top