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 imports from a complied library file 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,


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.


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

Hi all,

  I'm sorry it took me a month to follow up on this.  I had to get

my software to the point of basic functionality under python 3 and
wxPython 4 before I felt like I had time to install and explore

  I have concluded that the wxMediaCtrl does not work at all on

MacOS 10.15 Catalina.

  I upgraded a test volume to Catalina, 10.15.1.  I installed the

current python 3.8.0 and wxPython 4.0.7.post1. I then installed
the wxPython Demo. The wxMediaCtrl demo reports it is unable to
load ANY media file I ask it to load, including the sample MPEG-1
video that comes with the demo as well as MP4 files. (I confirmed
that all files work fine with the QuickTime player on Catalina
outside of wxPython.)

  I also installed a version of my own software that was packaged

for distribution on an earlier version of MacOS. It uses Python
3.7.? and an earlier wxPython 4.0 version, maybe 4.0.4. This
version installs and runs on earlier MacOS releases but cannot
load any video files on Catalina. The file load fails in exactly
the way I would predict in my software based on the behavior of
the wxPython Demo.

Has anyone gotten the wxMediaCtrl to work on Catalina? Robin??

Any suggestions or ideas?


There is some related discussion in this GitHub issue:

In a nutshell, if I understand things correctly, Apple dropped support for the older media APIs in 10.15. wxWidgets 3.0.x (wxPython 4.0.x) could be built with either the old or the new family of media APIs, depending on the SDK used in the build. Since I built the binaries with an older SDK then it used the older media APIs, but since those no longer exist on macOS 10.15 then we get failures when trying to load the mediactrl backends. Or something like that.

The good news is that wxWidgets 3.1.x (wxPython 4.1.x) has ripped out the code for using the QTKit APIs and backend, so we won’t have this issue going forward. I’m still looking into what might be a good short-term workaround for 4.0.7.

Hi Robin,

  Is there a roadmap or rough plan that suggests when wxPython 4.1

might be available? Is it something you are actively working on,
or is it just an item on your todo list at this point?

  I am just asking for a ballpark estimate.  I have to proceed very

differently if we’re looking at two months vs. eight months vs.
two years vs. I have no idea.


My hope is to have the first 4.1 release ready by the end of the year, if not sooner.

Thanks Robin. That’s very helpful.