I am developing a video editor in python 3 and PyQt5. I would like to use the QMediaPlayer widget and QVideoWidget together with moviepy. I tried with the following line of code to play a video:
self.mediaPlayer = QMediaPlayer(None, QMediaPlayer.VideoSurface).setMedia(QMediaContent(VideoFileClip('aaaspain.mp4')))
but it returns me this error:
TypeError: arguments did not match any overloaded call:
QMediaContent(): too many arguments
QMediaContent(QUrl): argument 1 has unexpected type 'VideoFileClip'
QMediaContent(QNetworkRequest): argument 1 has unexpected type 'VideoFileClip'
QMediaContent(QMediaResource): argument 1 has unexpected type 'VideoFileClip'
QMediaContent(Iterable[QMediaResource]): argument 1 has unexpected type 'VideoFileClip'
QMediaContent(QMediaContent): argument 1 has unexpected type 'VideoFileClip'
QMediaContent(QMediaPlaylist, contentUrl: QUrl = QUrl()): argument 1 has unexpected type 'VideoFileClip'
I am working on Ubuntu 20.04.2 and python 3.8.10.