Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4l2-ctl missing controls (16MP Autofocus Camera) #30

Open
giano574 opened this issue Sep 19, 2022 · 5 comments
Open

v4l2-ctl missing controls (16MP Autofocus Camera) #30

giano574 opened this issue Sep 19, 2022 · 5 comments

Comments

@giano574
Copy link

giano574 commented Sep 19, 2022

When executing v4l2-ctl --list-ctrls -d /dev/v4l-subdev1 only focus_absolute is listed as a control. I need to be able to adjust at least the shutter speed and gain on the fly. Using libcamera-vid --shutter x --gain x works, so why can't I use v4l2-ctl to adjust it?

@kbingham
Copy link

When libcamera is in control of the camera, it is responsible for handling the gain and exposure.
What is your use case?

@giano574
Copy link
Author

I'm creating a video stream using rtsp-simple-server, which uses libcamera (not apps) directly. I need to be able to adjust shutter speed and gain on the fly, and since v4l2-ctl -d /dev/v4l-subdev1 -c focus_absolute=850 works, I thought I would be able to also adjust the shutter speed and gain in the same way.
Apparently /dev/v4l-subdev0 is the device that exposes everything other than focus_absolute but changing exposure and analogue_gain doesn't work, I assume because - as you said - libcamera is in control.

@kbingham
Copy link

I would say this should be an issue on the rtsp-simple-server then. Can you reference it here when you create it so I can follow it please?

@giano574
Copy link
Author

giano574 commented Sep 20, 2022

bluenviron/mediamtx#1159
Is it documented somewhere in libcamera docs what one would have to do to change camera controls in the least "intrusive" way? From what I could gather from reading the doxygen docs, it seems like one would at least have to call stop() on the libcamera::Camera followed by a call to start() with an updated libcamera::ControlList. Is that the case?

@kbingham
Copy link

It doesn't have to stop and restart no - the request which are queued to get the frames can supply a control list as well. The desired controls should be part of that list which is submitted. That request is submitted by the rtsp-simple-server in the use case you've described, so rtsp-simple-server needs to add the controls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants