UDP video stream in MP HUD?

Same issue here, video works perfect in QGC, nothing in MP. Have tried several different known working streams with no luck. Was getting a pop up video detected, install gstreamer 1.9.2 which I have done (complete install) still nothing.

Also tried the stock stream from APSync http://ardupilot.org/dev/docs/apsync-intro.html#apsync-intro same issue. The stream seems to start automatically when mavproxy.py is started. Also tried a Logitech C920, again works on QGC but not MP.

My slightly tweaked stream from the Pi camera

raspivid -n -fl -w 1280 -h 720 -b 10000000 -fps 30 -t 0 -rot 270 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=10.0.1.25 port=5600

Dan what does the -fl command do ?

is missionplanner and gstreamer allowed though your firewall? everything I’m seeing suggests it should work

i just double checked, and worked as I expected
start the pi


open MP
and it starts

in the MP console windows I see

INFO MissionPlanner.Utilities.GStreamer - .cctor
INFO MissionPlanner.Utilities.GStreamer - Found gstreamer F:\gstreamer\1.0\x86\bin\gst-launch-1.0.exe
INFO MissionPlanner.Utilities.GStreamer - Starting F:\gstreamer\1.0\x86\bin\gst-launch-1.0.exe -v udpsrc port=5600 buffer-size=300000 ! application/x-rtp ! rtph264depay ! avdec_h264 ! queue leaky=2 ! avenc_mjpeg ! queue leaky=2 ! tcpserversink host=127.0.0.1 port=1235 sync=false
INFO MissionPlanner.Utilities.GStreamer - _Start
INFO MissionPlanner.Utilities.GStreamer - Setting pipeline to PAUSED …
INFO MissionPlanner.MainV2 - Loaded 4825 airports
INFO MissionPlanner.Utilities.GStreamer - Pipeline is live and does not need PREROLL …
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0: current-port = 1235
INFO MissionPlanner.Utilities.GStreamer - Setting pipeline to PLAYING …
INFO MissionPlanner.Utilities.GStreamer - New clock: GstSystemClock
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)01640028ffe1000e27640028ac2b402802dd00f1226a01000528ee025cb0, level=(string)4, profile=(string)high
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)01640028ffe1000e27640028ac2b402802dd00f1226a01000528ee025cb0, level=(string)4, profile=(string)high
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/avenc_mjpeg:avenc_mjpeg0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
INFO MissionPlanner.Utilities.GStreamer - Redistribute latency…
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/avenc_mjpeg:avenc_mjpeg0.GstPad:src: caps = image/jpeg, parsed=(boolean)true, width=(int)1280, height=(int)720, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = image/jpeg, parsed=(boolean)true, width=(int)1280, height=(int)720, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = image/jpeg, parsed=(boolean)true, width=(int)1280, height=(int)720, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1
INFO MissionPlanner.Utilities.GStreamer - /GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0.GstPad:sink: caps = image/jpeg, parsed=(boolean)true, width=(int)1280, height=(int)720, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1

and all is good

I have a similar problem. On some pc everything works properly, on others in the HUD hangs on the first frame.
Do you have any suggestions?

Same problem here on latest beta. On some PC it works, on others it hangs on first frame.

Corrado

the hud hanging is normally an opengl issue with the pc. update your graphics card drivers from the vendor

Updated my drivers on latest release still didn’t fix the problem. Still hanging on first frame.

Video card: Nvidia GeForce GTX 1060 6GB

regards,

Corrado

Helllo,

I have the same problem with the latest mission planner hud hanging after the first frame from gstreamer (raspberry pi default version).

I tried to stream both the videotest with the bouncing ball and the raspberry pi camera feed.

Also tried with two different computers that both have the latest drivers for their respective hardware.

Please note that the feed works ok when I grab it from the target computer gstreamer or QGC.

Best regards,
Tasos Sangiotis

what version of gstreamer are you using?

On the host computer (the one equipped with mission planner) I was using
the latest stable gstreamer.

Just tried with gstreamer 1.9.2 as suggested above and it works fine. Sorry
for the inconvenience.

1 Like

I am trying to use just a GoPro hero 4 silver edition to stream into the HUD of mission planner using gstreamer. I have no luck yet. Anyone done this before?

I will investergate getting a newer version working.

Have a similar problem. Using Telestream Wirecast to receive FPV via multiple cellular networks (720p25 @ 150ms latency). Wirecast creates a VirtualCamera-Output; works fine with QGroundControl. MP 1.3.47 was the latest working version for me.

can you give me more info on whats its actually sending?

Sry Michael for coming back late … RTP / 720p25 / h.264 /5600
hope that´s the info you´d asking for …

solved: happy to announce that my LiveFeed via Wirecast is working again with MP x.55 :hugs:

@Michael_Oborne & @peterbarker

I am using Raspberry Pi 4 (4G RAM) as companion computer to Pixhawk and able to connect to MP on TCP over Internet (via public cloud bypassing telecomm NAT)…all 4G/Cellular!.

Now, I am able to do Live streaming via running ffmpeg (on RPI4) over Youtube and same can be stream to VLC (Network Stream) on my desktop where MP is running.

Question: Any idea how can I direct ffmpeg streaming from RPI4 (on my quad) to MP’s gstreamer Port 5600 on my desktop PC?. **Note: I am using Debian instead of APSync (want to use 4G instead of WiFi)

Hello @Michael_Oborne: Yes , I am getting now UDP stream , following is step-by-step…
1/ both MP (on my windows desktop PC) and RPI4 (on quad) is on same WiFi LAN.
2/ same command executed in RPI4 , except usdpsink host is my windows IP (from same wifi lan)


3/ open MP -->Connect to Pixhawk (COM3 etc.) --> Ctrl+F–>press “gstream” ==>> this will install Gstreamer in C:\ProgramData\Mission Planner\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe
3/ restart MP (do not take any action, like pressing connect etc.). You will see video in HUD Area . see MP console logs MP_console_log_20191128_A.txt (15.4 KB)
… you can see line number 148 where gst-launch is getting executed.

Question: How can i rotate video in HUD and enable telemetry data?

1 Like

can you test from a command line
C:\ProgramData\Mission Planner\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe “udpsrc port=5600 buffer-size=90000 ! application/x-rtp ! rtph264depay ! avdec_h264 ! queue leaky=2 ! autovideosink”
and confirm that this runs?