To support dynamic linking of FFmpeg in compliance with the LGPL license, Qt Multimedia uses stub libraries to handle optional external dependencies on Linux and Android platforms.
On these platforms, FFmpeg may require additional shared libraries that are not shipped with Qt:
These libraries are often not available or cannot be bundled due to licensing constraints. To ensure FFmpeg-based features remain functional (excluding the unsupported parts), Qt delivers stub libraries as fallbacks.
If these dependencies are not present at runtime, FFmpeg will fail to load or function properly. The stub mechanism allows:
Stub libraries mimic the interfaces of the real libraries (e.g., libssl.so, libva.so) but do not implement full functionality. Instead, they:
QLibrary::load / QLibrary::resolve.Qt ships these stubs under the names:
libQt6FFmpegStub-ssl.so.xlibQt6FFmpegStub-crypto.so.xlibQt6FFmpegStub-va.so.xlibQt6FFmpegStub-va-drm.so.xlibQt6FFmpegStub-va-x11.so.xWhen FFmpeg is dynamically linked:
libssl.so.3 or libva.so.2.patchelf tool to replace these real dependencies with stub equivalents.Example:
# Original linkage libffmpegmediaplugin.so: needs libavcodec.so (depends on the FFmpeg libs) libavcodec.so: needs libssl.so.3 # After patching libffmpegmediaplugin.so: needs libavcodec.so (no changes) libavcodec.so: needs libQt6FFmpegStub-ssl.so.3 libQt6FFmpegStub-ssl.so.3: optionally needs libssl.so.3 (no explicit linkage)
This patching is performed automatically as part of the build/distribution process.
dlopen(..., RTLD_LOCAL), so stub symbols do not leak into the global symbol table.@OPENSSL_3.0.0)To completely remove the use of stub libraries, there are two options:
patchelf to restore FFmpeg's dependencies back to the system libraries (e.g., replace libQt6FFmpegStub-ssl.so.3 with libssl.so.3). This must be done for all FFmpeg libraries: libavcodec, libavformat, libavutil, libswresample, and libswscale.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.9/qtmultimedia-ffmpeg-stubs.html