mediactrl.Load always gives False

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
judyboon
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Oct 09, 2019 4:42 am

mediactrl.Load always gives False

Post by judyboon » Wed Oct 09, 2019 4:54 am

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 tried both python `2.7.14` and `3.6.5` with wxPython `4.0.6`.

I also 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 like codec dependency? Any help would be appreciated.

Thanks in advance.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3508
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: mediactrl.Load always gives False

Post by ONEEYEMAN » Wed Oct 09, 2019 2:18 pm

Hi,
It is possible that with 10.15 media library was deprecated and some other API got introduced, which is incompatible with old versions.

Could you please try to compile wxWidgets C++ and then build and run media sample?

It is easy and straightforward.

If you have any trouble - post here and someone will be able to help.

Thank you.

judyboon
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Oct 09, 2019 4:42 am

Re: mediactrl.Load always gives False

Post by judyboon » Wed Oct 09, 2019 8:02 pm

Thanks for the rely :) ONEEYEMAN. I am able to successfully build/compile wxWidgets C++ library on my 10.15 macOS. How could I let my wxPython to use the newly complied library?

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3508
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: mediactrl.Load always gives False

Post by ONEEYEMAN » Thu Oct 10, 2019 1:29 am

Hi,
Are yu able to compile and run media sample?
Then we will talk about using it inside wxPython...

Thank you.

judyboon
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Oct 09, 2019 4:42 am

Re: mediactrl.Load always gives False

Post by judyboon » Thu Oct 10, 2019 7:17 pm

Yes, I am able to run the mediaplayer example perfectly. The player is able to open `demo/data/testmovie.mpg` file.

Thanks,

jon.warbrick
In need of some credit
In need of some credit
Posts: 3
Joined: Mon Nov 04, 2019 11:01 am

Re: mediactrl.Load always gives False

Post by jon.warbrick » Mon Nov 04, 2019 11:41 am

For what it's worth I also have this problem on 10.15 Catalina, but not on 10.14 Mojava. I've yet to check what happens with the C example media player, but judyboon's experience does suggest that the problem is probably Python-related.

jon.warbrick
In need of some credit
In need of some credit
Posts: 3
Joined: Mon Nov 04, 2019 11:01 am

Re: mediactrl.Load always gives False

Post by jon.warbrick » Mon Nov 04, 2019 1:40 pm

Worth noting that I've opened an issue for this in wxPython's GitHub: https://github.com/wxWidgets/Phoenix/issues/1413

jon.warbrick
In need of some credit
In need of some credit
Posts: 3
Joined: Mon Nov 04, 2019 11:01 am

Re: mediactrl.Load always gives False

Post by jon.warbrick » Tue Nov 05, 2019 7:14 pm

Over on the wxPython GitHub issue, Robin Dunn has posted a link to a 4.1 preview build that seems to partly address this issue:

https://github.com/wxWidgets/Phoenix/is ... -549659032

However this version of the library won't play MIDI files on either 10.15 Catalina or on 10.14 Mojave (reporting the same 'Unsupported format?' error). It's unfortunatly MIDI playback from Python that I'm particularly interested in.

I've experimented with wxWidget's mediaplayer sample in both the 3.0.4 and 3.1.3 releases. There appear to be issues building 3.0.4 under Macos 10.14 and 10.15 because of the removal of stdlibc++ and to work around that I had to run ../configure with --with-macosx-version-min=10.9 when building 3.0.4. This seems to have been fixed in 3.1.3.

All 4 mediaplayers seemed to work the same - all successfully played a MPEG movie and none played a MIDI file, but I don't actually know if mediaplayer is intended to support miid playback.

I'm not sure where this gets us.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3508
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: mediactrl.Load always gives False

Post by ONEEYEMAN » Tue Nov 05, 2019 7:52 pm

Hi,
jon.warbrick wrote:
Tue Nov 05, 2019 7:14 pm
Over on the wxPython GitHub issue, Robin Dunn has posted a link to a 4.1 preview build that seems to partly address this issue:

https://github.com/wxWidgets/Phoenix/is ... -549659032

However this version of the library won't play MIDI files on either 10.15 Catalina or on 10.14 Mojave (reporting the same 'Unsupported format?' error). It's unfortunatly MIDI playback from Python that I'm particularly interested in.

I've experimented with wxWidget's mediaplayer sample in both the 3.0.4 and 3.1.3 releases. There appear to be issues building 3.0.4 under Macos 10.14 and 10.15 because of the removal of stdlibc++ and to work around that I had to run ../configure with --with-macosx-version-min=10.9 when building 3.0.4. This seems to have been fixed in 3.1.3.
It is better to use 10.9 as a min deployment version.
Some things are not ready for 10.14/10.15 and when it is linking against 10.9 it works better.

Also, keep in mind that Stefan himself uses 10.9.
jon.warbrick wrote:
Tue Nov 05, 2019 7:14 pm
All 4 mediaplayers seemed to work the same - all successfully played a MPEG movie and none played a MIDI file, but I don't actually know if mediaplayer is intended to support miid playback.

I'm not sure where this gets us.
Can you start a player in the OSX (not wxWidgets one) - I think iTunes or something, and try to play the file(s) in question?

Thank you.

Post Reply