PyQt5中的哪个Gstreamer?

在Ubuntu 16.04和18.04,每当我尝试使用QMediaPlayer我都会被提示没有服务。

 >>> from PyQt5 import QtMultimedia >>> qtm = QtMultimedia.QMediaPlayer() defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer" 

互联网建议安装一些gstreamer包,但它没有说明。 我怎样才能确定需要哪个包?

似乎默认情况下Ubuntu附带Gstreamer1.0 ,我可以运行gst-play-1.0 FILEPATH 。 相反需要gstreamer-0.10机会吗? 如何设置逆转依赖?

我安装的软件包

 notlaptop@laptop$ apt list --installed | grep gstream gir1.2-gstreamer-1.0/bionic,now 1.14.0-1 amd64 [installed] gstreamer1.0-alsa/bionic,now 1.14.0-2ubuntu1 amd64 [installed] gstreamer1.0-clutter-3.0/bionic,now 3.0.26-1 amd64 [installed] gstreamer1.0-gl/bionic,now 1.14.0-2ubuntu1 amd64 [installed] gstreamer1.0-packagekit/bionic,now 1.1.9-1ubuntu2 amd64 [installed] gstreamer1.0-plugins-bad/bionic,now 1.14.0-1ubuntu1 amd64 [installed] gstreamer1.0-plugins-base/bionic,now 1.14.0-2ubuntu1 amd64 [installed] gstreamer1.0-plugins-base-apps/bionic,now 1.14.0-2ubuntu1 amd64 [installed] gstreamer1.0-plugins-good/bionic,now 1.14.0-1ubuntu1 amd64 [installed] gstreamer1.0-pulseaudio/bionic,now 1.14.0-1ubuntu1 amd64 [installed] gstreamer1.0-qt5/bionic,now 1.14.0-1ubuntu1 amd64 [installed] gstreamer1.0-tools/bionic,now 1.14.0-1 amd64 [installed] gstreamer1.0-x/bionic,now 1.14.0-2ubuntu1 amd64 [installed] libgstreamer-gl1.0-0/bionic,now 1.14.0-2ubuntu1 amd64 [installed] libgstreamer-opencv1.0-0/bionic,now 1.14.0-1ubuntu1 amd64 [installed,automatic] libgstreamer-plugins-bad1.0-0/bionic,now 1.14.0-1ubuntu1 amd64 [installed,automatic] libgstreamer-plugins-bad1.0-dev/bionic,now 1.14.0-1ubuntu1 amd64 [installed] libgstreamer-plugins-base1.0-0/bionic,now 1.14.0-2ubuntu1 amd64 [installed] libgstreamer-plugins-base1.0-dev/bionic,now 1.14.0-2ubuntu1 amd64 [installed] libgstreamer-plugins-good1.0-0/bionic,now 1.14.0-1ubuntu1 amd64 [installed] libgstreamer-plugins-good1.0-dev/bionic,now 1.14.0-1ubuntu1 amd64 [installed] libgstreamer1.0-0/bionic,now 1.14.0-1 amd64 [installed] libgstreamer1.0-dev/bionic,now 1.14.0-1 amd64 [installed] libreoffice-avmedia-backend-gstreamer/bionic,now 1:6.0.3-0ubuntu1 amd64 [installed] 

问题是我为PyQt5安装了两个版本的PyQt5sip 。 一个在/usr/lib/python3/dist-packages/ ,另一个在~/.local/lib/python3.6/site-pacages/ 。 完全删除.local版本有帮助。

那,并安装我用gstreamer找到的所有东西。