Search code examples
linuxpython-3.xpyqt5qtmultimedia

how to use PyQt5 QtMultimedia


Some people seems to be able to use QtMultimedia with PyQt5. according to old stackoverflow posts, it was not included with PyQt5 so what's the way to get it together?

I'm using linux (ubuntu 14.04) and PyQt5 is already installed.


Solution

  • No, QtMultimedia is very much alive and well in PyQt5. Please see the Qt Documentation.

    from PyQt5.QtMultimedia import {See Partial List Below}
    

    Partial List of QtMultimedia Imports

    • QAudioEncoderSettings
    • QCamera
    • QCameraImageCapture
    • QImageEncoderSettings
    • QMediaMetaData
    • QMediaRecorder
    • QMultimedia
    • QVideoEncoderSettings

    In Fact, if you look at the examples directory in the PyQt5 source, you will find a couple of examples including a video player, web camera application, music player etc. @baoboa, who isn't Phil Thompson from Riverbank Computing has added the source to Github which you can find here: https://github.com/baoboa/pyqt5/tree/master/examples/multimediawidgets