GStreamer

I followed the doc to setup video streaming. I don’t seem to get any errors but I don’t get a window showing the video stream.

I did the following:

  1. Get latest EMLID raspian image
  2. Expand filesystem and enable camera (sudo raspi-config) & reboot Raspberry Pi
  3. On PC install GStreamer and then launch it
    gst-launch-1.0 -v udpsrc port=9000 caps=“application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264” ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=f
  4. Launch GStreamer on Raspberry Pi
    raspivid -n -w 1280 -h 720 -b 1000000 -fps 15 -t 0 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=192.168.43.189 port=9000

IP Address is of my PC that is running GStreamer

What I get on Raspberry Pi:

What I get on Windows PC:

No other windows appears showing the video stream.

Any ideas?

Thanks in advance for you help.

Can you post the gstreamer pipe you are using

Hi Vic,

I will try to assemble the same setup with camera as you have and test if I get the same issue. As soon as I succeed I’ll come back with a feedback to you.

Hi Vic,

I’ve noticed you haven’t mentioned any GCS that you are using.

You’ve done everything right. However, for the video stream to PC, you need ground control system (eg Mission Planner, QGroundControl) or any media player that supports streaming. GCS should detect your stream automatically after you launch ArduPilot and connect to it.

Please, try installing Mission Planner and getting the image there. Let me know if you encounter any complications.

I had some success. I was able to stream to a PC in the command window and inside Mission Planner.

But there is an issue doing the same (command line or Mission Planner) on my laptop. Any ideas? Is there some Windows security issue?

Here are the working gstreamer commands:

PC (in command window):

  • C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0 -v udpsrc port=5600 caps=“application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264” ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=f

Raspberry Pi:

  • raspivid -n -w 1280 -h 720 -b 1000000 -fps 15 -t 0 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=192.168.0.100 port=5600

Mission Planner (Video > Set Gstreamer Source)

  • udpsrc port=5600 caps=“application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264” ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=f ! avenc_mjpeg

One discovery - you can only have one “receiver” active (either Mission Planner or PC Command line).

More success … GStreamer works on Windows 7 laptop but still not on Windows 10 laptop. Any ideas?

BTW … earlier I had success with PC Windows 7 and 10. Only issue is with Windows 10 laptop.

Hi Vic,

This does look like a security issue with Windows 10 machine, since everything’s work fine on your other devices.

Moreover, by default ports are bound to a single application, thus making it unavailable to listen to the one same port with multiple applications on the same machine and thus to stream to them.

Try adding an exception for the port that you use for streaming to your firewall, this should help.