Page 1 of 1

Problem using vlc.py on osx

Posted: 10 Oct 2012 02:08
by sylvain.berger
I am having a problem when using the python binding on osx 10.8

Here is what I did
1. Installed VLC 2.0.3
2. Pulled the python binding from git://git.videolan.org/vlc/bindings/python.git

when I run

Code: Select all

python vlc.py ~/Dev/_samples_/bee_960.mov
I get this error:

Code: Select all

[0x101b10b20] main window error: corrupt module: /Applications/VLC.app/Contents/MacOS/plugins/libmacosx_plugin.dylib
The same steps on windows works perfectly

Anyone have any idea what is going on?

Re: Problem using vlc.py on osx

Posted: 10 Oct 2012 13:38
by Jean-Baptiste Kempf
This is the release VLC.app ?

Re: Problem using vlc.py on osx

Posted: 10 Oct 2012 13:51
by sylvain.berger
Yes this is using the binary install from the main site.
I have confirm this behavior on 2 computers both running 10.8
One clean install and one upgrade from 10.6 to 10.8

I have not tested on 10.6 yet

Re: Problem using vlc.py on osx

Posted: 10 Oct 2012 15:28
by OlivierAubert
Please check the various references in viewtopic.php?f=32&t=100547&p=340442&hi ... le#p340442 to see if they solve your problem.

Re: Problem using vlc.py on osx

Posted: 12 Oct 2012 02:10
by sylvain.berger
@olivier in the other post it is the same error but they seem to have problems with python 32 bit vs 64 bit vlc.

I found this in the generate.py file
This module and the generated Python bindings have been tested with
32-bit Python 2.6, 2.7 and 3.1 on Linux, Windows XP SP3 and MacOS X 10.4.11
(Intel) using the VLC 1.1.4.1 and 1.1.5 public API include files.
I have python 2.7.3 64 bit and vlc 64 bit

Code: Select all

Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.maxint 9223372036854775807
So I guess this is the problem, but the stange thing is that the generated vlc.py file works fine on Windows 64 and Linux 64. I made it work without having to build the python binding, I just copy the vlc.py on these machine and run python vlc.py someVideo.mov and it works.

I will try to build the python vlc file manually. I don't understand why I would need to build it though since it is just a .py file without any .so or .dll

Re: Problem using vlc.py on osx

Posted: 12 Oct 2012 02:33
by sylvain.berger
well I am having no luck with building the bindings
sylvain.berger python/$ make
python generate.py ../../include/vlc/*.h -o generated/vlc.py
Error: no type conversion for libvlc_audio_output_device_t* libvlc_audio_output_device_list_get
Error: no type conversion for libvlc_audio_output_device_t* p_list in libvlc_audio_output_device_list_release
Error: 2 type conversion(s) missing... exit(2)
make: *** [generated/vlc.py] Error 2
:(

Re: Problem using vlc.py on osx

Posted: 15 Oct 2012 20:59
by OlivierAubert
Building by yourself the bindings should make no difference, since it really looks like an arch difference in your vlc and python binaries. Check the output of

Code: Select all

lipo -info libvlc.dylib
and

Code: Select all

lipo -info /usr/bin/python
.

Anyway, if you want to try to build the bindings by yourself, just fetch the latest git version, I have updated them to handle the latest API changes.

Re: Problem using vlc.py on osx

Posted: 15 Oct 2012 23:32
by sylvain.berger
This is what I get when I run the lipo command

Code: Select all

sylvain.berger ~/$ lipo -info /Applications/VLC.app/Contents/MacOS/lib/libvlc.dylib Architectures in the fat file: /Applications/VLC.app/Contents/MacOS/lib/libvlc.dylib are: x86_64 i386

Code: Select all

sylvain.berger ~/$ lipo -info /Library/Frameworks/Python.framework/Versions/2.7/bin/python Architectures in the fat file: /Library/Frameworks/Python.framework/Versions/2.7/bin/python are: i386 x86_64
Thanks for the fix in the source, I will try to build tonight and let you know

Re: Problem using vlc.py on osx

Posted: 15 Oct 2012 23:51
by OlivierAubert
And

Code: Select all

lipo -info /Applications/VLC.app/Contents/MacOS/plugins/libmacosx_plugin.dylib
?

Re: Problem using vlc.py on osx

Posted: 16 Oct 2012 02:11
by sylvain.berger
There you go:

Code: Select all

sylvain.berger ~/$ lipo -info /Applications/VLC.app/Contents/MacOS/plugins/libmacosx_plugin.dylib Architectures in the fat file: /Applications/VLC.app/Contents/MacOS/plugins/libmacosx_plugin.dylib are: x86_64 i386
I have compiled the binding successfully but it fails with the 2.0.3 binary.
I still have problem building vlc from source on Mountain Lion.
So I guess everything works with the binding ... if one can use it with a build of the latest version

Re: Problem using vlc.py on osx

Posted: 10 Apr 2014 15:32
by hwt
I found this old thread via Google search — I'm having the same problem using the newest 2.1.4 binary package for OSX (downloaded off the main site) and the pre-generated vlc.py grabbed from the repo just now. Was a solution ever found?

I also checked my archs using lipo:
libmacosx_plugin.dylib - x86_64
libvlc.dylib - x86_64
python - x86_64 i386

Code: Select all

[0x7fe2eb48a130] main window error: corrupt module: /Applications/VLC.app/Contents/MacOS/plugins/libmacosx_plugin.dylib [0x7fe2eb556960] vout_macosx vout display error: No drawable-nsobject nor vout_window_t found, passing over. [0x7fe2ec2060b0] main video output error: video output creation failed [0x7fe2eb81f4b0] main decoder error: failed to create video output

Re: Problem using vlc.py on osx

Posted: 11 Mar 2015 14:24
by rodd
I have the same error message and the same archs (using lipo) also on MacOS, python 2.7.3

Did anyone find a fix for this?