No QtMultimedia backends found on Ubuntu 22.04, I copied individual .so files for Multimedia but it doesn't work
-
I am trying to bundle the app with qt libs we are using one of which is Qt::multimedia. I tried copying qt libs and set LD_LIBRARY_PATH to the package path and the app runs. However I get that:
No QtMultimedia backends found. Failed to initialize QMediaCaptureSessions "Not Available" Failed to initialize QMediaRecorder "Not Available"
Now, what's confusing is that, when I set the
<Qt_path>/6.8.1/gcc_64/lib
in LD_LIBRARY_PATH, the Multimedia feature works.
So now I want to ask what are the related .so files to make this feature working?What I did so far to find the libs:
ldd <application_binary>
ldd libQt6Multimedia.so
ldd plugins/multimedia/libffmpegmediaplugin.so
from there, all QT libs I can find, i added in the bundle.
-
I guess you might be confused with dynamic lib and plugin. Plugin like libffmpegmediaplugin.so is a dynamic lib as well, but its path is set with QT_PLUGIN_PATH while the path of libQt6Multimedia.so is set with LD_LIBRARY_PATH. Use grok or deepseek to find out their differences.
-
I guess you might be confused with dynamic lib and plugin. Plugin like libffmpegmediaplugin.so is a dynamic lib as well, but its path is set with QT_PLUGIN_PATH while the path of libQt6Multimedia.so is set with LD_LIBRARY_PATH. Use grok or deepseek to find out their differences.
@JoeCFD i get that. My question is what are those libs I need to include in the bundle so I can link all them in one place and also standalone for some systems don't want to install whole Qt SDK. My app works, but only when using bundled path it fails to detect the Multimedia backend but the app still runs fine except that feature that uses Multimedia.
-
@JoeCFD i get that. My question is what are those libs I need to include in the bundle so I can link all them in one place and also standalone for some systems don't want to install whole Qt SDK. My app works, but only when using bundled path it fails to detect the Multimedia backend but the app still runs fine except that feature that uses Multimedia.
@mrkprdo your app works because these paths are set up for you. In deployment, these two paths have to be set by yourself separately. Plugins are not linked, instead only loaded dynamically.
run your app with:
strace your_app
to find out how libs and plugins are looked for and loaded. -
@JoeCFD so i tried that and filter out the libs that seem relevant and to answer my post, here's what I came up with.
"libavcodec.so" "libavcodec.so.61" "libavcodec.so.61.3.100" "libavformat.so" "libavformat.so.61" "libavformat.so.61.1.100"
@mrkprdo these are ffmpeg libs which need to be installed with your app as well. I guess there are about 8 core libs in total. It is better for you to add all of them.
libavutil Utilities Shared code, math functions, cryptography libavcodec Encoding/Decoding 1000+ codec support (H.264, VP9, AAC, etc.) libavformat Container I/O 300+ formats (MP4, MKV, MP3, etc.) libavdevice Device I/O Webcams, capture cards, framebuffer libavfilter Filtering Video/audio effects (blur, crop, mix) libswscale Image Scaling Color conversion, resizing libswresample Audio Processing Resampling, mixing, format conversion libpostproc Postprocessing Legacy video filters (deblocking)