Video Pipeline for streaming into HUD windows

Ground Stations and utilities for Windows, Linux, Android, & others

Video Pipeline for streaming into HUD windows

Postby aBUGSworstnightmare » Tue Apr 05, 2016 7:05 am

Cheers guys!

How do I specify the pipeline for streaming video into the HUD window? I can only right-click on the HUD and select 'Enable video live feed' from the menu. Don't think that the is sufficient since I also need to specify where the video is coming from (pipeline).

Joerg
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Video Pipeline for streaming into HUD windows

Postby Max » Tue Apr 05, 2016 8:14 am

Jörg, I'm pretty sure that option does nothing (at least with video). I see some code in the HUD to get images via Mavlink and display/save them. But nothing about video except in the name of that menu item. I should probably get rid of that menu altogether... it's one of the remnants from the original QGC, which had quite a number of unfinished or unusable "features" when I started with it. Still finding some new ones 3 years later... :roll:

From a quick look in the code, I think the intention (at some point) was to have a separate widget for video... the class is called QGCRGBDView and I see some code in there that Peter had added to display video with VLC. The code is still included but the video widgets are commented out in MainWindow.cc:690. I don't know if Peter got anywhere further with video in QGC.

Safe to say that right now there's no video display capability in QGC until someone adds/fixes it. Perhaps they came up with something useful at the original QGC project which could be brought over. I personally don't have any plans or time to work on this, but I'd certainly be open to some well-implemented solution that anyone comes up with.

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: Video Pipeline for streaming into HUD windows

Postby sandmen » Tue Apr 05, 2016 8:38 am

Jörg,
yes, I added the vlc as a video display with overlayed HUD...
A long time ago.. and, If I remember correct, it was only on Windows.
But, with some small changes it should also work on a Linux system.

Currently, I'm not sure, that Max's repo contains the latest source, or any changes from me....
Peter
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: Video Pipeline for streaming into HUD windows

Postby aBUGSworstnightmare » Tue Apr 05, 2016 12:29 pm

Well, a simple 'video window' should be quite simple afik; I'm using mplayer2 for this (need to compile vlc with HW acceleration support first on the PI :lol: ).

I'm silmply using a shell script for starting live video capturing[name].sh
The contents of the shell script for this is simply:
Code: Select all
mplayer tv:// -tv device=/dev/video0


Maybe not the most elegant one but it's working (you can see it in my video).

I'm starting this from the desktop simply like
'shark.desktop'
Code: Select all
[Desktop Entry]
 Name=LiveFeed
 Comment=Start image capturing
 Icon=/home/pi/QGC_V1_7Beta/shark_logo.png
 Exec=/home/pi/QGC_V1_7Beta/start_capture.sh
 Type=Application
 Terminal=false
 Categories=None;


2016-04-05-112024_169x357_scrot.png
Nice (fat)shark logo will start live video shell script
2016-04-05-112024_169x357_scrot.png (17.29 KiB) Viewed 1961 times


Pulled original qgroundcontrol from git; it contains VideoStreaming support. Can't build it on the Pi since my QT is 5.3.2 but it reqzuires Qt5.5+.
Last edited by aBUGSworstnightmare on Tue Apr 05, 2016 6:28 pm, edited 1 time in total.
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Video Pipeline for streaming into HUD windows

Postby aBUGSworstnightmare » Tue Apr 05, 2016 12:40 pm

sandmen wrote:Jörg,
yes, I added the vlc as a video display with overlayed HUD...
A long time ago.. and, If I remember correct, it was only on Windows.
But, with some small changes it should also work on a Linux system.

Currently, I'm not sure, that Max's repo contains the latest source, or any changes from me....
Peter


I would love to see this! That's what I was trying to do (HUD over live video).

Seems there is something missing from the sources; video1DockWidget, video2DockWiget and rgbd1DockWidget were not declared in this scope; looks like a mising header i.e.
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Video Pipeline for streaming into HUD windows

Postby aBUGSworstnightmare » Wed Apr 20, 2016 3:26 pm

sandmen wrote:Jörg,
yes, I added the vlc as a video display with overlayed HUD...
A long time ago.. and, If I remember correct, it was only on Windows.
But, with some small changes it should also work on a Linux system.

Currently, I'm not sure, that Max's repo contains the latest source, or any changes from me....
Peter


Hi Peter,
made some changes to the code (uncomment some lines and add some to the Linux config) and could compile successfully. Both video widgets could be opened. Do you remember if VLC can be selected for both of them as input source? HUD can be enabled on both: but one of them resulted in crash of QGC when I tried to use VLC.
Maybe this is related to the fact that I forgot - ONCE MORE - to remove all vlc related packages BEFORE compiling a hardware accelerated version from source :oops: .
I think it should be fine to enable just one, right?

Thanks for your feedback!
Joerg
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Video Pipeline for streaming into HUD windows

Postby sandmen » Wed Apr 20, 2016 9:14 pm

no, I didn't know, if you can use both video widgets.
During my "test" time, I enabled only one in qgc, so only this one was available.
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: Video Pipeline for streaming into HUD windows

Postby aBUGSworstnightmare » Fri Apr 22, 2016 12:58 pm

hi Peter,

was able to compile it but still can't get any video display in the videowidgets. Looks like only video2widgets is somehow related to vlc. When enebaled the 'open' button opens a browser window and allows to select a vido file, but once 'Play' is clicked nothing happens.
2016-04-21-172858_1280x1024_scrot.png


'Enable Video Live Feed' shows also no result.

Vlc is working fine (open capture device to let is display the video from the frame grabber) though.

Any idea what to look for? Did I miss to uncomment something in the sources? How to configure VLC to make the video show up in the videowidget?

Thanks
Jörg
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm


Return to AQ Software

Who is online

Users browsing this forum: No registered users and 2 guests