Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Some parts of FFmpeg are LGPL, and some codecs are GPL (e.g., if you have x264 libs in there).

How does one comply with the GPL and LGPL with Wasm, other than a complete source dump?



I'm not a lawyer, so understanding the exact implications of licensing is beyond me. My thought process behind this is that there are other (even commercial) services offering web-based video editors that use ffmpeg and are closed source. In any case I completely isolated the renderer into an iframe so in theory I could allow people to upload their own version ffmpeg.wasm if they were so inclined to.


If the commercial services aren't distributing ffmpeg, for instance they are running on their own servers, then they are only using, but not distributing ffmpeg, and aren't under an obligation to share source code.

Since you are distributing ffmpeg (as a wasm module), you are under obligations to give access to source code that do not apply to services that merely use ffmpeg within their own organization (even if for a service provided to third parties).

One typical work around for distribution of ffmpeg in a product is to simply use a standalone ffmpeg executable and provide all the source to the ffmpeg executable.

A wasm module is more akin to a library than a standalone executable and likely under stronger obligations. If you are only using LGPL code (it depends on how you compiled ffmpeg [See https://www.ffmpeg.org/legal.html -- "Compile FFmpeg without "--enable-gpl" and without "--enable-nonfree" ), giving access to only the ffmpeg code you used to build the module (and any modifications) would likely suffice for the source code obligation. If you are including any GPL code (because you didn't compile with the options needed to ensure only LGPL code is used), your entire project likely falls under GPL and you would probably need to share the source for the entire project to be compliant.

If another service is using ffmpeg as a wasm without providing a means of accessing the source code (to the wasm module if only using LGPL code, or the entire project if using any GPL code), they (too) are likely in violation of the ffmpeg license copyright and could be sued. Companies and projects can fly under the radar for some time before this happens, but it doesn't mean they are operating legally and will never be sued.


Thanks for your in depth explanation. The current structure for me is I have the main app which is responsible for previewing and making the edits to videos. This project does not include FFmpeg. I have a separate project which is the renderer. The renderer is loaded in a separate iframe which loads ffmpeg.wasm. Would this be separate enough that upon request I would only have to open source the project which includes ffmpeg.wasm?


That’s a question for courts to decide. It hangs on what interpretation courts assign to “derivative work”.

There are claims both for and against this being a derivative work; for “standalone” use, the test is usually something like “if you didn’t use ffmpeg, would the product be significantly less useful?”

MySQL used to claim that including MySQL.exe in a product, even if you don’t link to it, makes that product a derivative work. The generally accepted wisdom is that it’s not.

I don’t know if this was ever tested in court.


Sounds reasonable. Just heads up that you may need to face those implications sooner or later. To the best of my knowledge (and IANAL, but I have worked extensively with lawyers on similar questions), if your ffmpeg.wasm contains any GPL code, you are obligated to provide the complete "original" source code of the product on request to anyone to whom you've distributed the compiled version.

You may want to check with a lawyer, and/or read the ffmpeg FAQ about that, and/or recompile with --disable-gpl --disable-nonfree - and that only brings you to the point where you need to let people use their own ffmpeg.wasm (and not be obligated to provide your source code).

https://www.ffmpeg.org/legal.html is actually required reading for anyone who uses ffmpeg in a product, commercial, free/libre or free/gratis.

I have an acquaintance who's a lawyer specializing in these issues, and he's usually called in to put out (legal) fires because people ignored open source licenses in commercial products. Copyright infringement laws are crazy complicated and in many ways incompatible with the modern ways of software, but they are what they are, and must be considered.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: