<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font face="Helvetica, Arial, sans-serif">Hello,</font></p>
<p><font face="Helvetica, Arial, sans-serif">This is my first
request for help from the mailing list. Please let me know if I
am not doing it right.<br>
</font></p>
<p><font face="Helvetica, Arial, sans-serif">I have a Python3 video
player program that was working OK in Linux Mint 19.1 (64-bit
Cinnamon desktop). I upgraded to Mint 19.3 (also </font><font
face="Helvetica, Arial, sans-serif"><font face="Helvetica,
Arial, sans-serif">64-bit Cinnamon desktop</font>) and now the
player does not show video. Audio is OK but the screen is dark.</font></p>
<p><font face="Helvetica, Arial, sans-serif">With the old system I
was using Python 3.6.8, Qt 5.9.5 and PyQt 5.10.1. It is the same
with the new system except for Python 3.6.9.<br>
</font></p>
<p><font face="Helvetica, Arial, sans-serif">I stripped down my
program to the code shown below just to recreate the error on my
new system; I also verified it works OK on the old system. Do
any of you know what might be missing or wrong on my system to
cause this problem?</font></p>
<p><font face="Helvetica, Arial, sans-serif">Thanks for any help you
can give,<br>
Dave</font></p>
<p><font face="Helvetica, Arial, sans-serif">-----------------------------------------------------------------<br>
</font></p>
<p><font face="Helvetica, Arial, sans-serif">#!/usr/bin/env python3<br>
import sys<br>
from PyQt5 import QtWidgets, QtGui, QtCore<br>
from PyQt5 import QtMultimedia, QtMultimediaWidgets<br>
<br>
class ShowVideo(QtWidgets.QDialog):<br>
def __init__(self, fileName, parent=None):<br>
super(ShowVideo, self).__init__(parent)<br>
self.mediaPlayer = QtMultimedia.QMediaPlayer()<br>
self.videoWidget = QtMultimediaWidgets.QVideoWidget()<br>
controlLayout = QtWidgets.QHBoxLayout()<br>
layout = QtWidgets.QVBoxLayout()<br>
layout.addWidget(self.videoWidget)<br>
self.setLayout(layout)<br>
<br>
self.mediafile = QtCore.QFile(fileName)<br>
self.mediafile.open(QtCore.QIODevice.ReadOnly)<br>
self.mediaPlayer.setMedia(QtMultimedia.QMediaContent(),
self.mediafile)<br>
self.mediaPlayer.setVideoOutput(self.videoWidget)<br>
<br>
QtWidgets.QShortcut(QtGui.QKeySequence('Esc'),self,self._quit)<br>
<br>
def _quit(self):<br>
if (self.mediaPlayer.state() ==
QtMultimedia.QMediaPlayer.PlayingState):<br>
self.mediaPlayer.pause()<br>
self.mediafile.close()<br>
self.close()<br>
<br>
if __name__ == '__main__':<br>
<br>
app = QtWidgets.QApplication(sys.argv)<br>
<br>
fileName = '/media/work/sample.mp4'<br>
sv = ShowVideo(fileName)<br>
sv.mediaPlayer.play()<br>
sv.exec_()<br>
<br>
sys.exit()<br>
</font></p>
</body>
</html>