3689637759?profile=original

This is a new Android App for running a Heads Up Display on a SmartPhone or table computer or Windows. It's available on the Google Play store at https://play.google.com/store/apps/details?id=org.qtproject.qtgstreamer

If you want to side-load, I have posted a free version on dropbox at https://www.dropbox.com/s/g38tv79z3ey8yks/QtGStreamerHUD.apk?dl=0

There is also a windows version available at https://www.dropbox.com/s/km52szl7ghdo15a/GStreamerHUDApp.msi?dl=0

This app will overlay the HUD on a video stream using GStreamer, or you can run the app without video with a normal HUD.  

The App will automatically listen for a MAV-Link data stream on UDP port 14550, the default UDP port for MAV-Link. You can also configure the app to use TCP, and on windows you can connect directly to a serial port. 

If you want to display data on a ground station PC and the App at the same time, you can use MavProxy to split the UDP stream, and then connect to your UAV using Mission Planner. 

Here is a sample command that I use to split the data stream with MavProxy:

mavproxy --master=COM5,115200 --out=192.168.0.1:14550 --out=192.168.0.126:14550

The ground station PC is at 192.168.0.1, and the SmartPhone is at 192.168.0.126 (on my wifi network).  You will have to configure the IP address according to your own WiFi network. My WiFi network in the field is a Ubiquity Rocket M5 configured as an access point, and a second M5 is on the UAV, so I can get live video from the UAV over the same network that connects the smartphone. 

For the windows version, you can run the HUD on the same PC as MissionPlanner (or APM Planner), and use MavProxy with a different UDP port for the HUD.  

If you want to use the video overlay, you will need to have a valid gstreamer data stream running, either over UDP or TCP.  For my setup, I am using a Raspberry PI streaming H264 over UDP using this command on the PI:

raspivid  -t 0 -w 1280 -h 720 -fps 40 -b 4000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse config-interval=1 ! rtph264pay ! udpsink host= $1 port=9000

The "$1" argument is the IP address of your GCS or SmartPhone/Tablet PC.   This command is for 720p, but you should consider the resolution of the device and adjust accordingly.  It makes no sense to send a 720p video to a phone with a 800x600 display.

In the HUD, configure the gstreamer pipeline with this string:

udpsrc port=9000  buffer-size=60000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! queue ! avdec_h264

Do not include a video sink element, as the App will add this dynamically.  You can change the port to whatever you wish as long as your PCs do not have a firewall blocking the port.

Another thing to consider is the processing power of your device. If you see a lot of pixelation, your device is too slow, so you will need to change the resolution of the transmission and/or the bitrate. Some smartphones are just too slow to display the video at full resolution. I have tested 720p on my Google Nexus 6 and it works fine, but on a cheap tablet PC, I had to slow it down and switch to 800x600.  

The App is easy to setup, however if you have any questions or issues, please send me feedback.

Happy Flying!

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • @Antonio,  does that SJ4000 camera stream H264 over the wifi connection?  I have a GoPro camera setup to stream to an RPi, over a local WiFI connection, and the stream is sent to my GCS over a 2nd 5.8Ghz link using the RPI as a proxy and it works fine, but the latency is poor.  It's good for monitoring what the GoPro is seeing, but not for FPV.  It would be nice to get a lower-latency camera. 

  • the idea not to have fixed IP is that in this way I have the possibility to use whatever GCS I can (e.g. mobile, tablet, PC, etc.) and any connetion (e.g. WiFi of mobile 3G/LTE)... up to now I tested only WiFi and TCP and UDP, I'll make some new tests following your seggestions when I have time... :-)

    and let you now... in the meanwhile I'm finalizing an other project using SJ400WiFi cam connected to RPi

  • Phew. Finally got the chance to try this out, been so busy. Anyway here's a test video:

    For my tablet (not a high spec one) I used these settings on the Pi2 (Jessie):

    raspivid -t 0 -w 480 -h 320 -fps 30 -b 1700000 -o - | gst-launch-1.0 -v fdsrc ! h264parse config-interval=1 ! rtph264pay ! udpsink host = port= 9000

    I heard that Tower 3.2.1 beta 1 allows a custom video stream, but I am yet to try it. It's going to be cool if it works.

  • @Antonio, another way to accomplish what you want is to split the stream on the GCS. I use a static IP address that receives the UDP stream from the UAV, and then a TCP server on the GCS that any client can connect to.  I can then connect my phone or table to the GCS server without any knowledge of the UAV's configuration.  

  • Developer

    @Antonio. you need a server on the RPi that listens for connections. One solution is to run a WebRTC gateway on the RPi. you can do this using uv4l. see http://www.linux-projects.org/modules/sections/index.php?op=viewart... the video can vibe streamed to a web browser.

    Another solution is to create a small piece of code that listens on a UDP port, when data is sent to that port (or the data could be a 'command' start the gstreamer pipeline with the ip being that of the sender.

    http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=14
  • @Antonio, if you use UDP, you have to specify the IP address of the target. With TCP you can connect to the stream from an unknown client. TCP will have issues if you drop the connection though. If you do not know the IP address of the client at startup, it's possible to create a service that could remotely start the stream based on an RPC call or something similar, but I have never tried such a scheme because I set the IP address of my ground station to have a static IP.

  • Patrick, very good job.

    One question on gstreamer: is it possible to stream from drone (e.g. from RPi) via udp (or tcp??) without defining the IP address of the far side where to send the stream?

    thanks

  • perfect, thank you very much
  • @Joaquin, I'll post something soon that will have the alarm messages included. Currently it only shows critical messages. I am adding some customization functions for the next release in about 2 weeks.

  • Patrick fantastic job an update on the Windows application? I would like to set the level of alarm and other messages from the flight controller and new mind thanks good job
This reply was deleted.