Files
octodocker_deploy/picam_camstream.service
paukstelis b68ea01d0c Camerastreamer (#159)
* toward camera-streamer integration

* various fixes

* fix menu entry

* fedora 3.10

* perpare to merge
2024-03-11 15:25:14 -04:00

33 lines
916 B
Desktop File

[Unit]
Description=camera-streamer libcamera
After=network.target
StartLimitIntervalSec=120
StartLimitBurst=10
[Service]
User=OCTOUSER
EnvironmentFile=/etc/OCTOCAM.env
ExecCondition=/bin/sh -c "/usr/bin/libcamera-hello --list-cameras | grep -o '/base/soc/[^)]*'"
ExecCondition=/bin/sh -c "! ss -ltn src :$PORT | grep -q LISTEN"
ExecStart=/bin/sh -c "exec /usr/bin/camera-streamer \
--http-port=${PORT} \
--camera-type=libcamera \
--camera-path=$(/usr/bin/libcamera-hello --list-cameras | grep -o '/base/soc/[^)]*' | head -n1) \
--camera-format=MJPG \
--camera-width=${WIDTH} --camera-height=${HEIGHT} \
--camera-video.height=${VIDEO_HEIGHT} \
--camera-snapshot.height=${SNAPSHOT_HEIGHT} \
--camera-fps=${FRAMERATE} \
--camera-nbufs=${NBUFS:-2} \
${OPTIONS}"
Restart=always
RestartSec=10
Nice=10
IOSchedulingClass=idle
IOSchedulingPriority=7
MemoryMax=250M
[Install]
WantedBy=multi-user.target