Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. The QMediaPlayer Object Does not have a valid service.
Forum Updated to NodeBB v4.3 + New Features

The QMediaPlayer Object Does not have a valid service.

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 2.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • PhrogzP Offline
    PhrogzP Offline
    Phrogz
    wrote on last edited by Phrogz
    #1

    Ubuntu 14.04x64, Qt 5.9.3

    My .pro has QT += qml quick multimedia.
    My QML contains:

    Video { id:vid; source:"file:///home/phrogz/video.mp4"; autoPlay:true }
    Text  { text:vid.errorString }
    

    I see the error message "The QMediaPlayer Object Does not have a valid service."

    The video is present and valid. The same code works on another developer's machine.

    Based on other threads found online I've installed gstreamer0.10-ffmpeg, gstreamer1.0-libav, and gstreamer-tools, with no improvement in my problem.
    (Edit: also tried adding libgstreamer1.0-0 and libgstreamer1.0-dev)

    This related thread merely concludes with the developer upgrading Qt and having the problem go away.

    Can anyone shed light on what this error means, and (more importantly) how I can fix it?

    Thanks!


    Edit: the only multimedia references during build come in the last few lines of the build process:

    g++ -c -pipe -D_GLIBCXX_USE_CXX11_ABI=0 -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/home/phrogz/vidtest -I. -I/home/phrogz/Qt/5.9.3/gcc_64/include -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtQuick -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtMultimedia -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtGui -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtQml -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtNetwork -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I/home/phrogz/Qt/5.9.3/gcc_64/mkspecs/linux-g++ -o main.o /home/phrogz/vidtest/main.cpp
    
    /home/phrogz/Qt/5.9.3/gcc_64/bin/rcc -name qml /home/phrogz/vidtest/qml.qrc -o qrc_qml.cpp
    
    g++ -c -pipe -D_GLIBCXX_USE_CXX11_ABI=0 -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/home/phrogz/vidtest -I. -I/home/phrogz/Qt/5.9.3/gcc_64/include -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtQuick -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtMultimedia -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtGui -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtQml -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtNetwork -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I/home/phrogz/Qt/5.9.3/gcc_64/mkspecs/linux-g++ -o qrc_qml.o qrc_qml.cpp
    
    g++ -Wl,-rpath,/home/phrogz/Qt/5.9.3/gcc_64/lib -o vidtest main.o qrc_qml.o   -L/home/phrogz/Qt/5.9.3/gcc_64/lib -lQt5Quick -lQt5Multimedia -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGL -lpthread 
    
    PhrogzP 1 Reply Last reply
    0
    • PhrogzP Phrogz

      Ubuntu 14.04x64, Qt 5.9.3

      My .pro has QT += qml quick multimedia.
      My QML contains:

      Video { id:vid; source:"file:///home/phrogz/video.mp4"; autoPlay:true }
      Text  { text:vid.errorString }
      

      I see the error message "The QMediaPlayer Object Does not have a valid service."

      The video is present and valid. The same code works on another developer's machine.

      Based on other threads found online I've installed gstreamer0.10-ffmpeg, gstreamer1.0-libav, and gstreamer-tools, with no improvement in my problem.
      (Edit: also tried adding libgstreamer1.0-0 and libgstreamer1.0-dev)

      This related thread merely concludes with the developer upgrading Qt and having the problem go away.

      Can anyone shed light on what this error means, and (more importantly) how I can fix it?

      Thanks!


      Edit: the only multimedia references during build come in the last few lines of the build process:

      g++ -c -pipe -D_GLIBCXX_USE_CXX11_ABI=0 -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/home/phrogz/vidtest -I. -I/home/phrogz/Qt/5.9.3/gcc_64/include -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtQuick -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtMultimedia -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtGui -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtQml -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtNetwork -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I/home/phrogz/Qt/5.9.3/gcc_64/mkspecs/linux-g++ -o main.o /home/phrogz/vidtest/main.cpp
      
      /home/phrogz/Qt/5.9.3/gcc_64/bin/rcc -name qml /home/phrogz/vidtest/qml.qrc -o qrc_qml.cpp
      
      g++ -c -pipe -D_GLIBCXX_USE_CXX11_ABI=0 -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/home/phrogz/vidtest -I. -I/home/phrogz/Qt/5.9.3/gcc_64/include -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtQuick -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtMultimedia -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtGui -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtQml -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtNetwork -I/home/phrogz/Qt/5.9.3/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I/home/phrogz/Qt/5.9.3/gcc_64/mkspecs/linux-g++ -o qrc_qml.o qrc_qml.cpp
      
      g++ -Wl,-rpath,/home/phrogz/Qt/5.9.3/gcc_64/lib -o vidtest main.o qrc_qml.o   -L/home/phrogz/Qt/5.9.3/gcc_64/lib -lQt5Quick -lQt5Multimedia -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGL -lpthread 
      
      PhrogzP Offline
      PhrogzP Offline
      Phrogz
      wrote on last edited by Phrogz
      #2

      I'm sorry to say that I "solved" this by upgrading from Ubuntu 14.04 to 16.04. It was something I had to do for other reasons, and this problem got fixed in the process.

      As a clue to others, there was a runtime notice about not being able to open a linenoise directory in /tmp/, so maybe that was the problem?


      Edit: Ignore the previous paragraph; the error message copied below still occurs on 16.04, but the MediaPlayer problem is still fixed, so that is not a useful hint to source the problem.

      ** (vidtest:6971): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-te0VxRDHRD: Connection refused

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved