libvlc_new return null on macos 13 with qt 6.4

This forum is about all development around libVLC.
liusz_318
New Cone
New Cone
Posts: 2
Joined: 01 Feb 2023 14:39

libvlc_new return null on macos 13 with qt 6.4

Postby liusz_318 » 01 Feb 2023 14:50

Hi,
I wrote a piece of code to learn playing video with libvlc, the code works well on windows, but doesn't work on my mac book pro(the macos version is 13.2), and I use qt 6.4. I found that libvlc_new returns null on macos. My code is like:

Code: Select all

libvlc_instance_t *_vlcInst = NULL; libvlc_media_t *_vlcMedia = NULL; libvlc_media_player_t *_vlcPlayer = NULL; libvlc_event_manager_t *_eventManager = NULL; const char *tempArg = ""; const char *vlc_args[10] = {"-I", "dummy", "--no-osd", "--no-stats", "--ignore-config", "--verbose=2", "--no-video-on-top", "--no-video-title-show", "--no-snapshot-preview", tempArg}; int argc = sizeof(vlc_args) / sizeof(vlc_args[0]); qDebug() << "argc: " << argc; _vlcInst = libvlc_new(argc, vlc_args); if(!_vlcInst) { qDebug() << "create vlc instance failed: " << libvlc_errmsg(); return; } qDebug() << "create instance ok"; _vlcPlayer = libvlc_media_player_new(_vlcInst); if(!_vlcPlayer) { qDebug() << "create player failed."; return; } qDebug() << "create player ok";
How would I use libvlc_new on macos? Any help will be appreciated.

Rémi Denis-Courmont
Developer
Developer
Posts: 15328
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc_new return null on macos 13 with qt 6.4

Postby Rémi Denis-Courmont » 01 Feb 2023 17:31

Most common reasons: invalid arguments given or plugins cannot be found.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

liusz_318
New Cone
New Cone
Posts: 2
Joined: 01 Feb 2023 14:39

Re: libvlc_new return null on macos 13 with qt 6.4

Postby liusz_318 » 02 Feb 2023 07:50

Hi Rémi,

Thank you for your reply.

I tried libvlc_new(0, NULL), and copied the "plugins" folder into the app folder, and also copied the folder to myapp.app/Content/MacOS/, but libvlc_new still return NULL. Could you give me more hint?

mfkl
Developer
Developer
Posts: 754
Joined: 13 Jun 2017 10:41

Re: libvlc_new return null on macos 13 with qt 6.4

Postby mfkl » 06 Feb 2023 05:12

Have you tried setting the VLC_PLUGIN_PATH environment variable?
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 12 guests