mavlink / qgroundcontrol

Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
http://qgroundcontrol.io
3.22k stars 3.56k forks source link

apt-get install gstreamer1.0* is not working on 16.04 #4303

Closed ghost closed 6 years ago

ghost commented 7 years ago

On a ubuntu 16.04 64bit system the

sudo apt-get install gstreamer1.0*

will fail because there is a i386 dependency somewhere. and even after installing all the packages by hand the libgstreamer-plugins* dev packages for the gstreamer-video-1.0 are missing

PKGCONFIG += gstreamer-1.0 gstreamer-video-1.0

this needs libgstreamer-plugins* packages. do not know which one exactly - you guys will figure it out. will be one of the dev packages. edit:

[qgcTesting] root [/home/user]# uname -r 4.4.0-31-generic [qgcTesting] root [/home/user]# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial [qgcTesting] root [/home/user]#


[qgcTesting] root [/home/user/videoApp_public]# apt-get install gstreamer1.0 Reading package lists... Done Building dependency tree
Reading state information... Done Note, selecting 'gstreamer1.0-plugins-ugly-amr' for glob 'gstreamer1.0
' Note, selecting 'gstreamer1.0-videosink' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-alsa' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-ugly-dbg' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-ugly-doc' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-base-apps' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-hybris:i386' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-tools' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-good' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-qapt' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-espeak' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-nice' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-videosource' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-crystalhd' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-fluendo-mp3' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-bad' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-base' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-audiosource' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-bad-videoparsers' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-really-bad' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-clutter' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-pulseaudio' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-pocketsphinx' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-bad-dbg' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-bad-doc' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-visualization' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-bad-faad' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-lame' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-x' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-vaapi-doc' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-libav' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-base-dbg' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-good-dbg' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-base-doc' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-good-doc' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-dvswitch' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-clutter-3.0' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-vaapi' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-libav-dbg' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-packagekit' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-ffmpeg' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-plugins-ugly' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-doc' for glob 'gstreamer1.0' Note, selecting 'gstreamer1.0-audiosink' for glob 'gstreamer1.0*' gstreamer1.0-clutter-3.0 is already the newest version (3.0.18-1). gstreamer1.0-clutter-3.0 set to manually installed. gstreamer1.0-fluendo-mp3 is already the newest version (0.10.32.debian-1). gstreamer1.0-fluendo-mp3 set to manually installed. gstreamer1.0-alsa is already the newest version (1.8.2-1ubuntu0.2). gstreamer1.0-alsa set to manually installed. gstreamer1.0-doc is already the newest version (1.8.2-1~ubuntu1). gstreamer1.0-doc set to manually installed. gstreamer1.0-plugins-base is already the newest version (1.8.2-1ubuntu0.2). gstreamer1.0-plugins-base-apps is already the newest version (1.8.2-1ubuntu0.2). gstreamer1.0-plugins-base-dbg is already the newest version (1.8.2-1ubuntu0.2). gstreamer1.0-plugins-base-doc is already the newest version (1.8.2-1ubuntu0.2). gstreamer1.0-plugins-good is already the newest version (1.8.2-1ubuntu0.3). gstreamer1.0-plugins-good-dbg is already the newest version (1.8.2-1ubuntu0.3). gstreamer1.0-plugins-good-doc is already the newest version (1.8.2-1ubuntu0.3). gstreamer1.0-pulseaudio is already the newest version (1.8.2-1ubuntu0.3). gstreamer1.0-pulseaudio set to manually installed. gstreamer1.0-tools is already the newest version (1.8.2-1~ubuntu1). gstreamer1.0-tools set to manually installed. gstreamer1.0-x is already the newest version (1.8.2-1ubuntu0.2). gstreamer1.0-x set to manually installed. gstreamer1.0-libav is already the newest version (1.8.2-1~ubuntu1). gstreamer1.0-libav set to manually installed. gstreamer1.0-plugins-bad is already the newest version (1.8.2-1ubuntu0.2). gstreamer1.0-plugins-bad-dbg is already the newest version (1.8.2-1ubuntu0.2). gstreamer1.0-plugins-bad-doc is already the newest version (1.8.2-1ubuntu0.2). gstreamer1.0-plugins-bad-faad is already the newest version (1.8.2-1ubuntu0.2). gstreamer1.0-plugins-bad-videoparsers is already the newest version (1.8.2-1ubuntu0.2). gstreamer1.0-plugins-ugly is already the newest version (1.8.2-1ubuntu0.1). gstreamer1.0-plugins-ugly-amr is already the newest version (1.8.2-1ubuntu0.1). gstreamer1.0-plugins-ugly-dbg is already the newest version (1.8.2-1ubuntu0.1). gstreamer1.0-plugins-ugly-doc is already the newest version (1.8.2-1ubuntu0.1). Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: gstreamer1.0-hybris:i386 : Depends: libmedia1:i386 but it is not going to be installed E: Unable to correct problems, you have held broken packages.


[qgcTesting] root [/home/user]# locate video.h | grep gst /usr/share/gtk-doc/html/gst-plugins-bad-libs-1.0/video.html /usr/share/gtk-doc/html/gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html /usr/share/gtk-doc/html/gst-plugins-base-libs-1.0/gstreamer-video.html /usr/share/gtk-doc/html/gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-plugin-osxvideo.html [....] [qgcTesting] root [/home/user/videoApp_public]# apt-get install libgstreamer-plugins Reading package lists... Done Building dependency tree
Reading state information... Done Note, selecting 'libgstreamer-plugins-base1.0-dev' for glob 'libgstreamer-plugins
' Note, selecting 'libgstreamer-plugins-base0.10-0' for glob 'libgstreamer-plugins' Note, selecting 'libgstreamer-plugins-base0.10-dev' for glob 'libgstreamer-plugins' Note, selecting 'libgstreamer-plugins-good1.0-dev' for glob 'libgstreamer-plugins' Note, selecting 'libgstreamer-plugins-good1.0-0' for glob 'libgstreamer-plugins' Note, selecting 'libgstreamer-plugins-base1.0-0' for glob 'libgstreamer-plugins' Note, selecting 'libgstreamer-plugins-bad1.0-dev' for glob 'libgstreamer-plugins' Note, selecting 'libgstreamer-plugins-bad1.0-0' for glob 'libgstreamer-plugins*' libgstreamer-plugins-base1.0-0 is already the newest version (1.8.2-1ubuntu0.2). libgstreamer-plugins-base1.0-0 set to manually installed. libgstreamer-plugins-good1.0-0 is already the newest version (1.8.2-1ubuntu0.3). libgstreamer-plugins-good1.0-0 set to manually installed. libgstreamer-plugins-bad1.0-0 is already the newest version (1.8.2-1ubuntu0.2). libgstreamer-plugins-bad1.0-0 set to manually installed. The following additional packages will be installed: [....] [qgcTesting] root [/home/user]# updatedb [qgcTesting] root [/home/user]# locate video.h | grep gst /usr/include/gstreamer-0.10/gst/video/video.h /usr/include/gstreamer-1.0/gst/video/video.h /usr/share/gtk-doc/html/gst-plugins-bad-libs-1.0/video.html /usr/share/gtk-doc/html/gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html /usr/share/gtk-doc/html/gst-plugins-base-libs-1.0/gstreamer-video.html /usr/share/gtk-doc/html/gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-plugin-osxvideo.html [qgcTesting] root [/home/user]#

dogmaphobic commented 7 years ago

Yeah, I guess it's time to upgrade GStreamer to something newer. QGC will only support 1.5.2 across all platforms. I don't remember exactly which GStreamer version, but at some point the interfaces changed and it will require some work to get all platforms up-to-date. That also means you will no longer be able to "apt-get" on Ubuntu < 16.04.

ghost commented 7 years ago

i think the only way is to get rid of the problem is to supply the libs needed by the application and not a generic apt-get on all things that start with gstreamer1.0*

dogmaphobic commented 7 years ago

Ubuntu is the only one giving headaches because it installs at the system level. All other platforms allow you to pull a specific version and have it isolated. I downloaded the current, stable Mac OS version (1.10.2) and it required no changes. It all just built and run. Ubuntu 16.04, even with trying to fix all of the above is failing to build, complaining the lack of packages, header files, the works. This will require quite a bit of work to sort it out.

If we are to include the libraries/headers, it would be Ubuntu 16.04 only and even that would cause a huge increase in the size of the repository. I'm not too thrilled with that idea and frankly, I don't have that kind of time for it right now.

DonLakeFlyer commented 7 years ago

What is the state of Ubuntu versions. Is 16.04 the new LTS?

ghost commented 7 years ago

ubuntu 16.04 is the new LTS, yes.

[qgcTesting] user [~]$ gst-launch-1.0 --version gst-launch-1.0 version 1.8.2 GStreamer 1.8.2 https://launchpad.net/distros/ubuntu/+source/gstreamer1.0 [qgcTesting] user [~]$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial [qgcTesting] user [~]$

version is 1.8.2

i think its the same problem on most of the major linux distributions installing applications/libs via a packet systems. yum, apt, etc. will download a version out of your control.

If we are to include the libraries/headers, it would be Ubuntu 16.04 only and even that would cause a huge increase in the size of the repository. I'm not too thrilled with that idea and frankly, I don't have that kind of time for it right now.

i do not think that will work because the gstreamer has its own way of loading plugins. its not loading shared libs via ld i think. static linking is not the way to either.

if you can give me a bunch of ubuntu version you want to support i will figure out for you what the nesseccary commandlines are to install the needed gst libs/binaries. i would suppose to support the last two (perhaps three) LTS versions, the support for 12.04 should run out next year. i can do that for debian too. at least jessie and wheezy. perhaps arch linux too - but no clue about the versions.

long things short: give me list of versions/distributions you want to support and i will get you the minimal command lines to install the needed gstreamer things.

edit: when is 3.1 scheduled? i might need one or two weeks to find the time to install all the virual machines...

dogmaphobic commented 7 years ago

We use a tiny subset of GStreamer. For Android I just link what we need statically. I used "Ubuntu" above mostly as a synonym for Linux, given that Ubuntu is the only distro we officially support. For 14.04, pkgconfig took care of it. Something changed in 16.04.

ghost commented 7 years ago

pkgconfig is taking care of it in ubuntu 16.04 too. but the package struckture seems to be changed

yzzir commented 7 years ago

I successfully built QGC today on Kubuntu 16.04 with streamingvideo and uvc support (Qt 5.5.1 binaries, not ubuntu Qt 5.5.1). Only having an issue with map tiles not coming in (tile request error "problem with tile image") and QGC crashing when console view is selected. I'll verify input video comes in tomorrow.

dogmaphobic commented 7 years ago

I successfully built QGC today on Kubuntu 16.04 with streamingvideo and uvc support

Did you make any modifications to VideoStreaming.pri? If so, would you mind sharing it?

Only having an issue with map tiles not coming in

It sounds like google tiles is not working properly (they keep changing the API). Try using Bing and see if the problem goes away. This will determine if it is indeed a case of the google API going out of sync.

dogmaphobic commented 7 years ago

@yzzir Any input on how you got GStreamer built on Ubuntu 16.04?

yzzir commented 7 years ago

@dogmaphobic I use gstreamer for the ubuntu repos. I verified that it is still working with master pulled today. I didn't have to make any changes to VideoStreaming.pri.

DonLakeFlyer commented 7 years ago

It sounds like google tiles is not working properly (they keep changing the API). Try using Bing and see if the problem goes away. This will determine if it is indeed a case of the google API going out of sync.

@dogmaphobic Is there a way to create a unit test for this so we will know when they've changed things?

yzzir commented 7 years ago

With regard to the tiles issue, I have always been trying to pull using Bing as they have a better hybrid view of stat+street view. I believe e the issue is due to my work proxy. I have it working on one PC (Ubuntu 14.04) but not on multiple others (Ubuntu 14.04 and Ubuntu 16.04) no clue why as I've imported all relevant CA certificates pertaining to my work proxy. Also, the tile request issue doesn't appear when running qgroundcontrol from my home network (no proxy)

DonLakeFlyer commented 7 years ago

@yzzir Can you enter a separate issue for your tile issue and put the detail there

DonLakeFlyer commented 7 years ago

Ok, I'm not sure what do with 3.1 with respect to Ubuntu and gstreamer. Things like the AppImage don't seem to include gstreamer in it. Hence it is broken on 16.04 which is the new LTS so we should be able to run on that. Also the README instructions for installing gstreamer don't seem to work on 16.04 either. So pre-built archives and build yourself doesn't work either.

Linux is foreign to me so I'm going to need some help fixing this or my only option will be to turn off Video on Ubuntu. I really want to get 3.1 out the door since I'm heading on the road soon.

@dagar Can you help?

dagar commented 7 years ago

Possibly, I've never actually used video in QGC. What's the quickest way to get a video source for testing? Is there a PX4 gazebo simulation or an easy way to stream from my own webcam?

DonLakeFlyer commented 7 years ago

https://github.com/mavlink/qgroundcontrol/blob/master/src/VideoStreaming/README.md shows a way to get a bouncing ball video stream

dogmaphobic commented 7 years ago

Is there a way to create a unit test for this so we will know when they've changed things?

In theory yes. Set the test to download a few, predefined tiles and see if they were downloaded successfully. It would be a matter of creating a function to load a tile from a specific provider given an x,y grid coordinate and zoom level. This is primarily an issue with google, which makes fetching tiles a game of whack-a-mole exactly for this reason.

DonLakeFlyer commented 7 years ago

My current findings...

Installed the following packages: libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamermm-1.0-dev

Changed in VideoStreaming.pri: gstreamer-video-1.0 -> gstreamer-plugins-base-1.0

This then seems to at least get the correct headers but then it gets unresolved references in link. The references seem to be from things that should be in gstreamer-plugins-base-1.0. So not sure what to look for next.

DonLakeFlyer commented 7 years ago

I'm think I'm going to go ahead with 3.1 release without this. It's no worse than it was before. For example AppImage on 14.04 doesn't really work either since it doesn't include the right gstreamer stuff either.

If we can figure it out we can patch.

ChristophTobler commented 7 years ago

Any news on this? Was someone able to run QGC with GStreamer on Ubuntu 16.04? If so, what did you have to do?

ghost commented 7 years ago

Sure its working on 16.04.

What you have to do: install the right gstreamer packages. See my original post

On a ubuntu 16.04 64bit system the sudo apt-get install gstreamer1.0*

will fail because there is a i386 dependency somewhere. and even after installing all the packages by

hand the libgstreamer-plugins* dev packages for the gstreamer-video-1.0 are missing

PKGCONFIG += gstreamer-1.0 gstreamer-video-1.0

this needs libgstreamer-plugins* packages. do not know which one exactly - you guys will figure it

out. will be one of the dev packages.

ChristophTobler commented 7 years ago

@uavcam Thanks, but this is all quite vaguely... I was hoping for some command lines to install the packages

ChristophTobler commented 7 years ago
list=$(apt-cache --names-only search ^gstreamer1.0-* | awk '{ print $1 }' | grep -v gstreamer1.0-hybris)
sudo apt-get install $list

can be used in 16.04 since the only package with dependency issues is gstreamer1.0-hybris

ghost commented 7 years ago

apt-get install libgstreamer-plugins1.0*

could work. i use it without the 1.0 - but i think thats installing too much...

UavLabsColombia commented 7 years ago

Hola, yo he solucionado este inconveniente en debian instalando el paquete sudo apt-get install libgstreamer-plugins-base1.0-dev

Saludos.

jaxxzer commented 7 years ago

I'm not sure what this is all about, but the appimages downloaded from S3, as well as local builds have been working for me on ubutnu 14.04 and ubuntu 16.04 without any modification to the .pri or elsewhere in the repo. All I did was apt-get install gstreamer1.0*, per the current instructions. I suspect that the original post had a broken dependency, and that would be an issue outside of QGC or the current docs.

DonLakeFlyer commented 7 years ago

Sounds good to me then

jaxxzer commented 7 years ago

I did run into trouble with this today, after all. I'll see if I can come up with a definitive list of packages we need, but I did need to grab gstreamer1.0-plugins-bad (h264parse) and gstreamer1.0-libav (avdec_h264).

DonLakeFlyer commented 7 years ago

Can you update README for video when you find it?

jaxxzer commented 7 years ago

Yes

DonLakeFlyer commented 6 years ago

Can any of the Linux folks compile this down to exactly how to install gstreamer onto 16.04? Need to get this straightened out for 3.3 release.

DonLakeFlyer commented 6 years ago

The answer is in the thread above:

list=$(apt-cache --names-only search ^gstreamer1.0-* | awk '{ print $1 }' | grep -v gstreamer1.0-hybris)
sudo apt-get install $list
FavorMylikes commented 3 years ago

Is there any solution for centos 8?

BeardAndHarleyWojciech commented 2 years ago

https://github.com/mavlink/qgroundcontrol/blob/master/src/VideoStreaming/README.md shows a way to get a bouncing ball video stream

The link is broken :(