Crowsinc / LiveVisionKit

LiveVisionKit brings the powers of computer vision and image processing to OBS Studio; implementing state of the art filters such as image enhancement and real-time video stabilization.
GNU General Public License v3.0
158 stars 16 forks source link

OBS High CPU Usage after adding Video Stabilizer filter #21

Closed jrodrigv closed 1 year ago

jrodrigv commented 1 year ago

System/Software Setup

OBS Log:: 2023-06-09 17-49-23.txt Crash 2023-06-09 17-54-24.txt

Issue Description High CPU after adding the video stabilizer filter

Expected Behavior Not so high CPU usage.

Provide a clear and concise description of what should happen instead. Not so high CPU usage.

Reproduction Steps I have recorded a video https://youtu.be/q-2uQAyHQw4

Supporting Evidence https://youtu.be/q-2uQAyHQw4

Crowsinc commented 1 year ago

Hi, the high CPU usage you are experiencing is a little on the high side but is expected for LVK 1.2.2. This will hopefully improve in the next major update, but at the end of the day, stabilizing a video in this way is computationally expensive and there's not much that can be done about that. There are alternatives like LIV which may be faster because they take the movement data directly from the headset.

As for the crash when you delete the filter - i'm not sure about that. Ill have to see if I can replicate it on my system and get it fixed for the next update.

jrodrigv commented 1 year ago

Thanks very much for the information. I will stay tuned then for future releases!

Crowsinc commented 1 year ago

Discovered that one of the major GPU operations for the stabilizer will sneakily be ran on the CPU instead of the GPU if OpenCV thinks it'll be faster. This explains the high CPU usage that is expected in LVK 1.2.*. There will be a patch for it included in LVK 1.3, or maybe earlier if that takes too long to come out.