1

On Ubuntu 16.04 and 18.04 whenever I'm trying to use QMediaPlayer I'm being prompted with no service.

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

The Internet suggests installing some gstreamer packages but it doesn't say which. How can I figure out which package is needed?

It seems that by default Ubuntu comes with Gstreamer1.0 and I can run gst-play-1.0 FILEPATH. Any chance that gstreamer-0.10 is needed instead? How can I set reverse the dependency?

Packages which I have installed

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]
0

The problem was that I had few two versions of PyQt5 and sip installed for Python3. One was in /usr/lib/python3/dist-packages/ and the other in ~/.local/lib/python3.6/site-pacages/. Completely deleting .local versions helped.

That, and installing everything that I could find with gstreamer.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.