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!
Comments
looks great, (but not the price :)
@benbojangles, I use an AmpedWireless ACA1 (500mW) dongle, and also a similar dongle made by Netis which also has a 500mW output. Both work very well. On the ground station, I use a Ubiquity NanoBeam (5.8ghz high gain dish), mounted to a tracker.
Ubiquiti USB
The obvious reason is to avoid interference with the 2.4 RC
I have one of those https://www.msdist.co.uk/product_Ubiquiti-WispStation-M5.php and they work well.
Please do you have a link for "Ubiquiti USB dongles" ?
Hi, advice on Ubiquiti modules, Is there any reason why I should choose 2.4ghz or 5.8ghz? Is it just for managing signal conflict between other radio gear?
Also, what's the preferred module for a drone? I have seen Ubiquiti USB dongles, but I am also interested in the Mini pcie module (and add a nice leg/arm mounted antenna pair) that might be possible to modify for connection. I have also seen some cheap dual 3.4/5.8 usb dongles but not sure if they have the 300mw+ power of ubiquiti.
Anyway thanks for helping. I have been looking into 4G fpv too, but the lag is greater than UDP over wifi.
@Antonio, Thanks for the info.
I have a blog here that describes how to setup the RPi with a GoPro over wifi on your UAV with an RPi. Currently, I have a Python script that is either setup in camera mode or video mode, but you could easily modify it to monitor a GPIO to switch between the two. I am using switches on the RC radio to control when a picture is taken, or when the video starts, or the auto-camera trigger from the APM based on the UAV movement.
So far, I have not had any problems with the WiFi dongle at 2.4ghz connected to the GoPro, and the RC radio also running at 2.4ghz. The second dongle is 5.8ghz which is connected to the GCS (Ubiquity Nanobeam high gain dish mounted to a tracker). The second dongle also sends telemetry from the APM via the APM serial port connected to the RPi serial port with the data forwarded to the GCS via a socket connection. I have flown my quad copter to over 2 miles from my GCS with this link and never lost either the video or the RC control over the copter, and the GoPro. There is really no risk to using the dongle to connect to the GoPro that I have found. Since the RC radio channel hops, it just avoids the WiFi channel because it's only inches away. Seems like it could interfere, but my experience is that it just works - thanks to the engineers that designed the DSMX protocol. It's very robust.
I forgot to mention two things:
Hi, with SJ4000WiFi I hope I can implement the same (refer here)
Actually what I'd like to do is to control the cam from RC connecting two channels of the RX to RPi GPIO (and not to FC shooter) running a python script that can read PWM so that with one channel I can switch between video mode and phone mode and with other channel I can take pictures when in photo mode) or start and stop recording (when in video mode).
I do not want to control the cam from mobile/GCS because there is high risk that WiFi (2.4GHz band) could interfere with RX.
Which WiFi 5.8GHz (I guess one dongle for 2.4GHz and one dongle zc for 5.8GHz) are you using with RPi and how have you configured your RPi?
As second option, instead of SJ4000WiFi I'd like to use RPi camera to have HD streaming to GCS, but at the time being this project is on hold waiting to finalize the first one :-)
#Base URL
http://192.168.1.254
File Management Panel
GET / file management panel
Configuration options
all options follow the template:
/?custom=1&cmd={Command}&par={Option}
Command - setting/mode of the device Option - usually 0/1, but when more settings are supported theres a few more numbers for different menu itemsWARNING: Thee settings don't seem to take effect until you either start recording, or you turn the camera on/off.
Recording
Other options
More info:
@Antonio, I am not familiar with the SJ4000, but the GoPro can be controlled over HTTP, and to control it from the GCS you just need to forward port 80 (and 8080 if you want the video preview), and you can control it with HTTP from the ground. There are a number of programs available that work. You can also control the camera from your RC radio if you use a GPIO port on the RPi and connect it to the APM digital output. You can then run a Python script that monitors the GPIO port and send HTTP commands to the camera. I have a 5.8ghz wifi connection to the UAV, and a second WiFi dongle that is standard WiFI connected to the GoPro. It really works well. I am wondering if you can do the same thing with the SJ4000.
Can you share the info on that proprietary app that you use to view the H264 stream from the SJ4000? I would be interested to see how they are encoding the stream over the network. It's probably something I could get to work using GStreamer.
My project aims to command sj cam from radio tx so that I can start recording (and stop) or take picture when I want