diff --git a/cmd/camera-streamer.c b/cmd/camera-streamer.c index ceb76cf..79b9e3d 100644 --- a/cmd/camera-streamer.c +++ b/cmd/camera-streamer.c @@ -56,6 +56,7 @@ camera_options_t camera_options = { .high_res_factor = 1.0, .low_res_factor = 0.0, .auto_reconnect = 0, + .auto_focus = true, .options = "", .h264 = { .options = diff --git a/service/camera-streamer-arducam-16MP.service b/service/camera-streamer-arducam-16MP.service index 7beea38..0b7b361 100644 --- a/service/camera-streamer-arducam-16MP.service +++ b/service/camera-streamer-arducam-16MP.service @@ -9,13 +9,18 @@ ExecStart=/usr/local/bin/camera-streamer \ -camera-format=YUYV \ -camera-width=2328 -camera-height=1748 \ -camera-fps=30 \ - -camera-nbufs=2 \ # use two memory buffers to optimise usage - -camera-high_res_factor=1.5 \ # the high-res is 1552x1165 - -camera-low_res_factor=3.0 \ # the low-res is 776x582 - -camera-options=brightness=0.1 # bump brightness slightly + ; use two memory buffers to optimise usage + -camera-nbufs=2 \ + ; the high-res is 1552x1165 + -camera-high_res_factor=1.5 \ + ; the low-res is 776x582 + -camera-low_res_factor=3.0 \ + ; bump brightness slightly + -camera-options=brightness=0.1 \ + ; disable auto-focus + -camera-auto_focus=0 -User=nobody -Group=nogroup +DynamicUser=yes SupplementaryGroups=video i2c Restart=always RestartSec=10 diff --git a/service/camera-streamer-arducam-64MP.service b/service/camera-streamer-arducam-64MP.service index 528c151..05e5d94 100644 --- a/service/camera-streamer-arducam-64MP.service +++ b/service/camera-streamer-arducam-64MP.service @@ -3,21 +3,27 @@ Description=camera-streamer web camera After=network.target [Service] -ExecStartPre=-/usr/bin/v4l2-ctl -d /dev/v4l-subdev1 -c focus_absolute=2200 # set fixed-focus +; set fixed-focus +ExecStartPre=-/usr/bin/v4l2-ctl -d /dev/v4l-subdev1 -c focus_absolute=2200 + ExecStart=/usr/local/bin/camera-streamer \ -camera-path=/base/soc/i2c0mux/i2c@1/arducam_64mp@1a \ -camera-type=libcamera \ -camera-format=YUYV \ -camera-width=2328 -camera-height=1748 \ -camera-fps=30 \ - -camera-nbufs=2 \ # use two memory buffers to optimise usage - -camera-high_res_factor=1.5 \ # the high-res is 1552x1165 - -camera-low_res_factor=3.0 \ # the low-res is 776x582 - -camera-options=brightness=0.1 \ # bump brightness slightly - -camera-auto-focus=0 # disable auto-focus + ; use two memory buffers to optimise usage + -camera-nbufs=2 \ + ; the high-res is 1552x1165 + -camera-high_res_factor=1.5 \ + ; the low-res is 776x582 + -camera-low_res_factor=3.0 \ + ; bump brightness slightly + -camera-options=brightness=0.1 \ + ; disable auto-focus + -camera-auto_focus=0 -User=nobody -Group=nogroup +DynamicUser=yes SupplementaryGroups=video i2c Restart=always RestartSec=10 diff --git a/service/camera-streamer-usb-cam.service b/service/camera-streamer-usb-cam.service index e00f0ba..9314e97 100644 --- a/service/camera-streamer-usb-cam.service +++ b/service/camera-streamer-usb-cam.service @@ -8,12 +8,14 @@ ExecStart=/usr/local/bin/camera-streamer \ -camera-format=JPEG \ -camera-width=1920 -camera-height=1080 \ -camera-fps=30 \ - -camera-nbufs=2 \ # use two memory buffers to optimise usage - -camera-high_res_factor=1.0 \ # the high-res is 1920x1080 - -camera-low_res_factor=2.0 # the low-res is 960x540 + ; use two memory buffers to optimise usage + -camera-nbufs=2 \ + ; the high-res is 1920x1080 + -camera-high_res_factor=1.0 \ + ; the low-res is 960x540 + -camera-low_res_factor=2.0 -User=nobody -Group=nogroup +DynamicUser=yes SupplementaryGroups=video i2c Restart=always RestartSec=10