I'm using gstreamer-1.0 to stream a live video feed from the Raspberry PI camera module to a Windows 7 machine. The pipeline on the PI is:
raspivid -o - -t 0 -hf -w 800 -h 600 -b 1500000 -g 5 -awb incandescent -ex antishake -mm backlit -fps 24 | gst-launch-1.0 -e fdsrc ! h264parse ! rtph264pay pt=96 config-interval=10 ! queue max-size-bytes=0 max-size-buffers=0 max-size-time=5000000000 ! udpsink force-ipv4=true host=10.1.2.80 port=4200
And on the windows machine, also using gstreamer-1.0
gst-launch-1.0.exe udpsrc port=4200 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! textoverlay text="blahblahblah" ! fpsdisplaysink sync=false text-overlay=false
This all works fine, I get a nice clear lag free feed. But after .5-2hrs the feed will hang.
On the windows machine, if I close the stream and try to reopen it I will not get anything displayed and additionally there is no network traffic from the PI.
On the PI if I use ctrl-c
to end the process and restart it. It will begin displaying on the windows machine immediately, so obviously something has stopped working on the PI.
On the raspi if I use -vvvv
for verbose output, I can see the following errors:
Error sending message: Network is unreachable
followed by
gstmultiudpsink.c(602): gst_multiudpsink_render (): /GstPipeline:pipeline0/GstUDPSink:udpsink0:*
The Pi definitely sees the network though! I can ping my pc (10.1.2.80
) and my gateway (10.1.2.1
) from the Pi, and from my PC I can ping the Pi. Likewise, the Putty shell does not terminate and I can give commands to the Pi just fine. what is going on??
I'd like to get it so that the stream doesn't hang and I can run it continuously. I could probably do this by just having a cron job to restart the Pi every half hour, and then bring the stream back up upon reboot. But I'd rather address the issue, not work around it. I'm just not linux savvy enough to know where to begin, and I've run out of Google links.