Skip to content

linux-v4l2: add support for controls - #1815

Merged
jp9000 merged 1 commit into
obsproject:masterfrom
grimmy:v4l-controls
Dec 18, 2019
Merged

jp9000 merged 1 commit into
obsproject:masterfrom
grimmy:v4l-controls

Conversation

@grimmy

@grimmy grimmy commented Apr 8, 2019 •

Copy link
Copy Markdown
Contributor

Video4Linux exposes controls for capture devices. This commit adds
those controls to the properties window for v4l2-input devices.

Few things to mention here. This dynamically adds properties and as far as I can tell, this isn't something that's been done in OBS before, so it's kind of hacky. Also, right now properties don't get cleared if you switch devices which leads to all sorts of issues. I'm working on that, but it's going to be hacky too, requiring a hidden setting to the device or something.

This also means that I can't mark the strings for translation, as they're coming from the v4l driver. There might be a way to load in the v4l get text domain and do it that way, but I haven't investigated that yet.

@grimmy

grimmy commented Apr 8, 2019

Copy link
Copy Markdown
Contributor Author

Additional controls from my HDMI capture card
image

Additional controls from my Webcam (i grayed out the image fwiw). Note that the scroll bar shows that there are more controls than displayed.
image

@WizardCM WizardCM added the kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. label Oct 17, 2019
@WizardCM WizardCM added the platform/linux Categorizes issue or PR as affecting Linux specifically label Nov 26, 2019
@jp9000
jp9000 force-pushed the v4l-controls branch 2 times, most recently from f12e201 to bbf13c9 Compare December 18, 2019 16:37
Video4Linux exposes controls for capture devices.  This commit adds
those controls to the properties window for v4l2-input devices.
@jp9000
jp9000 merged commit 73e62a2 into obsproject:master Dec 18, 2019
@jp9000

jp9000 commented Mar 24, 2020

Copy link
Copy Markdown
Member

Wasn't worth. Been having too many problems with this code.

@grimmy

grimmy commented Mar 27, 2020

Copy link
Copy Markdown
Contributor Author

I asked for input months ago, and it was merged without ever giving that input. That is, how to handle dynamic controls. It looked like it could maybe be delete with an API that I can't recall at the moment, but yeah, if there's a way I'm totally down to finishing this up...

@kkartaltepe

Copy link
Copy Markdown
Collaborator

You can see an example of a seemingly perfectly functional v4l2 controls implementation in guvcview (GPLv3)

https://sourceforge.net/p/guvcview/git-master/ci/master/tree/gview_v4l2core/v4l2_controls.c

@grimmy

grimmy commented Mar 27, 2020

Copy link
Copy Markdown
Contributor Author

The problem with this is that when you change a device in the obs drop down it queries the new device and add the properties for it. This is problematic because the old device and new device may share property names so everything becomes a jumbled mess.

The other alternative that I was asking about, is if it'd make more sense to have a separate window for the properties like there is on windows (i think?).

BlueCheeseburger pushed a commit to BlueCheeseburger/obs-studio that referenced this pull request Aug 22, 2026
linux-v4l2: add support for controls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. platform/linux Categorizes issue or PR as affecting Linux specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants