0

So I'm trying to embed a few VLC media players into their separate QTFrames. Everything is done in python. However for some reason the official example doesn't want to work (found here)

My code looks like this:

for files in tutorialVideoFiles:
     #frame = QFrame()
     mediaplayer = vlcInstance.media_player_new()  #create media player
     media = vlcInstance.media_new(mainTutorialDirectory + "/" + self.tutorialName + "/" + files)  #load video file
     mediaplayer.set_media(media)  #assign video file
     media.parse()
     self.mediaplayers.append(mediaplayer)
     #mediaplayer.set_hwnd(frame.winId())

If I uncomment the lines, I get the following error: "directdraw vout display error: Win32VoutCreateWindow RegisterClass FAILED (err=1410)"

I'm using Windows 64 bit and Python 3.6

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
gogo199432
  • 35
  • 5
  • Does it work if you do it for a single file rather than for many in a loop? – three_pineapples Feb 03 '18 at 06:22
  • Yeah, meanwhile I tried a super simple example in a separate file and it worked there. So I assume it has something to do with PyQT setting up the Frame too slowly maybe? – gogo199432 Feb 03 '18 at 17:42
  • Possibly. Looks like the same problem here in C++ https://stackoverflow.com/q/30189576 Maybe consider testing the situation where you start with 1 working frame, then add another on a button click. Or maybe setup all the frames first and then add an additional vlc instance each button click. – three_pineapples Feb 03 '18 at 20:47

0 Answers0