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]

如果您使用的是Qt5.10,则可以降级到5.8或将插件/mediaservice/中的文件替换为旧版本。这对我有用。

我设法通过安装几乎所有我能找到的与gstreamqtmultimedia远程连接的东西来解决这个问题。我不确定哪些是必要的,但当前列表如下。

为了进行测试,最好清理缓存的python可执行文件,以便它不使用旧版本。这不仅在同一个目录中,而且~/.local/lib/python3.6/site-packages/.

这个包装蛋糕上的樱桃是libqt5multimedia5-plugins

gstream的已安装列表

$ apt list --installed | grep gstream
gir1.2-gstreamer-1.0/bionic-updates,now 1.14.1-1~ubuntu18.04.1 amd64 [installed]
gstreamer-qapt/bionic,now 3.0.4-0ubuntu1 amd64 [installed,automatic]
gstreamer0.10-qapt/bionic,bionic,now 3.0.4-0ubuntu1 all [installed]
gstreamer1.0-alsa/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
gstreamer1.0-clutter-3.0/bionic,now 3.0.26-1 amd64 [installed]
gstreamer1.0-espeak/bionic,now 0.4.0-3 amd64 [installed]
gstreamer1.0-fluendo-mp3/bionic,now 0.10.32.debian-1 amd64 [installed,automatic]
gstreamer1.0-gl/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
gstreamer1.0-libav/bionic-updates,now 1.14.1-1~ubuntu18.04.1 amd64 [installed,automatic]
gstreamer1.0-nice/bionic,now 0.1.14-1 amd64 [installed]
gstreamer1.0-packagekit/bionic,now 1.1.9-1ubuntu2 amd64 [installed]
gstreamer1.0-plugins-bad/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
gstreamer1.0-plugins-base/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
gstreamer1.0-plugins-base-apps/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
gstreamer1.0-plugins-good/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
gstreamer1.0-plugins-ugly/bionic-updates,now 1.14.1-1~ubuntu18.04.1 amd64 [installed]
gstreamer1.0-pulseaudio/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
gstreamer1.0-qt5/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
gstreamer1.0-tools/bionic-updates,now 1.14.1-1~ubuntu18.04.1 amd64 [installed]
gstreamer1.0-vaapi/bionic-updates,now 1.14.1-1~ubuntu18.04.1 amd64 [installed,automatic]
gstreamer1.0-x/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
libgstreamer-gl1.0-0/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
libgstreamer-opencv1.0-0/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed,automatic]
libgstreamer-plugins-bad1.0-0/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
libgstreamer-plugins-bad1.0-dev/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
libgstreamer-plugins-base1.0-0/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
libgstreamer-plugins-base1.0-dev/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
libgstreamer-plugins-good1.0-0/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
libgstreamer-plugins-good1.0-dev/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
libgstreamer1.0-0/bionic-updates,now 1.14.1-1~ubuntu18.04.1 amd64 [installed]
libgstreamer1.0-dev/bionic-updates,now 1.14.1-1~ubuntu18.04.1 amd64 [installed]
libgstreamerd-3-0/bionic,now 3.7.5-2build1 amd64 [installed]
libgstreamerd-3-dev/bionic,now 3.7.5-2build1 amd64 [installed]
libgstreamermm-1.0-1/bionic,now 1.10.0+dfsg-1 amd64 [installed,automatic]
libgstreamermm-1.0-dev/bionic,now 1.10.0+dfsg-1 amd64 [installed]
libqt5gstreamer-1.0-0/bionic,now 1.2.0-5 amd64 [installed]
libqt5gstreamer-dev/bionic,now 1.2.0-5 amd64 [installed]
libqt5gstreamerquick-1.0-0/bionic,now 1.2.0-5 amd64 [installed]
libqt5gstreamerui-1.0-0/bionic,now 1.2.0-5 amd64 [installed]
libqt5gstreamerutils-1.0-0/bionic,now 1.2.0-5 amd64 [installed]
libreoffice-avmedia-backend-gstreamer/bionic,now 1:6.0.3-0ubuntu1 amd64 [installed]
qml-module-qtgstreamer/bionic,now 1.2.0-5 amd64 [installed,automatic]
qtgstreamer-plugins-qt5/bionic,now 1.2.0-5 amd64 [installed]

FOT QT5

$ apt list --installed | grep qt5
gstreamer1.0-qt5/bionic-updates,now 1.14.1-1ubuntu1~ubuntu18.04.1 amd64 [installed]
libdbusmenu-qt5-2/bionic,now 0.9.3+16.04.20160218-1ubuntu1 amd64 [installed,automatic]
libphonon4qt5-4/bionic,now 4:4.10.0-2 amd64 [installed,automatic]
libpolkit-qt5-1-1/bionic,now 0.112.0-5 amd64 [installed,automatic]
libqt5concurrent5/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5core5a/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5dbus5/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5designer5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,automatic]
libqt5glib-2.0-0/bionic,now 1.2.0-5 amd64 [installed]
libqt5gstreamer-1.0-0/bionic,now 1.2.0-5 amd64 [installed]
libqt5gstreamer-dev/bionic,now 1.2.0-5 amd64 [installed]
libqt5gstreamerquick-1.0-0/bionic,now 1.2.0-5 amd64 [installed]
libqt5gstreamerui-1.0-0/bionic,now 1.2.0-5 amd64 [installed]
libqt5gstreamerutils-1.0-0/bionic,now 1.2.0-5 amd64 [installed]
libqt5gui5/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed]
libqt5help5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,automatic]
libqt5multimedia5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,automatic]
libqt5multimedia5-plugins/bionic,now 5.9.5-0ubuntu1 amd64 [installed]
libqt5multimediawidgets5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,automatic]
libqt5network5/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5opengl5/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5opengl5-dev/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5printsupport5/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5qml5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,automatic]
libqt5quick5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,automatic]
libqt5script5/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5sql5/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5sql5-sqlite/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5svg5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,automatic]
libqt5test5/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5texttospeech5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,automatic]
libqt5waylandclient5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,automatic]
libqt5waylandcompositor5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,automatic]
libqt5widgets5/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5x11extras5/bionic,now 5.9.5-0ubuntu1 amd64 [installed,automatic]
libqt5xml5/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
phonon4qt5/bionic,now 4:4.10.0-2 amd64 [installed,automatic]
phonon4qt5-backend-vlc/bionic,now 0.10.1-2 amd64 [installed,automatic]
pyqt5-dev/bionic,bionic,now 5.10.1+dfsg-1ubuntu2 all [installed]
pyqt5-examples/bionic,bionic,now 5.10.1+dfsg-1ubuntu2 all [installed]
python-pyqt5/bionic,now 5.10.1+dfsg-1ubuntu2 amd64 [installed]
python-pyqt5.qtmultimedia/bionic,now 5.10.1+dfsg-1ubuntu2 amd64 [installed]
python3-pyqt5/bionic,now 5.10.1+dfsg-1ubuntu2 amd64 [installed]
python3-pyqt5-dbg/bionic,now 5.10.1+dfsg-1ubuntu2 amd64 [installed,automatic]
python3-pyqt5.qtmultimedia/bionic,now 5.10.1+dfsg-1ubuntu2 amd64 [installed]
python3-pyqt5.qtmultimedia-dbg/bionic,now 5.10.1+dfsg-1ubuntu2 amd64 [installed]
qt5-gtk-platformtheme/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
qt5-qmake/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
qt5-qmake-bin/bionic,now 5.9.5+dfsg-0ubuntu1 amd64 [installed,automatic]
qtgstreamer-plugins-qt5/bionic,now 1.2.0-5 amd64 [installed]

相关内容

  • 没有找到相关文章

最新更新