-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vlc.Instance() returns None on MacOS Silicon #274
Comments
It looks like Python is built for Apple Si, native. Is VLC App app or is that an Intel build? Double check that both are built for the same target. For example, Python 3.10.8 and VLC 3.0.18 both for Apple Si work fine (with some messages) using the examples tkvlc.py.
|
I have installed VLC Version 3.0.16 Vetinari (Apple Silicon) that's downloaded from official website. |
What does the command line show now ...
The
Also, get the tkvlc.py example and try ...
Example ...
Lastly, play a video ...
Keep in mind, running ...
will not play the video on macOS, only the sound. For more details, see the examples. |
python3.10 vlc.py -v shows exactly the same I texted in my first comment:
python3.10 tkvlc.py -v shows:
and vlc.Instance() still returns None:
As expected, python3.10 tkvlc.py <video_file_name> rises an error:
|
There may be more confusion. Since the
|
It doesn't look that tklib can be a reason of this problem, because I create an instance of vlc.Instance separately of any frameworks. Anyway, output of sys.executable:
|
Well, Don't know about |
I did
I tried to execute vlc.py by each one but no one interpreter works with vlc.Instance. It's hard to believe that there's nobody who has the same problem, definitely I do something wrong :( |
FWIW, I just installed
PS) The are quite a number |
This is under intel chip or apple? |
macOS Sonoma 14.4.1 Apple M1 macBook Air |
My mac is the same. |
Also, Finally, example With any standard Python build for Apple Si, |
No. All VLC and Python are pre-built releases from their respective web-sites. |
Then it's really weird. I use the same Python and VLC builds on the same machine, but the behavior is different. |
VLC is the VLC app and Python is a std build? Not Homebrew? In any case, get Python 3.11 or 3.12 from Python.org. Those install next to 3.10 and will not override the latter. Then, check the |
I installed Python 3.11 from python.org and it didn't help. |
What is the output of …
|
|
This looks normal, correct. It is not possible to diagnose the issue further … remotely, sorry. |
Yeah, I see. Thanks a lot for helping me! |
Google for "libvlc_new returns null" and see whether any of those issue apply to your particular case. Also, check the forum at VideoLAN.org, one entry there mentions that For example, there may be plugins in that folder |
Oh, man, it turned out to be so easy. Just setting the environment variable:
solved my problem. It's literally the first link in Google results. Thank you so much again! |
That’s strange because … that is the exact same |
vlc.py doesn't look at environment variables, the path is hardcoded: elif sys.platform.startswith('darwin'):
# FIXME: should find a means to configure path
d = '/Applications/VLC.app/Contents/MacOS/'
c = d + 'lib/libvlccore.dylib'
p = d + 'lib/libvlc.dylib'
if os.path.exists(p) and os.path.exists(c):
# pre-load libvlccore VLC 2.2.8+
ctypes.CDLL(c)
dll = ctypes.CDLL(p)
for p in ('modules', 'plugins'):
p = d + p
if os.path.isdir(p):
plugin_path = p
break |
True. And it is the same path (before Something else must be wrong or off, because earlier, Maybe, file Btw, which flavor of |
I try to execute simple code:
but instance is always None
output of python vlc.py -v:
what the problem could be?
Thanks in advance.
The text was updated successfully, but these errors were encountered: