Servers by jDrones

Video overlay, UDP and TCP data crashes MP

(Anthony) #1

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.

(Michael Oborne) #2

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

ie details on the crash if you can

(Anthony) #3

My setup is as follows:

Pixhawk 2.1
Raspberry Pi 3, b+ running Raspbian and Picam
Uavcast-Pro from
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.

(Michael Oborne) #4

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.

(Michael Oborne) #5

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.

(Anthony) #6

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.

(Michael Oborne) #7

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

(Michael Oborne) #8

ok after a quick look.

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

(Bernt Christian Egeland) #9

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

(Michael Oborne) #10

the latest beta should resolve the crashing issue

(Jimothy McDoogle) #11

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= 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:, time stamp: 0xaae5adf6
Faulting module name: unknown, version:, 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:

(Jimothy McDoogle) #12

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.

(Michael Oborne) #13

yep, try the beta.

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

(Jimothy McDoogle) #14

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!

(Michael Oborne) #15

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

(Jimothy McDoogle) #16

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.

(Bernt Christian Egeland) #17

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

//Bernt Christian Egeland