This blog is a continuation of my previous post.
How to build a High-Definition FPV UAV using a Rasperry PI with HD camera, using a high speed WiFi link
This post will discuss how to use GStreamer and Mission Planner together to display the HD video with a HUD (Head-Up-Display).
Note: I have only tested this feature on Windows so the instructions given here are for Windows only.
To give proper credit, the HUD created here was borrowed from APM Planner, a Qt-Based app similar to Mission Planner. The HUD part was created from the Qt codebase QML HUD created by Bill Bonney who is on the APM Planner development team. To make the HUD work with the background video, I used a GStreamer library called "QtGStreamer" which integrates GStreamer plugins with painting on a Qt widget. This library is available on the GStreamer website.
The end-result is dynamically added to Mission Planner using the plug-in architecture.
In the previous posts I discussed used a Raspberry PI and a High-speed WiFi link using GStreamer on the PI and the ground station PC. To get the HUD to work, you need to already have a successful link with the video on your ground station.
Here are the steps to follow to install the plugin:
1) Install Mission Planner.
2) Download and install GStreamer from this link. Use the x86 version, the x86_64 version will NOT work. (Use the default path 'C:\GStreamer' when installing). When installing GStreamer, select 'Custom' install and select ALL plugins to be installed.
3) Follow the steps in the previous blog noted above to get your video stream working.
4) Download and the MSI installer from this link. and run the installer.
If all went well, you should have the plugin installed.
Open Mission Planner and navigate to the "Flight Data" page and right-click on the map. You should see a menu item called "GStreamer HUD" as shown below:
Select this menu item and the following screen should appear:
In the upper-left corner is a context menu. Here is where you enter your GStreamer Pipeline string. If you had the video displaying without the HUD using a valid pipeline, enter it here.
Note: The GStreamer Pipeline string should be exactly the same as the string you used before, but WITHOUT the final video sink element. The video sink is the QtGStreamer element which will be added automatically by the plugin. The GStreamer pipe should therefore be the same, except remove the last element for the video sink.
Here is an example string I used on my setup:
udpsrc port=9000 buffer-size=60000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! queue ! avdec_h264
If all is well, you can connect to your UAV and see the HUD elements moving. To change the HUD, right click on the display and select which elements you want to display. The default is to display everything shown here.
If anybody has problems, please post back and I'll update the blog in case I missed something, and you cannot get it to work.
Happy Flying!
Comments
What is the hidden window behind your command line window
Still no luck. I uninstalled and re installed both Qt HUD and Gstreamer.
G-streamer will work great but the HUD is not connecting or starting a pipeline. Here is another message and in this case I have Gstreamer and Qt HUD running.
I recall had a similar error when I had both the early plug-i version and the standalone version on my laptop, and they were competing. So, I removed both versions and re-installed the latest standalone. I would try that.
Hi Robert, Yes I did go through the blog and looked at that thread. I made no changes to my system and it was working perfectly before so that did not seem to be applicable. I also don't see a specific solution proposed othetr than uninstall and reinstall gstreamer on the GCS laptop.
See the earlier similar Comment by Steve on April 11, 2015 at 11:10am regarding this error message
I have had a setback. I was called away for two weeks and when I tried to run QT HUD I get this.
Mission planner works fine.
I can still get the telemetry and the Gstreamer works independently and will display the telemetry just no video on the HUD.
Any thoughts?
I recommend that rather than using the plugin version, that you instead install and use Patrick's standalone version as he recommends and supports. It is an excellent GStreamer HUD option.
Hi,
i've installed the plugin on Mission planner 1.3.41 and do not see the GStreamer HUD option, Should it work with this version of Mission Planner?
Thanks for help
Per the gstreamer wiki's, the correct string to use for H264 streaming (to input and run on the client GCS pc) is to copy and insert the verbose output that is displayed at the server side (the entire caps string in the verbose output obtained from running gstreamer on the Pi server see the link from TI below). You copy the entire caps string after GstPad:sink from the Pi output and insert into your GCS command line caps = "
http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines...
See:
H.264 RTP Streaming
This section gives example where EVM acts as streaming server, which captures, encodes and transmit via udp. Host PC can be used as client to decode.
H.264 Encode/Stream/Decode A simple RTP server to encode and transmit H.264.
When the pipeline starts to run, you'll see something that looks like this:
Make a note of caps="application/x-rtp, media=(string)video ................" string and pass this string in client below
A simple RTP client to decodes H.264 and display on HOST machine
@Robert,
So you are suggesting that I add this to the code that starts G-Streamer on the Navio? What would the entire code be to start it?