QtMultimedia backend setup
-
Hi,
I need to write multivideo player. I tried python+tkinter+tkvideoplayer. This failed to play smoothly fullhd video in fullscreen on raspberry 5. I switch to pyqt and the basic test failed with message:No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available. Failed to initialize QMediaPlayer "Not available" Failed to create QVideoSink "Not available"
So, I installed Qt using official install script and run Media player from examples. It end with the same error. No QtMultimedia backend.
My question: How to set/install any QtMultimedia backend on freshly installed 64bit official rasbian?
-
Hi,
Start your application with the QT_DEBUG_PLUGINS environment variable set to 1. It will print a lot of information and should tell you more about what is failing with the backend.
-
@SGaist said in QtMultimedia backend setup:
QT_DEBUG_PLUGINS
Thank You, I one step closer to solution. It looks like missing library.
qt.core.library: "/home/aosp/Qt/6.7.3/gcc_arm64/plugins/multimedia/libffmpegmediaplugin.so" cannot load: Cannot load library /home/aosp/Qt/6.7.3/gcc_arm64/plugins/multimedia/libffmpegmediaplugin.so: libavformat.so.58: cannot open shared object file: No such file or directory qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "/home/aosp/Qt/6.7.3/gcc_arm64/plugins/multimedia/libffmpegmediaplugin.so" : "Cannot load library /home/aosp/Qt/6.7.3/gcc_arm64/plugins/multimedia/libffmpegmediaplugin.so: libavformat.so.58: cannot open shared object file: No such file or directory" No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available. qt.core.plugin.loader: Found metadata in lib /home/aosp/Qt/6.7.3/gcc_arm64/qml/QtQml/WorkerScript/libworkerscriptplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface", "archlevel": 0, "className": "QtQmlWorkerScriptPlugin", "debug": false, "uri": [ "QtQml.WorkerScript" ], "version": 395008 }
-
Quick update. liibavformat.so.58 is not available in current raspbian.
The following packages have unmet dependencies: libavformat58 : Depends: libavcodec58 (= 8:4.3.6-0+deb11u1+rpt5) Depends: libsrt1.4-gnutls (>= 1.4.2) but it is not installable
Is there a way how to tell Qt to use version 59?
Temporary solution:
Switch multimedia backend: Set enviroment variable QT_MEDIA_BACKEND=gstreamer -
One other option is to rebuild the ffmpeg backend (just it) with your system provided librairies.