[Unit]
Description=Streamer
Requires=network.target
After=network.target

[Service]
User={{ username }}
Group=OctoPrint
Nice=-2
ExecStart=/bin/bash -c "raspivid -t 0 -w {{ camera.width }} -h {{ camera.height }} -fps {{ camera.fps }} -o - | ffmpeg -loglevel quiet  -i - -c copy -f rtsp rtsp://{{ camera.rtsp_server }}/{{ inventory_hostname }}"

[Install]
WantedBy=multi-user.target
