0

I'm building my Qt app into an AppImage on Ubuntu-22.04. It builds without errors and the app works. But the problem is that it's supposed to display a video, and it doesn't. The initial version of the app successfully displays the video, but the new version does not. However, the video works correctly when I run the app from Qt Creator in Debug mode. The error message is:"defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"".

I know there are multiple topics about this error across the forums, but i tried everything. I installed all the libs that were recommended:

sudo apt-get update
sudo apt-get -y install \
            libclang-dev \
            libdbus-1-dev \
            libfontconfig1-dev \
            libfreetype6-dev \
            libgl1-mesa-dev \
            libharfbuzz-dev \
            libx11-dev \
            libx11-xcb-dev \
            libxcb-glx0-dev \
            libxcb-icccm4-dev \
            libxcb-image0-dev \
            libxcb-keysyms1-dev \
            libxcb-randr0-dev \
            libxcb-render-util0-dev \
            libxcb-shape0-dev \
            libxcb-shm0-dev \
            libxcb-sync0-dev \
            libxcb-xfixes0-dev \
            libxcb-xinerama0-dev \
            libxcb1-dev \
            libxext-dev \
            libxfixes-dev \
            libxi-dev \
            libxkbcommon-dev \
            libxkbcommon-x11-dev \
            libxrender-dev \
            libpulse-dev \
            libunwind-dev \
            libgstreamer1.0-dev \
            libgstreamer-plugins-base1.0-dev \
            libgstreamer-plugins-bad1.0-dev \
            gstreamer1.0-plugins-base \
            gstreamer1.0-plugins-good \
            gstreamer1.0-plugins-bad \
            gstreamer1.0-plugins-ugly \
            gstreamer1.0-gl \
            gstreamer1.0-libav \
            gstreamer1.0-qt5 \
            gstreamer1.0-tools \
            libqt5multimedia5-plugins \
            libqt5core5a \
            libfuse2 \
            ffmpeg \
            ffmpegthumbnailer \
            autoconf \
            automake \
            build-essential \
            cmake \
            git-core \
            libass-dev \
            libgnutls28-dev \
            libmp3lame-dev \
            libsdl2-dev \
            libtool \
            libva-dev \
            libvdpau-dev \
            libvorbis-dev \
            meson \
            ninja-build \
            pkg-config \
            texinfo \
            yasm \
            zlib1g-dev \
            ffmpegthumbs \
            ffmpeg-doc \
            qtbase5-dev \
            qtdeclarative5-dev \
            libavcodec-dev \
            qml-module-qtmultimedia \
            qml-module-qt-labs-settings \
            qml-module-qtquick-controls2 \
            qml-module-qtquick-layouts \
            qml-module-qtquick-window2 \
            qml-module-qtquick-dialogs \
            qml-module-qtquick-controls \
            binutils \
            fuse \
            libglib2.0-0

I even installed Qt with qtmultimedia with aqt:

aqt install-qt --outputdir ./Qt linux desktop 5.15.2 --archives qtmultimedia

If someone could provide me with instructions for resolving this issue, I would greatly appreciate it.

Wasyn
  • 11
  • 3
  • This doesn't look like a build/install error. If you're getting different behavior running in debug vs. release modes, it probably means there's an uninitialized value you use in your service code. Building and running in debug mode is giving you the value you want (purely by coincidence). You might want to check your code for this. – mzimmers Aug 08 '23 at 16:34

1 Answers1

0

UPDATE: I just had to add the Qt mediaservice folder with its plugins into my build's plugins directory and it worked.

Wasyn
  • 11
  • 3
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 27 '23 at 15:02