rate=$(timeout 5 ffprobe "rtmp://localhost/live/rrstudio" 2>&1 | grep framerate | awk '{printf "%d", $2}')
if [ -z "$rate" ]; then
echo "$d: need restart - null rate $rate" >> /var/log/upstart/rrvideo.log
service rrvideo restart
elif [ $rate -lt 25 ]; then
echo "$d: need restart - $rate" >> /var/log/upstart/rrvideo.log
service rrvideo restart
fi