No activate/deactivate button for v4l2 devices

  • Thread starter Deleted member 407932
  • Start date
D

Deleted member 407932

Also no "deactivate when hidden" option.
As a result webcam/capture card are always on, hogging resources.
1700815347644.png


I've seen posts about a separate scene collection, opening discord/snap/zoom/etc camera preview to trick OBS into disabling the device upon startup.
That's not a solution as it doesn't help if I want to re-activate a device and then deactivate it later on again.
Plus, I'm losing visual clue to the state of my v4l2 devices - their leds are glowing brightly even when not showing (duh, the device is still on).

Manjaro + OBS 30.0.
 

AaronD

Active Member
If that's a performance problem, then you should really consider getting a better machine. This sort of constant load is almost nothing on modern hardware.

If your problem comes from your system still using exclusive access and not sharing, like some still do (they all used to for performance reasons, but there's no need for that anymore), then you can either look at how to make OBS or something else pass it through and effectively make it shared anyway, or look at switching to a system that does share. I know Ubuntu Studio does, as I have a rig on that that relies on it, but I'm sure it's not the only one.

If you're thinking about privacy, well, live media and privacy really don't go together very well. You might put something physical over the camera, but that's probably about all you can do, except to explicitly segregate your media rig from your personal stuff.
 
D

Deleted member 407932

Please, don't assume anything on my behalf, especially privacy or hardware limitations.
That boat sailed a very long time ago, lost behind the horizon.

What I'm thinking about is having the damn button and the ability to deactivate/release the device from the clutches of OBS - just like Windows users can.
Anything else is really irrelevant here.
 

AaronD

Active Member
It's normally not a problem except for the cases that I mentioned, each of which has a different solution, and you didn't say which you were. So I covered all the bases. New users are all over the place, and you didn't have a sign. (Bill Engvall reference, expanded well beyond its original context)

I'd consider that button to be a pure liability. So I completely understand and support its non-existence. If you don't want to tie it up, then remove all traces of it and restart OBS. If you want to use it in OBS, then OBS should keep its claim and only release it when it closes. If it were to release it and then be denied getting it back, that's a deal-breaker, so don't allow that opportunity.

Then we're back to the questions that I had before. If you insist on limiting the discussion to only, "How to release it?", then that screams of an XY problem:
 
D

Deleted member 407932

Lol, I don't know why any of us bother at this point.
Assuming people get those Eva references, telling people what they need, assuming all the bases are covered and knowing what those bases are...

There's no X/Y problem, you're imagining it.
And believe me, I'm here not for any kind of "tech support" or any sort.
That's yet another false assumption.

I need that button to be able to release the video source w/o restarting OBS.
That's it.

It's like having a shaver.
I don't need to tell anyone what my goals are with that.
It may be "giving a good impression during a job interview" or "looking good to my new date so she'd think I shave every day" or just "I'm trying to buy those in bulk to re-sell to get some money".
It doesn't matter at all if I need a shaver.

If you want more camera-specific things, then here you go:
  • to get visual easily-read indication that the cam is not in use on the cam itself (because OBS might be minimized of behind a game or on a separate monitor)
  • to not keep a cam in use due to the fact it heats up and drains battery (anything from "having less heaters in the room" to "saving that go pro battery life when there's no way to charge it w/o shortening the life of some othe device")
  • to not keep several cameras active when I no longer need them (it doesn't matter how much resources it takes - and I do have plenty - what matters is many times little = big; who knows how many v4l2 devices will be needlessly activated)
  • to be able to re-use a camera in another application w/o restarting OBS (imagine digitizing a VHS and suddenly needing a camera that has been activated on OBS startup and which OBS refuses to release)
  • to be able to physically unplug a camera because my friend asked me to w/o "ripping it off" (I don't want to "hope" obs won't crash when it tries to get something from a camera that "should've been there").
Not an exhaustive list by all means.
Note, this is neither an issue about just one setup where there's one v4l2 device nor about a setup where there's plenty of v4l2 devices.
I believe at this point I have the right to also assume something.
And I assume OBS is a "general purpose" application not specifically tailored to anyone's needs.
Do tell me if I'm wrong.

Some of those might come across as silly and one can always say "you should've prepared better", but that's not how humans work. We make mistakes. Glad, if some people here never do, but most of us are prone to that.

But, regardless of the reason "what for", why would OBS be denied to get the camera back?
The question is rhetorical, ofc. Even if the device's "number" changes, there are always ways to identify the device by path or name or a udev list. And even if I had no clue what are any of those things, I could always open up a new device (because obs doesn't have memory leaks it reports every time it closes).

What bothers me the most in this situation is... can I treat you as the developers team representative?
Is your opinion alone "just enough" to block addition of such a button and ever getting UI to look the same on all platforms?

I mean, if it's not, I don't wanna spend any more time fighting with you on this matter.
And if it is a "won't fix" - just say so.

Man, it should be easier to get officially denied and told to go make your own OBS with buttons and twitch panels...
 

AaronD

Active Member
  • to get visual easily-read indication that the cam is not in use on the cam itself (because OBS might be minimized of behind a game or on a separate monitor)
That's not what that light means. It's not a "tally light", that says when that camera specifically is live-on-air. It only means that the camera *could be* live-on-air, "somewhere". It's a privacy thing, and privacy doesn't play well with live media.

  • to not keep a cam in use due to the fact it heats up and drains battery (anything from "having less heaters in the room" to "saving that go pro battery life when there's no way to charge it w/o shortening the life of some othe device")
That could be a legitimate problem. I have an old smartphone in one rig, that runs a network camera app for OBS to pick up. It's plugged in, but the charger doesn't keep up. It goes from 100% battery to about 40% by the time I can get to it again to stop the app. But that's a constant drain regardless of whether OBS is running or not, and simply a part of normal operation. Same as a wireless mic that constantly drains its battery for the entire time that it's on, regardless of whether its receiver is powered on or unmuted on the sound board.

Just something to understand and manage. Make sure that it will last for the entire time that you need it, without turning off in between. If you need to cobble together a Rube-Goldberg contraption to keep it on and active for the entire time, to avoid a mid-show panic because it used to work but refuses now to come back correctly (I've seen that), so be it.

  • to not keep several cameras active when I no longer need them (it doesn't matter how much resources it takes - and I do have plenty - what matters is many times little = big; who knows how many v4l2 devices will be needlessly activated)
A watt or two each? Compared to a hundred or so just to keep the internal clocks running? How many sources do you have?! If you have enough that that matters, you probably have datacenter-level cooling already, and so it's still a moot point.

And the power-saving that can get a running system down to a few watts total, is usually incompatible with OBS. It requires a chip that's made for *that*, and not for constant performance like OBS needs.

  • to be able to re-use a camera in another application w/o restarting OBS (imagine digitizing a VHS and suddenly needing a camera that has been activated on OBS startup and which OBS refuses to release)
The vast majority of people don't do simultaneous unrelated things with media. So that situation almost never happens. If it does, you're probably reckless and jeopardizing both of them in a way that's unrecoverable for either one. Scrap all of both and start over, completely one at a time with no overlap.

  • to be able to physically unplug a camera because my friend asked me to w/o "ripping it off" (I don't want to "hope" obs won't crash when it tries to get something from a camera that "should've been there").
OBS doesn't have that problem. That source just hangs on the last frame it received, as a still image, while the rest of OBS keeps running.

why would OBS be denied to get the camera back?
Exclusive system, OBS releases, something else grabs, then OBS requests again. Request denied.
 

AaronD

Active Member
The general mindset for serious media production, is to make it work, PERIOD! Nothing else matters. If we have to waste an entire coal-fired power plant running flat out for this one gig, so be it.

Turn things on well ahead of time, and leave them on throughout the entirety of the session and well afterwards. And don't share or repurpose any of it, unless it's all part of the same rig that's explicitly designed and tested to do all that. (in which case, each source is still on and active for the entire time, and something downstream from it handles the switching) So there's lots of time to troubleshoot, and there's nothing to mess it up, and so it stays working for when we need it. Even if that need is only a couple of seconds during the 5 hours that it's on and active. (or whatever the numbers turn out to be)

Again, if you have to MacGyver something to keep it powered on and active for the entire time, that's perfectly okay.

---

All of that comes from a mindset of things being fragile and trying to break if given the slightest opportunity. So if the *experts* are that paranoid about their *good* gear, what are *you* doing?!
 
Top