motion tunes gain value of a webcam despite fixed value in video_params parameter #1881
Closed
alexejpissarev
started this conversation in
General
Replies: 1 comment
-
as it turned out the "problem" was the v4l2 library itself: v4l2 seems to tune some webcam controls during every reboot and to set e.g. gain according to light conditions etc. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use motion on a raspberry pi with a connected webcam in a remote test lab.
Sometimes there is a lot of light there when the "motion-pi" is starting, sometimes it boots in the dark.
I've observed that the gain value of v4l2 driver was set to max (
v4l2-ctl --device=/dev/video --list-ctrls
-->gain 0x00980913 (int) : min=0 max=255 step=1 default=0 value=255
) if the pi had started in the dark.That is why I tried to set fixed gain value via video_params parameter, e.g.
video_params "Gain"=12
I expected to see this value in the output of
v4l2-ctl
after reboot, no matter of light conditions.But motions seems to still tune it by the first start:
v4l2-ctl --device=/dev/video --list-ctrls
--> gain value is set to 255 (max)v4l2-ctl --device=/dev/video --list-ctrls
--> gain value is set to something like 100Strangely motion do set gain to value defined via video_params if motion service is just restarted afterwards:
9. systemctl restart motion
10. check
v4l2-ctl --device=/dev/video --list-ctrls
--> gain value is set to 12Is there a possibility to prevent tuning the gain value in case this value is defined in the motion configuration, in the video_params parameter?
Thank you in advance for the clarification!
Kind regards,
Alexej
Here some details:
motion version: 4.7.0
installed as a deb package
standalone or part of third party: motion
video stream source: usb webcam "Logitech Webcam C930e"
hardware: ARM RPi4
operating system: Debian GNU/Linux 12 (bookworm)
Beta Was this translation helpful? Give feedback.
All reactions