Does QtMultimedia work on Linux?



  • Can anyone here confirm if QtMultimedia in Qt 5.8 is working correctly in Linux? Are you able to play a soundeffect, music or video or display a webcam stream? I can not do any of these things.

    I am using Qt 5.8 libraries which I built from source after I installed all gstreamer 1.0 related libraries. I am running this on 64bit Ubuntu 16.04.

    I am sure that it is not my code and something in the qtmultimedia library is brocken. When I go into the qtmultimedia build folder, there is an example folder in there with a few examples built. When I try to run declarative camera for example, I get the following error:

    ~/Projects/Qt5.8_build_Nov28/qtmultimedia/examples/multimedia/declarative-camera$ ./declarative-camera 
    defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.camera"
    defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
    qrc:///VideoCaptureControls.qml:110: Error: Cannot assign [undefined] to QString
    qrc:///CameraListButton.qml:65:5: QML CameraListPopup: Binding loop detected for property "currentValue"
    qrc:///PhotoCaptureControls.qml:135: Error: Cannot assign [undefined] to QString
    qrc:///CameraListButton.qml:65:5: QML CameraListPopup: Binding loop detected for property "currentValue"
    

    The example app runs, but there is no video/camera stream.


  • Moderators

    @Aras Did you also install gstreamer dev packages?
    Were the audio and media plug-ins built when you built Qt?



  • Did you also install gstreamer dev packages?

    Yes I installed all gstreamer 1.0 packages. All of them.

    Were the audio and media plug-ins built when you built Qt?

    not sure what you mean by this. Can you explain a bit more?



  • I think I have an idea why this is, but I still do not know how to fix it. I am building Qt5.8 without gstreamer 1.0 support. I use this command to build Qt from source:

    ../qt5/configure -developer-build -opensource -nomake examples -nomake tests -force-debug-info

    when I look at the output for the multimedia section, I see this:

    Qt Multimedia:
      ALSA ................................... yes
      GStreamer 1.0 .......................... no
      GStreamer 0.10 ......................... no
      Video for Linux ........................ yes
      OpenAL ................................. no
      PulseAudio ............................. yes
      Resource Policy (libresourceqt5) ....... no
      DirectShow ............................. no
    Qt Location:
      Gypsy GPS Daemon ....................... no
      WinRT Geolocation API .................. no
    Qt WebEngine:
      Proprietary Codecs ..................... no
      Spellchecker ........................... yes
    

    So clearly Gstreamer 1.0 is not being configured for build. This is strange because I think it is default and since all gstreamer libraries are installed on my machine, I would expect that it should be included.

    I used the following command to test that gstreamer is working on my system and it did display a video stream:

     gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw,width=640,height=480 ! autovideosink
    

    I feel like this should be so simple, but it is driving me crazy for a while now. How can I configure my Qt build to include Gstreamer 1.0?

    Help please!


  • Lifetime Qt Champion

    Hi,

    It really looks like you are missing the dev packages, can you double check your installed packages ?


Log in to reply
 

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