1 Every time a new V4L device is initialized by the linux kernel, it start with
2 the controls default settings hardcoded in the driver.
4 There is not central mechanism to make changes to controls values more
5 "persistent": applications have to save and restore the settings themselves.
7 This is particularly annoying for settings like "Power Line Frequency"
8 provided by some cameras, this is a setting which you would very rarely need
9 to change once you determined the right value to use for your country to fix
12 So here are some convenience scripts to save and restore settings in an
13 application-independent way.
15 Install the scripts with:
20 Change the settings with your preferred v4l2 program like qv4l2 or v4l2-ctl,
23 $ v4l2-ctl -d /dev/video0 --set-ctrl gain_automatic=0
29 $ sudo /etc/v4l2-persistent-settings/v4l2-settings-save.sh /dev/video0
32 The settings will be restored the next time the device is connected.
35 https://superuser.com/questions/471597/linux-v4l-webcam-make-settings-stick
40 The scripts use v4l2-ctl from the v4l-utils[1] instead of v4l2ctrl from
41 v4l2ucp[2] (which can save to a file mor easily) because the former is
42 actively maintained and also because the latter may bring in Qt4 as
43 a dependency which can be undesirable on minimal systems.
45 [1] https://git.linuxtv.org/v4l-utils.git
46 [2] https://sourceforge.net/projects/v4l2ucp/