Skip to main content
Visitor II
May 30, 2025
Question

QtMultimedia with PyQt5

  • May 30, 2025
  • 1 reply
  • 317 views

Hi st team,
I tried to used Qtmultimedia with PyQt5 i clone in layers meta-qt5 and meta-st in meta-st i used meta-st-x-linux-qt 

and completed build.

Build Configuration:
BB_VERSION = "2.4.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-ostl-linux"
MACHINE = "stm32mp2"
DISTRO = "openstlinux-weston"
DISTRO_VERSION = "4.2.4-snapshot-20250529"
TUNE_FEATURES = "aarch64 armv8a crc cortexa35"
TARGET_FPU = ""
DISTRO_CODENAME = "mickledore"
ACCEPT_EULA_stm32mp2 = "1"
GCCVERSION = "12.%"
PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
meta-python
meta-oe
meta-gnome
meta-multimedia
meta-networking
meta-webserver = "HEAD:aa5e8edabbc414d8ec1b2ad63c8743c7baf99626"
meta-st-stm32mp = "HEAD:890071a6ae935663883a9978582b6916e293890a"
meta-st-openstlinux = "HEAD:4d6bdd08c0925912dfdacca0034f2ee87fe01908"
meta = "HEAD:23b5141400b2c676c806df3308f023f7c04e34e0"
meta-qt5 = "mickledore:d86e2e82c15d186141713515dfd1373013aaebd5"
meta-st-x-linux-qt = "v1.0.0:1e51cb49240116fb512deccd8f6bad551918f866"

 

After successful  build i used below commands to check Qtmultimedia and PyQt5 is installed or not.

raj@linux:~/machines/stm32mp2/oe-manifest/build-openstlinuxweston-stm32mp2$ python3 -c "import PyQt5; print('PyQt5 is installed')"
PyQt5 is installed
raj@linux:~/machines/stm32mp2/oe-manifest/build-openstlinuxweston-stm32mp2$ python3 -c "from PyQt5.QtCore import QT_VERSION_STR; print(QT_VERSION_STR)"
5.15.14

raj@linux:~/machines/stm32mp2/oe-manifest/build-openstlinuxweston-stm32mp2$ python3 -c "from PyQt5 import QtMultimedia; print('QtMultimedia is available')"
QtMultimedia is available

 

Here we can see all the things are installed.

After this i used stm32cubeprogrammer for flashing with this image FlashLayout_emmc_stm32mp257f-dk-optee.tsv

and completed boot.

After completion of booting process when i tried previous commands on stm32mp257f-dk board that time i got below outputs.

root@stm32mp2:~/vdc# python3 -c "from PyQt5.QtCore import QT_VERSION_STR; print(QT_VERSION_STR)"
5.15.9
root@stm32mp2:~/vdc# python3 -c "import PyQt5; print('PyQt5 is installed')"
PyQt5 is installed

root@stm32mp2:~/vdc# python3 -c "from PyQt5 import QtMultimedia; print('QtMultimedia is available')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name 'QtMultimedia' from 'PyQt5' (/usr/lib/python3.11/site-packages/PyQt5/__init__.py)


Here we can see QtMultimedia is not installed and also version of PyQt5 is changed.

I hope you guys are help me to solve is issue.

Thank you

    This topic has been closed for replies.

    1 reply

    ST Employee
    June 18, 2025

    Hi,

    as Qt5 support is going to end, I would recommend to use PySide6.
    Our last updated documentation is available at:
    https://wiki.st.com/stm32mpu/wiki/X-LINUX-QT_Expansion_Package

    And more specifically:

    https://wiki.st.com/stm32mpu/wiki/X-LINUX-QT_Distribution_Package

    Recipe "python3-pyside6" needs to be added:

    https://layers.openembedded.org/layerindex/recipe/380679/

     

    BR,

    Philippe.