mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
28 lines
1.1 KiB
Desktop File
28 lines
1.1 KiB
Desktop File
[Unit]
|
|
Description=Room concrete camera SRT publisher (Pi)
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
# PS3 Eye mic (card 2) exposes 4ch/16k; use plughw to avoid format errors.
|
|
ExecStartPre=/usr/bin/sh -c "/usr/bin/amixer -q -c 2 sset 'Mic Capture Switch' cap || /usr/bin/true"
|
|
ExecStartPre=/usr/bin/sh -c "/usr/bin/amixer -q -c 2 sset 'Mic Capture Volume' 100% || /usr/bin/amixer -q -c 2 sset 'Mic' 100% cap || /usr/bin/true"
|
|
ExecStart=/usr/bin/ffmpeg \
|
|
-fflags nobuffer -flags low_delay -rtbufsize 0 -thread_queue_size 256 \
|
|
-f v4l2 -input_format yuyv422 -video_size 640x480 -framerate 30 -i /dev/video0 \
|
|
-fflags nobuffer -thread_queue_size 256 -f alsa -ac 4 -ar 16000 -i plughw:2,0 \
|
|
-map 0:v:0 -map 1:a:0 \
|
|
-c:v h264_v4l2m2m -b:v 1M -g 30 -bf 0 -pix_fmt yuv420p \
|
|
-af "pan=mono|c0=FL+FR,volume=0.5" \
|
|
-c:a libopus -b:a 64k -ar 16000 -ac 1 \
|
|
-flush_packets 1 -f mpegts \
|
|
srt://192.168.0.86:9000?streamid=#!::r=room/concrete,m=publish&latency=10&mode=caller&transtype=live&pkt_size=1316
|
|
Restart=always
|
|
RestartSec=2
|
|
User=root
|
|
Group=root
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|