exeldro / obs-move-transition

Move transition for OBS Studio
https://obsproject.com/forum/resources/move-transition.913/
GNU General Public License v2.0
684 stars 50 forks source link

Audio Move Filter Causes Massive Lag #230

Open Jackmino66 opened 2 months ago

Jackmino66 commented 2 months ago

Essentially: I'm attempting to make an object light up following the microphone. I am doing this using a "dark" image and a "light" image, and then an Audio Move Filter for the microphone audio channel, controlling the opacity setting of an image mask/blend filter on the "light" image. This system works perfectly, however it reduces the FPS of everything (audio, video, everything, though notably the CPU/GPU usage doesn't change) to less than 10, and having multiple Audio Move filters reduces the FPS even further. If the image in question is hidden or in another scene, it still lags. The only way to restore the FPS is to disable the Audio Move filter.

Any advice for how to fix this? I've seen some posts saying that enabling cache transitions helps, but I cannot seen any difference using it. Thx

Jackmino66 commented 2 months ago

Oh and another thing. Is there a way to clamp the output of the filter? At the moment it will increase the "opacity" of the image above 100% and cause it to become brighter than it should be. This can be corrected with tuning but it would be nice to just clamp the output

Jackmino66 commented 2 months ago

Okay so on further testing I have discovered this: It's not the Audio Move filter or the Image Mask/Blend filter causing the lag, it is the audio move filter working on a complicated alpha mask. Using a much simpler alpha mask solves the problem.