[SOLVED] QtMultimedia : defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"



  • Hello everyone, my problem is the following : I'm developping a multimedia application with Qt obviously (Qt 5.1.0-RC1), therefore I use the "QMediaPlayer":http://qt-project.org/doc/qt-5.0/qtmultimedia/qmediaplayer.html class from the "QtMultimedia ":http://qt-project.org/doc/qt-5.0/qtmultimedia/multimediaoverview.htmlmodule. Even though it compiles and launches perfectly when using MinGW as a compiler, when I use mscv2012 64bit I get the the message shown in the topic's title. I was getting the same message with the 5.0.2 version of Qt but I was told that it came from the lack of the dsengine.dll in the /plugins/mediaservice directory. And now the said dll is inside the directory but it doesn't seem to change anything. So if anyone encountered the same issue and found a fix , they are more than welcome to post it here, because I know that it will benefit many others.

    Thank you in advance for your time and your help.

    Edit: Solved and solution is there : https://forum.qt.io/topic/28620/solved-qtmultimedia-defaultserviceprovider-requestservice-no-service-found-for-org-qt-project-qt-mediaplayer/9

    Qt Version : 5.1.0-RC1
    Os : Windows 8 64bit
    IDE : QtCreator 2.7.1



  • Hi. I got same error, but on my Raspberry, and other device based on Angstrom Linux, i didn't find any solution to fix this problem ;|, but i saw that many peoples have this problem on Windows and Linux, and nobody have solution for this.



  • Did you had a wmfengine.dll inside the /plugins/mediaservice directory? If yes, it means that Qt was compiled with WMF support.

    If that's the case, then dsengine.dll will only contain camera support, not player support. You need to re-compile dsengine.dll with player support.

    To do this, open directshow.pro and change the line:

    @!config_wmf: include(player/player.pri)@

    into:

    @include(player/player.pri)@

    Then you should be able to open directshow.pro and recompile the plugin.



  • OK i just tried that on the 5.1.0 source but when i try to compile directshow it says that it misses a .qmake.conf file. I'm compiling with Qt 5.1.0 mscv2012 64 bit.



  • So I recompiled the entire multimedia module with the modified directshow pro file then I copied the resulting mediaservice directory in my Qt installation plugins folder but it still doesn't work. If you have recompiled the dsenggine.dll file would you mind sending it to me?



  • Make sure wmfengine.dll isn't in the mediaservice directory. I currently only have build a debug version of dsengine (dsengined.dll). If you want, I can send you that one for evaluation.

    I'm currently adding a -no-wmf-backend configuration flag for configure, to simplify this building process.



  • I removed wmfengine.dll but it still doesn't work so yes, i would like you to send me the debug version thank you.



  • Ok actually i rebuilt the qmultimedia module again and this time i commented the following :

    @config_wmf: SUBDIRS += wmf@

    in the plugins pro file and it worked !



  • Reminder : these particular instructions are supposed to work for windows. If you have similar issues on Linux the solution seems to be to install libgstreamer.

    So for those who have the same issue as I did :
    -Dowload and extract the "qtmultimedia submodule" (for the corresponding version of Qt) from the Qt archives
    -Delete the following line in the plugins.pro file:
    config_wmf: SUBDIRS += wmf

    -Change in the directshow.pro file:
    !config_wmf: include(player/player.pri)

    into
    include(player/player.pri)

    -Compile it all (with the same verison of MSVC you use to compile your program)
    -Copy the resulting mediaservice folder next to your executable

    I have only tested this solution on Qt 5.1 but I don"t see why it shouldn't work on later versions.



  • Has anybody a solution for Linux and gstremer?



  • @diabolic: your question has nothing in common with directshow/windows media foundation. I suggest you start a new question.



  • Download some other backend like xine or make sure that you really and correctly have installed gstreamer



  • Hi. I'm experiencing the same problem. My config is:

    • Windows Vista 64bit
    • qt-windows-opensource-5.1.0-msvc2010-x86-offline.exe

    @raf924 So you're saying the wmf engine nor the ds engine from the official 5.1 SDK build does not work? Do I really have to compile it myself? Is perhaps the MinGW SDK version worh a shot?

    Thanks.



  • Well it seems that it doesn't work. Maybe there is some tweak to perform on your machine to have it working but i think it easier to just recompile the multimedia module with the aforementionned modifications, if you want to use msvc as a compiler. I should point out that the reason i prefer using msvc rather than mingw in this case is that you can't get the metadata with the latter, or at least i couldn't. But if you don't care about getting the metadata from the Qt lib, yes i suggest you use MinGW.



  • I am still seeing this problem.

    defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

    Qt 5.1.1
    QCreator 2.8.1
    Os win7 x64
    Target Windows Surface 2 Pro (Win8.1 x64)

    I have tried the above fix with no success. Any suggestions for isolating what the problem may be? I have tried with WAV and WMA sound clips.



  • Solved my problem.

    I had placed the dsengine.dll and qtmedia_audioengine.dll in the folder:

    <app dir>/plugins/mediaservice

    it needs to be:

    <app dir>/mediaservice



  • Hi, I'm experiencing the same problem on building Static.
    I descriped my problem in the next link.
    http://qt-project.org/forums/viewthread/40102/

    Solutions above won't work for me



  • Well, I believe it should be rather simple to fix your problem. You just need to apply the modifications to the source as indicated then build it statically then copy the result in your static Qt folder. I am by no means certain it will work but I think it should.



  • Sorry, I'm nube in QT

    This is QT folder that runs Static "C:\Qt\Static\5.2.0"

    This is source folder it build from "C:\Qt\Static\src\qt-everywhere-opensource-src-5.2.0".

    Now, I have to
    -Dowload and extract the qtmultimedia submodule [download.qt-project.org]
    to "C:\Qt\Static\src\qt-everywhere-opensource-src-5.2.0\qtmultimedia"
    -Delete the following in the plugins.pro file:
    config_wmf: SUBDIRS += wmf
    -Change in the directshow.pro file:
    !config_wmf: include(player/player.pri)
    into
    include(player/player.pri)

    go to "C:\Qt\Static\src\qt-everywhere-opensource-src-5.2.0\qtmultimedia" with MinGW and run "qmake" command to compile it?

    And than copy some resulting folder to "C:\Qt\Static\5.2.0" ?



  • Right, that's it I guess. I've never built Qt statically so I wouldn't know for sure. You try it and tell me if it works. If it doesn't compile the whole framework after the modifications, it'll take more time but it should work.



  • Hi,
    Do you have a feedback on that (even though I tried)?
    Cause I've been trying to build a static 5.2.1 but so far, i can't get qtmultimedia to work...
    (defaultServiceProvider::requestService(): no service found for - “org.qt-project.qt.mediaplayer”)
    Of course everything works perfectly on the dynamic side.

    [quote author="Mega4alik" date="1395811707"]Sorry, I'm nube in QT

    This is QT folder that runs Static "C:\Qt\Static\5.2.0"

    This is source folder it build from "C:\Qt\Static\src\qt-everywhere-opensource-src-5.2.0".

    Now, I have to
    -Dowload and extract the qtmultimedia submodule [download.qt-project.org]
    to "C:\Qt\Static\src\qt-everywhere-opensource-src-5.2.0\qtmultimedia"
    -Delete the following in the plugins.pro file:
    config_wmf: SUBDIRS += wmf
    -Change in the directshow.pro file:
    !config_wmf: include(player/player.pri)
    into
    include(player/player.pri)

    go to "C:\Qt\Static\src\qt-everywhere-opensource-src-5.2.0\qtmultimedia" with MinGW and run "qmake" command to compile it?

    And than copy some resulting folder to "C:\Qt\Static\5.2.0" ?
    [/quote]



  • [quote author="VoiD" date="1396212068"]Hi,
    Do you have a feedback on that (even though I tried)?
    Cause I've been trying to build a static 5.2.1 but so far, i can't get qtmultimedia to work...
    (defaultServiceProvider::requestService(): no service found for - “org.qt-project.qt.mediaplayer”)
    Of course everything works perfectly on the dynamic side.
    [/quote]

    Hi, I couldn't make it work with MINGW. Currently I'm trying to build it with MSVC. I will post after I get some results.



  • [quote author="VoiD" date="1396212068"]Hi
    [/quote]

    Hi, after many unsuccessful tries, I assumed that somebody uploaded ready Static package and found this one http://www.npcglib.org/~stathis/blog/precompiled-qt4-qt5/.
    Currently trying



  • Hi
    I followed this solution step by step. but didn’t get a success. I compiled using mscv2012.
    Qt 5.2.1
    QCreator 3.0.1
    Os win8 ×64
    I don’t have much knowledge in qt and can’t imagine what i could miss. I need to have audio playback by Url, but i can’t play any local wav, mp3 as well.



  • Found my problem. I miss
    @QT += network@

    hope it will help another beginners save time.



  • Hello. Should this work for 5.3.2 as well?
    I've tried these instructions as well as about 10 other sets that are similar, and still have no luck with playback in XP. We're using Creator with the MSVC 2012 w/ OpenGL compiler/Qt.

    • Our app downloads a wmv file into the users temp directory, then plays it back. If there's an error, we display it in our player as "Error: " + what is returned by errorString() on QMediaPlayer.
    • It works perfectly in Windows Vista+
    • On XP, with the multimedia dll's that came with Qt 5.3.2 package, we see:
      "Error: The QMediaPlayer object does not have a valid service"
    • On XP, with the multimedia dll's compiled using various instructions including the ones in this thread, I simply get:
      "Error: "

    I'm developing on Windows 7 but my next steps are to get Creator/Qt installed on XP to see if I can get anything more out of Creator. It's quite frustrating.



  • This post is deleted!


  • Hi, I'm @raf924 but I couldn't access my account so I made another.

    @wesblake Do you use the x64 version of XP? Because according to this link : http://doc.qt.io/QtSupportedPlatforms/index.html#qt-5-3, Qt5.x only supports its 32 bit version and only for deployement so I wouldn't recommend installing QtCreator/Qt on your xp machine. And if you use the 32 bit version, is your compiler 32bit also? Because I think that would be an issue if the compiler is x64.

    Also since I posted these instructions I haven't tried them on the latest version of Qt since I now use libVLC for media rendering.



  • Hi,
    same problem as described above and solutions did not work properly.

    I found out that you must have libgstreamer installed!
    (see http://doc.qt.io/qt-5/linux-requirements.html in chapter "Multimedia Dependencies")

    After installation of libgstreamer every thing worked perfectly (some troubles with mp3 encoding but that is an os problem).

    Fix on my System (openSUSE 13.2 64bit):
    sudo zypper install libgstreamer-0_10-0
    (or http://software.opensuse.org/package/libgstreamer-0_10-0)

    Hope this will help others.



  • @tomasz3dk On my Linux (Ubuntu 14.04) machine I have just solved this problem
    (the message "defaultServiceProvider::requestService(): no service found for - 'org.qt-project.qt.mediaplayer' ", and no video playback)
    by installing
    sudo apt-get install qtmultimedia5-examples,
    which seems to contain the required plugin(s).



  • Hei,
    In lubuntu 16.04 I needed additionally sudo apt-get install qtgstreamer-plugins-qt5
    terveisin, Markus



  • Iuse linux QtMutimedia, have the same issue ? i have a quession, who have use the static mode qt in linux (android.unix ),any one who try it?



  • if use static mode , the arm and mips will be not hard, and we can easy use it on vehicle, car mode . EXP online car mode.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.