Video overlay, UDP and TCP data crashes MP

Due to the availability of 4G, I am slowly moving towards connecting video and data over 4G connections.

But I noticed MP crashes very easily. A few of the symptoms are:

  • A video stream with low bit rate and low FPS

It seems like MP only wants standard video 20 fps or more) with high bitrates

  • A short interruption in video or data

It looks like once MP is connected, it becomes very sensitive to short breaks, either in video or data. With the use of 4G modems, there is always a possibility of having a short interruption.

Are these known issues or can it be cured by changing settings?

I noticed that QGC doesn’t have these issues. However I am used to MP and don’t want to change.

A crash of MP, when you are flying a bit further away and having to restart and reconnect, can of course be fatal for the vehicle.

I would like to fix this, so please give me as much information as possible.

ie details on the crash if you can

1 Like

My setup is as follows:

Pixhawk 2.1
Raspberry Pi 3, b+ running Raspbian and Picam
Uavcast-Pro from Uavmatrix.com
4G modem

Mission Planner (latest version)
WiFi or 4G modem Internet access

I use VPN Zerotier to connect mission planner with the vehicle.

Uavcast give me a lot of flexibility to use UDP or TCP to connect. Normally I follow the default settings. UDP port 14550 for data, UDP port 5600 for video.

If you want, we can setup a test connection. Since using the Internet it doesn’t matter where on earth we are. You can be in Australia and I can be here at my home.

By the way, I think the crashes are caused by latency as well.

internally MP deals with the telemetry.
video is passed via gstreamer libraries.

does it crash if you don’t do the video? ie just telemetry. this will help pinpoint the underlying issue.

also if you can, a wireshark log or similar showing the data coming in would be helpful, as I should be able to replay the log this way.

Yes, I can do telemetry only and look what happens.

I cannot comply your second request. I’m a hardware guy, I have no idea how to get that log file. Software is a real mystery to me. Sorry for that.

ok, just as much info as you can about the crash then.
ie windows event viewer should show a bit. can start with that

ok after a quick look.

I bail out after 10 seconds without a valid frame, but that shouldn’t cause a crash

Hi @Michael_Oborne
As @Verloop said, MP crashes very often when using video in HUD.
Pipeline used on Raspberry Pi:
raspivid -n -w 1280 -h 720 -b 1000000 -fps 15 -t 0 -o - | gst-launch-1.0 --gst-debug-level=0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host="gcs_ip" port=5600

I will do some testing on MP later today and provide you logfiles and wireshark logs as requested.
If there is any specific files from MP you want, then please let me know.

It would be nice to get this problem sorted out.

//Bernt Christian Egeland

the latest beta should resolve the crashing issue

Hi Michael,

First post. Been using MP for a long time and want to say that I think it’s amazing!

I have this same issue, so want to explain what I can that is happening to me.

Using the latest version that I can find. Not sure if this is the beta you mention. 1.3.58 build 1.3.6794.30567

raspivid -t 999999 -w 1280 -h 720 -fps 10 -rot 180 -b 200000 -o - | gst-launch-1.0 -e -vvv fdsrc ! h264parse ! rtph264pay pt=96 config-interval=5 ! udpsink host=10.0.0.2 port=5600

This works great, but if the stream is interrupted, after 10 seconds, MP closes without error.

I am running Windows 10 and can see the following in Event Viewer:

====================================
Application: MissionPlanner.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 00000285C3BFFEEE

followed by:

====================================
Faulting application name: MissionPlanner.exe, version: 1.0.0.0, time stamp: 0xaae5adf6
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x00000285c3bffeee
Faulting process id: 0x2c80
Faulting application start time: 0x01d432f980af5049
Faulting application path: C:\Program Files (x86)\Mission Planner\MissionPlanner.exe
Faulting module path: unknown
Report Id: 872205b0-9955-4abf-8e3c-13320592c0d1
Faulting package full name:
Faulting package-relative application ID:

It doesn’t look like anything that special is happening when the video stream ends (which I am simulating by just ending the process on the Pi). Just the UDP packets stop coming in.

yep, try the beta.

given it waits 10 seconds then just dies, I know what the problem is, and its fixed in the beta

Whoops! Just in case anyone is as slow as me, you can download the latest beta within MP, as opposed to downloading it from the download site.

I have tested this out and it works perfectly!

I have tested killing the stream for 30 seconds or so, MP remains good, then starting the stream again and MP picks up right where it left off!

Thank you very much for your exceptional work, sir!

ive change the timeout to 60 seconds.

so if the video comes back within 60 seconds you are ok.

if it doesn’t the hud will return as normal

That works. If I kill the stream for 60 seconds, it reverts back to the standard HUD. If I then start up the stream again, it does not appear to switch back to the stream though. Is that possible?

I can definitely work with this as it is. Awesome!

Thanks again.

@Michael_Oborne I can confirm that the latest Beta works.
Thank you for this fix. Much appreciated.

//Bernt Christian Egeland

Hi Michael. I done some extensive testing over the past few days and can confirm it is working as you mention.

Only 1 thing is a bit strange. As somebody already mentioned, if after a 60 seconds break the video comes back, it will not be displayed anymore.

I sometimes have to restart the vehicle and it takes certainly longer than 60 seconds before everything is up and running again.

However, this implies that I also have to restart Mission Planner.

Even worse, if I am in a mission, and there is an area without 4G coverage, signal and video will be gone for a while and if it is longer than 60 seconds, video will never come back.

That would mean I have to restart Mission Planner during flight…!

Can you change that?

Try right clicking on hud and restart video. You shouldn’t need restart MP