Using LibVLC on MacOSX

This forum is about all development around libVLC.
Brit
New Cone
New Cone
Posts: 9
Joined: 30 Mar 2012 07:49

Using LibVLC on MacOSX

Postby Brit » 30 Mar 2012 08:14

I've been having trouble getting LibVLC to work with my application. I'm using Mac OS X 10.6 and XCode. (I have it embedded into a Qt application in Windows, but when I try to port it to Mac, I run into problems.) I downloaded the 64-bit version of VLC (VLC 2.0.1 64-bit), selected "Show Package Contents" on the VLC.app, and grabbed some of the files, and put them into my application's directory.

Specifically, I took all the directories (shown below) and copied them to my application's folder.
/Contents/MacOS/bin/
/Contents/MacOS/include/
/Contents/MacOS/lib/ (this contains the libvlc.5.dylib and libvlccore.5.dylib)
/Contents/MacOS/plugins/
/Contents/MacOS/share/

So it looks like this:
MyApplicationDirectory/[MyApplication]
MyApplicationDirectory/bin/
MyApplicationDirectory/include/
MyApplicationDirectory/lib/
MyApplicationDirectory/plugins/
MyApplicationDirectory/share/

I also tried copying the dylibs (libvlc.5.dylib and libvlccore.5.dylib) into the same directory as my application, but that didn't help either.

When I run my application, it fails to open and I get an error message "[LunarSim] cannot be opened because of a problem. Check with the developer to make sure [LunarSim] works with this version of Mac OSX..." I only get this error when I add LibVLC to my application. I'm not trying to open any media files yet, I'm just trying to link it into my application.

Am I missing something? Is there a different way to accomplish this? I couldn't find much information about how to use LibVLC on Mac OSX. (I could only find information on how to get/install the VLC Player or rebuild the entire project. I just want the library.)

* Changed "Sim" to "LunarSim" in the error message for clarity.
Last edited by Brit on 30 Mar 2012 19:18, edited 2 times in total.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Using LibVLC on MacOSX

Postby Jean-Baptiste Kempf » 30 Mar 2012 15:17

Whas is Sim?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Brit
New Cone
New Cone
Posts: 9
Joined: 30 Mar 2012 07:49

Re: Using LibVLC on MacOSX

Postby Brit » 30 Mar 2012 19:15

The name of the application. Edit: I changed it to [LunarSim] instead of Sim in the error message for clarity.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Using LibVLC on MacOSX

Postby Jean-Baptiste Kempf » 31 Mar 2012 13:42

What are the logs?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Brit
New Cone
New Cone
Posts: 9
Joined: 30 Mar 2012 07:49

Re: Using LibVLC on MacOSX

Postby Brit » 02 Apr 2012 20:45

I'm not sure what you mean. There are log files somewhere? I don't see any logs in the application directory. (I'm new to Mac development, are there some logs stored in some other directory somewhere?)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Using LibVLC on MacOSX

Postby Jean-Baptiste Kempf » 03 Apr 2012 01:22

Run your application from the command line, you should see the logs.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Brit
New Cone
New Cone
Posts: 9
Joined: 30 Mar 2012 07:49

Re: Using LibVLC on MacOSX

Postby Brit » 05 Apr 2012 22:58

Okay, so here's what's going on: when I try to run the application from Finder, I get the error listed above.

If I run the application from XCode, I get an error message in the status XCode status bar that says, "GDB: Program received signal "EXC_BAD_ACCESS"". The console says, "gdb-i386-apple-d (map: 0x68fe854) triggered DYLD shared region unnest for map: 0x68fe47c, region 0x7ff80e00000->0x7fff81000000. While not abnormal for debuggers, this increases system memory footprint until the target exits."

I'm building the application as x86_64. I thought I'd mention that because the error message has "i386" in the message text, which makes me wonder if its a 32-bit/64-bit problem. (I'm using Qt, which is only available in 64-bit. I hope I don't have to perform the huge task of rebuilding Qt as 32-bit in order to get this to work.)

AndyZhengSeven
New Cone
New Cone
Posts: 8
Joined: 22 Nov 2017 09:31

Re: Using LibVLC on MacOSX

Postby AndyZhengSeven » 19 Dec 2017 12:58

are you resolve it?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 25 guests