File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ tool=/usr/bin/rpicam-hello # bookworm
4+ [ -e " $tool " ] || tool=/usr/bin/libcamera-hello # bullseye
5+
6+ $tool --list-cameras | grep -o ' /base/soc/[^)]*' || exit -1
Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ StartLimitBurst=10
66
77[Service]
88EnvironmentFile =/etc/camera-streamer.conf.d/libcamera.conf
9- ExecCondition =/bin/sh -c "/ usr/bin/libcamera-hello -- list-cameras | grep -o '/base/soc/[^)]*'"
9+ ExecCondition =/usr/bin/list-libcamera-devices
1010ExecCondition =/bin/sh -c "! ss -ltn src :$PORT | grep -q LISTEN"
1111ExecStart =/bin/sh -c "exec /usr/bin/camera-streamer \
1212 --http-port=${PORT} \
1313 --camera-type=libcamera \
14- --camera-path=$(/usr/bin/libcamera-hello -- list-cameras | grep -o '/base/soc/[^)]*' | head -n1) \
14+ --camera-path=$(/usr/bin/list-libcamera-devices | head -n1) \
1515 --camera-format=YUYV \
1616 --camera-width=${WIDTH} --camera-height=${HEIGHT} \
1717 --camera-video.height=${VIDEO_HEIGHT} \
You can’t perform that action at this time.
0 commit comments