With the older V1 and V2 standard Pi cameras, using v4l2-ctl, it was possible to modify settings (exposure, brightness, contrast, gain, etc) WHILE THE CAMERA WAS RUNNING. But other than the Arducam python script for focus adjustment, I haven’t seen a way to issue setting changes through libcamera-vid while it is already running.
Does anyone know how to do that? Is a python script the only way to modify camera settings on-the-fly? When I’m streaming, it’s nice to be able to adjust the picture quality, but I’m just not sure how to do that on this new setup.
It appears that the “v4l2-ctl” command has no usable options when running this propietary camera. They call it v4l2 compatible, but that must just be at the very lowest level.
With the prior cameras (V1 and V2), yes, I was able to modify parameters on-the-fly with the ‘v4l2-ctl’ command, but with this new Hawkeye 64mp camera, I cannot use the v4l2-ctl command. If you have figured out a way to do that, please explain with more details. But for me, any attempt to issue a v4l2-ctl command FAILS, as shown below:
$ v4l2-ctl -d /dev/video0 -c contrast=1
unknown control 'contrast'
$ v4l2-ctl --list-ctrls
$ <-- I get NOTHING - no usable controls available!
That’s what I meant earlier when I said “It appears that the ‘v4l2-ctl’ command has no usable options when running the proprietary camera.”
However, I see that there is the focus Python script that somehow CAN make on-the-fly changes, so at least the focus motor is controllable during video operation.
After making a few videos with this new 64mp, I have a lot more questions, but I guess I need to post them separately. I was hoping this higher quality camera would make our videos better, but so far, it’s been about equal to the older V1 camera…and I had more control over that camera to improve the video image.
Edward or Yang,
I have some comments and questions – Comment: If version 0.0.7 is already installed, it appears that you must also include the option “–allow-downgrades” when trying to install 0.0.6. Otherwise, you will get an error and it won’t downgrade.
pi@pi4:~ $ sudo apt install -y ./libcamera-apps-0.0.6-bullseye-arm64.deb
Use 'sudo apt autoremove' to remove it.
The following packages will be DOWNGRADED:
libcamera-apps
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
E: Packages were downgraded and -y was used without --allow-downgrades.
pi@pi4:~ $ dpkg --list|grep libcamera
ii libcamera-apps 0.0.7 arm64 libcamera-apps
ii libcamera-dev 0.0.7 arm64 libcamera
Questions: 1) For the armhf platform, you suggest installing version 0.0.6 of “libcamera-dev”, but for the arm64 platform, you suggest installing version 0.0.6 of “libcamera-apps”.
Is that correct? Or is that a typo? 2) I was already on 0.0.7 and I’m on the arm64 platform. Should I downgrade BOTH “libcamera-dev” and “libcamera-apps” in order to fix this problem? When I tried your suggestion above, it did not fix my issue – the “FocuserExample.py” program will not work.
(I have downgraded libcamera-apps to 0.0.6, but my libcamera-dev is still running 0.0.7)
pi@pi4:~ $ dpkg --list|grep libcamera
ii libcamera-apps 0.0.6 arm64 libcamera-apps
ii libcamera-dev 0.0.7 arm64 libcamera
pi@pi4:~ $ cd Arducam-Pivariety-V4L2-Driver/focus
pi@pi4:~/Arducam-Pivariety-V4L2-Driver/focus $ python FocuserExample.py
Traceback (most recent call last):
File "/home/pi/Arducam-Pivariety-V4L2-Driver/focus/v4l2_utils.py", line 64, in get_device_controls_by_class
fcntl.ioctl(fd, v4l2.VIDIOC_QUERYCTRL, queryctrl)
OSError: [Errno 25] Inappropriate ioctl for device
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/Arducam-Pivariety-V4L2-Driver/focus/FocuserExample.py", line 157, in <module>
main()
File "/home/pi/Arducam-Pivariety-V4L2-Driver/focus/FocuserExample.py", line 152, in main
focuser = Focuser(args.device)
File "/home/pi/Arducam-Pivariety-V4L2-Driver/focus/Focuser.py", line 40, in __init__
self.ctrls = v4l2_utils.get_ctrls(self.fd)
File "/home/pi/Arducam-Pivariety-V4L2-Driver/focus/v4l2_utils.py", line 96, in get_ctrls
for queryctrl in get_device_controls_by_class(vd, class_):
File "/home/pi/Arducam-Pivariety-V4L2-Driver/focus/v4l2_utils.py", line 66, in get_device_controls_by_class
assert e.errno == errno.EINVAL
AssertionError