Is there a way to build an OSX (dylib) handbrake library

Archive of historical development discussions
Discussions / Development has moved to GitHub
Post Reply
VidBoy
Posts: 11
Joined: Wed Nov 04, 2009 7:51 pm

Is there a way to build an OSX (dylib) handbrake library

Post by VidBoy » Thu Feb 25, 2016 7:35 am

Hi guys. I'm looking to put together a small utility on OSX, using handbrake for the encoding and was wondering if there's a way to build a single dylib for use in my app? I've managed to get handbrake building from source, but it generates a number of .a files with no dylib I can find.

Additionally, are there docs for the API?

Cheers

User avatar
Rodeo
HandBrake Team
Posts: 11927
Joined: Tue Mar 03, 2009 8:55 pm

Re: Is there a way to build an OSX (dylib) handbrake library

Post by Rodeo » Thu Feb 25, 2016 7:59 am

I don't think there's any detailed official documentation for the API, no. libhb isn't really meant to be used standalone, so any API changes are usually simply discussed with (and more often than not, decided by) GUI maintainers. VidCoder seems able to keep up most of the time, though he does have to ask on IRC every now and then.

Our build system doesn't create a dylib for libhb by default, though you may be able to adapt it to do so - we do build a DLL for the Windows GUI to use. Not 100% sure where to start though. Feel free to jump on IRC (#handbrake on freenode) and ask though.

User avatar
Ritsuka
HandBrake Team
Posts: 990
Joined: Fri Jan 12, 2007 11:29 am

Re: Is there a way to build an OSX (dylib) handbrake library

Post by Ritsuka » Thu Feb 25, 2016 7:59 am

Yes, just create a new target in Xcode and make it create a dylib or a framework. Actually I just split the Mac GUI into the gui and a framework with HBCore and friends, but I haven't committed it yet, so you might want to wait a week or two for it. It will expose the objc wrapper around libhb, but it should as easy to use and much easier if you want to create a GUI.

VidBoy
Posts: 11
Joined: Wed Nov 04, 2009 7:51 pm

Re: Is there a way to build an OSX (dylib) handbrake library

Post by VidBoy » Thu Feb 25, 2016 9:39 am

Thanks guys, will check out the IRC.

Ritsuka, will wait a bit and see what happens with your changes. I'm hoping to make the utility cross platform, probably using Qt to make life easier so hopefully I can interface with your core.

Thanks

User avatar
Ritsuka
HandBrake Team
Posts: 990
Joined: Fri Jan 12, 2007 11:29 am

Re: Is there a way to build an OSX (dylib) handbrake library

Post by Ritsuka » Thu Feb 25, 2016 9:44 am

Urgh Qt, I guess you should use libhd directly then.

Post Reply