I have used a similar script before, but it just won't work here it starts fine but when I kill raspivid or FFMpeg, it doesn't restart.
The script (/home/pi/picamrjp.sh) as follows:
I intend to call it from rc.local eventually but can't get it to work in a terminal first.
Code: Select all
#!/bin/bash while ! raspivid -o - -t 0 -fps 25 -b 6000000 | ffmpeg -re -f h264 -i - -vcodec copy -g 50 -f avi udp://18.104.22.168:1234 do sleep 1 echo "Restarting program..." done