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

  • @Mike Knott,  here's another link.  Apparently when you upload again, even with the same name, the link changes.

    https://www.dropbox.com/s/ssfxi5kwh93c0iu/GStreamerHUD.msi?dl=0

    GStreamerHUD.msi
    Shared with Dropbox
  • The dropbox link appears to be broken. Could you re-upload it?

  • Another tip on connecting your Android  device in the field to the video/telemetry.   If you are using a laptop PC with Windows 7 or Windows 8 for your GCS, you can create a 'Wireless Hotspot' and connect your phone/tablet to the laptop, with 'ICS' (internet connection sharing).  

    To enable the hotspot, use these commands in "administrator" mode in a cmd window:

    netsh wlan set hostednetwork mode=allow ssid=YourVirtualNetworkName key=YourNetworkPassword

    Start the Wireless Hosted Network:

    netsh wlan start hostednetwork

    Then on your LAN adapter that is connected to your Rocket M5, enable ICS (right click, properties, sharing tab, enable).   

    You should be able to connect your phone to your laptop by a wifi connection with the name you picked for 'ssid'.  Also, you may want to use a static IP address for your device so you can create the gstreamer pipe without having to constantly lookup the device's IP address. 

    To get the telemetry going to multiple places, I used this string for MavProxy:

    mavproxy --master=COM2,115200 --out=192.168.137.3:14550 --out=127.0.0.1:14550 --out=127.0.0.1:14551


    COM2 is actually a virtual serial port on my machine, which connects to the Rasperry PI on my UAV via TCP.   If you are using UDP on your remote, you can connect directly with MavProxy without the virtual serial port.

    My Nexus 6 phone is at IP address 192.168.137.3, and the local machine running Mission Planner will connect to port 14551, and the stand-alone version of the HUD will connect to port 14550.   If you are using the Mission Planner version of the HUD, you only need one local connection.

    Then in the HUD, I use this string to get the video on both the GCS and the phone at the same time:

    udpsrc port=9000  buffer-size=60000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! tee name=split ! queue ! avdec_h264 split. ! queue ! h264parse config-interval=1 ! rtph264pay config-interval=1 ! udpsink host= 192.168.137.3 port=9000

    Fortunately, you only have to set this up once, but it works!

  • @bocorps, if you are using the Mission planner version, the HUD gets everything from the same link as MP, so it would appear that MP is somehow losing the connection.  If you are using UDP port 14550 you should leave the 'connect' field blank as the HUD will always listen on that port.  

    If the video link is ok, it's weird that you would lose telemetry. Did you check all your connections for lose wires?

  • @Patrick, yes, for telemetry i use same setting as in MP : UDP and port 14550. Should i type something in MAV Connect or we leave it blank ? 

    Besides, i did some flight test last week (with the version that need MP), video was all good in 48fps until 300m, i didn't go any further right now. I noticed that when i loss telemetry, it is permanent and will not reconnect; strangely telemetry freeze sometimes but video remains perfect.

  • @bocorps.  Your phone is too slow for video.  My nexus 6 can do 800x600 without any pixelation, and I have a tablet that also works pretty good. 

    To change the port, you have to edit the string, then hit "Enter" on the keyboard (or Accept on Android)  to make the control add it to the list. Otherwise it forgets your changes.   

    Are you sending telemetery to port 14550 on the phone?  Not sure why your telemetry isn't working, but if you are getting video, it should work if you are sending data to the right port.

  • i can finally get video stream but even when i decrease resolution to 800x600 and framerate to 30fps, my phone cannot follow. Likely because cpu is a nvdia Tegra.One thing : For telemetry it still doesn't work.

    @Patrick, one note : to make it work i had to modify raspivid to stream to port 9000 because when i try another one in pipeline string it doesn't work, on the app side it always go back to port 9000

  • @Patrick, i can connect my phone to the nano M5 using a static IP but right now neither video nor hud through application. I have let M5 in bridge mode, perhaps it is from that ?

  • FYI, a tip for streaming the video to your phone is to use a standard WiFi router connected to your GCS, and then connect any device to the WiFi router. An example gstreamer pipeline, you can split the stream and send it to your phone, or even multi-cast the stream. Here is a sample pipeline I used to send the video to both the GCS and my phone.

    udpsrc port=9000  buffer-size=60000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! tee name=record ! queue ! avdec_h264 ! video/x-raw, format=I420 ! d3dvideosink sync=false record. ! queue ! h264parse config-interval=1 ! rtph264pay config-interval=1 ! udpsink host= 192.168.0.143 port=9000

    The phone is at IP address 192.168.0.143.   You can configure your phone to have a static IP if you don't want to constantly edit the pipeline.

  • @bocorps,  one note about connecting the phone to the M5.  Your phone needs to have Wireless-N dual-band, which most phones don't.  I am using an Android tablet PC that has 5ghz wireless, so my last post may not work for you unless your phone has dual-band ability.

This reply was deleted.