Question / Help Video freezing up for 3 seconds every minute, NOT streaming, using virtualcam

bradtem

Member
Most of the freezing problems I've seen have related to streaming. I set up OBS to use via OBS-virtualcam with zoom and other tools, and it was working fine for several weeks. Then it started getting into a mode where every 30 to 60 seconds, the video will freeze in the OBS screen, and Zoom will switch to gray screen (no camera.) Then zoom will come back but with frozen jerky video for a second or two and finally it will sync up. Audio (which is going through OBS as well, and out the monitor channel to a virtual audio cable) does not hiccup but video does.

During these hiccups, CPU usage will briefly drop, then spike up, to 80% all the way to 100%. It is normally around 50%. Yes, this machine is an old quad-core i5, and a bit underpowered, but it was working fine for quite some time without hiccups. The down-up-back looks a bit like a heartbeat on an ECG. Even more odd, Windows task manager reports that it is Zoom, not OBS that is using more CPU, and it reports the same for Skype or Hangout or other programs using the virtualcam.

Except if you kill zoom, it still happens, in fact even if you kill the virtualcam it still happens (though not as much) with it now reporting that OBS has had the spike in CPU usage. So yes, it happens with just OBS, so the problem is there and probably not in Zoom or OBS-virtualcam, they just make it more visible. It is affected by how much spare CPU there is (ie. it happens less often if the machine is less loaded) and then the CPU spikes don't hit 100%, but the hiccup still happens.

I could fork out for fresh hardware, but I fear that would not actually find the root of the problem.

No, a reboot doesn't fix it, at least not any more. And I have killed everything else that shows any CPU usage like the browser and any daemons. I tried downgrading to 25.0.4, since the problem started happening roughly around the time of 25.0.8, but no joy.

I've tried reducing the size of the canvas to 1280x720 -- no luck. I've tried using very simple scenes, it still happens. (My normal scenes have video playing and chromakey on a camera so they do need resources.) OBS is making good use of the GPU as shown in task manager, but nowhere close to overloading it (the GPU is much more recent.)

I've tried tweaking process priority. No joy. Tweaking streaming settings should not affect anything as I am not streaming.

I may do the hardware upgrade anyway, but otherwise this system was working as my Zoom/OBS studio just fine for several weeks, running for hours with no hiccup. Yes, it seems as though something else installed later might be to blame, and I may eventually try to pull everything out, but there is nothing apparent running or using CPU. I will note that "System" is using about 20% of CPU, OBS is also using about 15% (plus GPU) and Zoom another 20% in stable operation.

Another possible clue: Before thsi problem happened, OBS would start up very quickly when I invoked it, like most programs do. (The system is all SSD.) However, roughly at the same time as the troubles, it takes a few seconds for the window to display in that situation.

What else to look for or tweak?
 

bradtem

Member
Sad to see nobody has more thoughts. I have tried deleting as many other extraneous programs from the machine as I can and making sure no daemons are running. I attach a CPU graph of when it happens -- this is feeding into Zoom. But it happens just the same when OBS is sitting there running alone on the machine, with a very simple scene, and either not recording or recording to video. In this mode, the CPU spike is visible but much less pronounced. Something about this hiccup causes the user of the virtualcam to go into a short CPU frenzy. It's about every 30-40 seconds. My first intuition would be something like a garbage collect, but it would not be that simple. It happens on the system with nothing but OBS, and CPU load at a more reasonable number and nothing ever approaching 100% -- so I doubt a faster CPU would solve the problem. Nothing is happening when the spike takes place, the machine is not being touched and hasn't been for a while. Anything else to try? A complete wipe and reinstall of everything might fix it but is pretty drastic.

Just to reiterate, the video freezes even with no virtualcam, no streaming, no recording, no output of any kind. It hapens if the scene is a camera, or a mediaviewer of a video file or a DisplayCapture.

cpuspike.jpg
 

bradtem

Member
Good news everyone. I found the bug, with some assist on the DIscord channel. Turns out I had a (disabled) Image source in one of my scenes, and that source was referencing an image on a network drive, which was down. Even if the scene was not active, OBS seems to want to keep attempting to open that file, and failing, and somehow that failure is blocking and freezing OBS for a few seconds. I have filed a ticket on github. If you get this problem, look for a reference to a network drive
 

daniel_morac

New Member
Thanks for share how do you fix your issue.
I have a similar issue, I use skype call to join 3 person (including my self) I add 3 NDI source from Skype and the video freezing random, the audio works well, only the video freeze, I dont have a network drive reference.
 

Spewbert

New Member
Good news everyone. I found the bug, with some assist on the DIscord channel. Turns out I had a (disabled) Image source in one of my scenes, and that source was referencing an image on a network drive, which was down. Even if the scene was not active, OBS seems to want to keep attempting to open that file, and failing, and somehow that failure is blocking and freezing OBS for a few seconds. I have filed a ticket on github. If you get this problem, look for a reference to a network drive
You just saved my day. I had no idea what was going on and now I understand. This remains true for ANY reference to a network drive -- I had a text file pulling from a network drive, and OBS was freezing my entire video every minute trying to access it. Thanks for taking the time to document your solution -- people like you make the whole internet a substantially better place.
 
Top