raspberrypi/acatcher/stream.sh

11 lines
374 B
Bash
Executable file

#!/bin/sh
SERVERIP=192.168.24.20
SESSION_ID="01"
# different res is ok, MUST be mjpg
v4l2-ctl --set-fmt-video=width=640,height=480,pixelformat=MJPG
amixer -c 1 sset Mic,0 80%,80% unmute cap
(while true; do arecord -t raw -c 1 -f S16_LE -r 22050 -D hw:1 | nc $SERVERIP 40$SESSION_ID; sleep 1; done) &
while true; do ./v4lcap -o | nc $SERVERIP 41$SESSION_ID; sleep 1; done