Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2975

When depoly PySide6 multimedia module, an error is encountered: No QtMultimedia backends found.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.8.1
    • Tooling
    • None
    • Linux/Wayland

      When depoly PySide6 multimedia module, an error is encountered: No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.

      This only happens after deployment.

      mutimedia/build/demo.dist via 🐍 v3.11.10 (mutimedia) 
      ❯ ./demo
      No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.
      Failed to initialize QCamera "Not available"
      Failed to create QVideoSink "Not available"
      Failed to initialize QMediaCaptureSession "Not available"
      
      import sys
      
      from PySide6.QtMultimedia import QCamera, QMediaCaptureSession, QMediaDevices
      from PySide6.QtMultimediaWidgets import QVideoWidget
      from PySide6.QtWidgets import QApplication, QVBoxLayout, QWidget
      
      
      class View(QWidget):
          def __init__(self) -> None:
              super().__init__()
              self.camera = QCamera(QMediaDevices.defaultVideoInput())
              self.camera.start()
              self.viewfinder = QVideoWidget()
              self.captureSession = QMediaCaptureSession()
              self.captureSession.setCamera(self.camera)
              self.captureSession.setVideoOutput(self.viewfinder)
              self.mainLayout = QVBoxLayout(self)
              self.mainLayout.addWidget(self.viewfinder)
      
      
      def main() -> int:
          app = QApplication()
          view = View()
          view.show()
          return app.exec()
      
      
      if __name__ == "__main__":
          sys.exit(main())
      

      build command
      `❯ python -m nuitka demo.py --show-progress --show-memory --prefer-source-code --standalone --enable-plugin=pyside6 --output-dir=build --output-filename=demo
      `

      i also submited on nuitka at https://github.com/Nuitka/Nuitka/issues/3279

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            shpremna Shyamnath Premnadh
            rainzee rainzee wang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes