在 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]
问题是我安装了几个 Python3
PyQt5
的两个版本。sip
一个在/usr/lib/python3/dist-packages/
,另一个在~/.local/lib/python3.6/site-pacages/
。完全删除.local
版本有帮助。那,并安装我能找到的所有东西
gstreamer
。