Deactivate device when not in use?

Nullifer

New Member
Will we ever get this option for video capture devices, and screen/game capture sources on Linux?
It's extremely inefficient for it to be always running no matter what if any scene at all is incorporating the source.
I remember back when this function didn't work on windows it caused me so many issues.
 
On each frame, the screen capture (XSHM) and window capture (Xcomposite) video 'tick' methods fall through without getting the buffer if the source is not showing (see the video_tick implementations in plugins/linux-capture in the source code). This makes them close to no-ops when the source isn't visible - from what I can tell. Happy to be corrected.

The webcam is a different story (when using V4L2 at least); these are kept open (which is probably a sensible thing to do because a camera can take a moment to turn on - not great when switching scenes) and frames do seem to be copied in to OBS regardless of whether the source is shown or not.

It doesn't look trivial to fix, because the async video mechanisms in OBS aren't particularly well documented. Don't hold your breath, but I'll see if I can find time in the next few weeks (or month or so) to test some fixes.
 

Nullifer

New Member
On each frame, the screen capture (XSHM) and window capture (Xcomposite) video 'tick' methods fall through without getting the buffer if the source is not showing (see the video_tick implementations in plugins/linux-capture in the source code). This makes them close to no-ops when the source isn't visible - from what I can tell. Happy to be corrected.

The webcam is a different story (when using V4L2 at least); these are kept open (which is probably a sensible thing to do because a camera can take a moment to turn on - not great when switching scenes) and frames do seem to be copied in to OBS regardless of whether the source is shown or not.

It doesn't look trivial to fix, because the async video mechanisms in OBS aren't particularly well documented. Don't hold your breath, but I'll see if I can find time in the next few weeks (or month or so) to test some fixes.
Oh you're on the Linux development team?

Yeah when I was using it on windows these features seemed to work pretty good though tbh.

But if the current implementation works good I'm ok with it.

Im just worried about the Webcam thing more than anything. Having it in a bunch of different scenes seems like it could end up causing serious issues.

Atleast it did when windows didn't have the function.
 
Oh you're on the Linux development team?

I wish that was a thing! I'm just a guy that sends them bug fixes every now and then.

Working on the first problem for V4L2 input which is the rather broken async time stamp issues.; that might take a while to sort out.

The second problem, which I'm not sure can be solved, is that most users expect the camera to be 'instantly' available (e.g. when switching scenes) - so it might not be possible to stream-off while it is not visible.
 
Top