1

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.

1

So the issue turned out to be network managers network scanning behavior, by adding the BSSID (which is the MAC address of your router) into the network {} block within my /etc/wpa_supplicant/wpa_supplicant.conf.

network {
    SSID="Blah"
    BSSID=aa:bb:cc:dd:ee:ff
    # other stuff
}

I investigated this because I noticed that my pings between the PI and PC would regularly spike above 200-300ms. Once I added the BSSID into my config to disable the behavior I've had consistent (and much more stable) video streaming. I'll report back if it happens again, but thus far it's ran for over 24hrs without crashing.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.