mediactrl.Load always gives False

Hi Folks, I am having some trouble in loading media files using mediactrl.Load. The method always return False, even the media file does exist. I also tried the demo code with demo/data/testmovie.mpg file, still no luck. I am using python 2.7.14 with wxPython 4.0.6 in a macOS.

I tried to look at what happened inside the Load method. It turns out wx.media.py imports from a complied library file _media.so. Has anyone seen this problem before? It smells like some media driver problem. Any help would be appreciated.

If the wxPython Demo for the media player isn’t working, you may
have an installation problem.

I use wxMediaCtrl all the time on Windows and MacOS.

  The first thing I'd look at is compatibility between the file you

are trying to load and the media player that wxMediaCtrl will
use. For example, if I try to load an MOV or FLV file on Windows,
the load will fail, while on MacOS, the MOV file will load and the
FLV file won’t. MP4 files are generally okay on both, as are
MPEG-1 files.

  Try loading the file directly in the default media player

(QuickTime player on MacOS, Windows Media Player on Windows,
gstreamer on Linux) to check that the file is compatible with the
media player and is not corrupted.

Hope that helps,

David

Hi David, thanks for the quick reply. I have tried to open the media directly using QuickTime player. It works well. However the mediactrl.Load still gives me false response.

What possibilities might cause the installation problem? Other than using pip install -U wxPython to install the package, do I need to install some other things?

Hi David, I just tried to run the demo code on a different macOS version (10.14 Mojave), and it magically worked. The macOS I am running is 10.15 Catalina. Does it because the os version issue? Am I missing something in terms of codec dependencies? Any help would be appreciated.

I can’t say what’s going on for you. I haven’t tried Catalina
yet, as I still need to support a large 32-bit code base that is
resisting conversion. But if I were you, I’d get a small sample
program working on Mojave and then move to Catalina with code you
know is good. One problem at a time.

Good luck.

David

Thanks for the reply. Yep, just rolled back to Mojave to develop there.