Does anyone know of a library or open source product that can decode AC-3 audio streams from a file?
We want to include it in a product my company makes, and they are unwilling to release the source so GPL’d products like ffmpeg aren’t an option. They are willing to pay to license something but our product will be installed in many “seats” so a one-time license fee would be best.
I have googled the heck out of this to no avail. The closest was AC3Filter but it’s also GPL.
Language is not particularly important – C, C++, assembly are all ok. Our app is in Java but already does a lot of JNI stuff.
Using GPL code in a product does not require that you release the source code for the product. Using GPL code in a product requires you to give the user the ability to modify the GPL code in that product. If you can design good interfaces between your code and some wrapper around the GPL code, you can release only the GPL code and the wrapper code.
This is incorrect. Code linking to GPL code is considered a derivative work and is thus bound by the GPL. However, the LGPL is an exeption to this and allows software who only uses a library to link to it without itself being GPL’d.
FFmpeg seems to be covered partly by the GPL and partly by the LGPL, depending on which modules are used within it. As for the OP’s requirements, the AC3 part appears to be under the GPL, and it is therefore not permitted to link to it without the restrictions imposed by the GPL.
Even more pedantic: the GPL (v2, at least) explicitly allows communication between stand-alone GPL & non-GPL programs using sockets/pipes/streams/more or less anything but direct linking. So you could very likely write a GPL program that decodes the streams using ffmpeg or whatever GPL libraries you want, and sends a stream of “raw” data to another non-GPL program which plays it. The only code you’d have to release is the decoder part, and for most libraries that would boil down to using a few lines of demo code + some really simple stuff using stdio.h
Note that if you decide to go that route, it would mean you’d be distributing ffmpeg and/or other GPL libs with your program, and that would mean you’d be responsible for supplying the source to those libraries, if asked. Again, for version 2 of the GPL.
But none of that is really difficult technically.
update: if you can find all the copyright holders to a GPL program/library, you could consider contacting them to buy a non-GPL license off them.
(I knew there would be something that could be nit-picked in my post )
While you are right in general, it doesn’t seem to be that clear cut. Now, I didn’t re-read the GPL before posting but I don’t remember it being that explicit. This is what GNU’s GPL FAQ mentions about the issue:
Such arrangements seem to go against the spirit of the GPL, but I don’t know if there are any set precedents here or not as I don’t really stay up to date in legal matters.
Thanks for the suggestions…especially the “talking over sockets” part. Hadn’t thought of that.
We have spoken with the company’s legal people, and they gave us an emphatic “no” on dynamic linking to “get around” the GPL (the AC3 part of ffmpeg is GPL’d, not LGPL’d). We have read the GPL FAQs and Wiki article and there does seem to be a gray area with dynamic linking, but our Legal doesn’t want to risk it.
I had already emailed the ffmpeg guys regarding buying a license but got no response yet.
I’m now wondering if some type of daemon, with which we use some form of IPC (e.g. sockets), would satisfy the letter of the law.
I started reading the AC3 spec and it looks pretty intimidating to write a decoder from scratch. I’ve done lots of low level decoding stuff before, but even so…
Is this product for sale and/or distribution, or are you just going to use it internally within your company? If the latter, then you are free to use GPL’d code and will not be compelled to release your source code.
Write to the copyright holder(s) of AC3Filter and ask if you can use their code other another licence. Many developers who release their code under the GPL are not orthodox anti–proprietary software polemicists in the vein of Richard Stallman, and will happily relicence their code to you in exchange for some monetary consideration.
“Commercial” doesn’t enter into it: it’s perfectly fine to use GPL’d code for commercial purposes, provided any distribution thereof includes the source code (or a promise to provide it upon request). If you asked the AC3Filter and ffmpeg for a commercial licence, they’re just going to write back that the licence already permits commercial use. What you need to do is ask for a licence which permits use in your application and redistribution thereof in binary-only form.