PyAV icon indicating copy to clipboard operation
PyAV copied to clipboard

Add FFmpeg licensing information

Open bjuncek opened this issue 3 years ago • 5 comments

Per #805, I've added licensing information to LICENSE.txt and (perhaps unnecessary) to README.md. The information added to README.md would be useful to have in PyPI and conda-forge pages, but I'm unsure on how to add this.

bjuncek avatar Apr 21 '22 09:04 bjuncek

Thanks so much for looking into this! I'm not sure I follow how we can determine "the" license for the binary wheels distribution, as it is a collection of several softwares with different licenses?

jlaine avatar Apr 21 '22 12:04 jlaine

Fair. I was going for the most restrictive, which is GPL (that has that whole spidery thing whenever you link against something that's GPL it becomes GPL). Alternative is to just point out that FFmpeg has more restrictive license and pass the user to figure out what their FFmpeg installation contains?

bjuncek avatar Apr 21 '22 13:04 bjuncek

Thanks so much for looking into this! I'm not sure I follow how we can determine "the" license for the binary wheels distribution, as it is a collection of several softwares with different licenses?

The way to deal with this is to list all the licenses of bundled components. For example, what SciPy does is:

  1. Have separate file content if it varies for different wheels: https://github.com/MacPython/scipy-wheels/blob/master/LICENSE_win32.txt
  2. Amend the license file as part of the wheel build process: https://github.com/MacPython/scipy-wheels/blob/master/patch_code.sh#L12-L17

rgommers avatar Jun 30 '22 13:06 rgommers

@jlaine Would you be ok with the solution that Ralf proposed? Specifically, creating a separate LICENSE file for FFMPEG (any other binary info can be included in there), that would be appended to the license file in the makefile when wheels are built?

In terms of determining THE licence, GPL FAQ states that code that utilises and makes calls to a GPL-licensed software becomes GPL:

Linking [name of your program] statically or dynamically with other modules is making a combined work based on [name of your program]. Thus, the terms and conditions of the GNU General Public License cover the whole combination

bjuncek avatar Aug 09 '22 09:08 bjuncek

Unsolicited comment from a maintainer of the conda-forge ffmpeg and pyav feedstocks:

Do remember that the license of the binary work can be different than the license of the constituent source files. I also don't know of many court cases that have been tried for the GPL license so it is somewhat unclear as to how it applies in practice (also i am not a lawyer so none of this is legal advice)

FFMPEG is somewhat interesting, it assumes that you don't have a license for x264, and that you are using the GPL'ed version. You can purchase one from https://x264.org/en/ so it somewhat gets tricky.

Ultimately, many projects have simply copied over the license files of the source projects, and left it to the end user to untangle them in terms of what it means for the final project. (Un)fortunately, the LGPL process explicitly allows for this. They want you to be able to change the underlying library which you linked to, to one that is potentially under a different license.

For example, at conda-forge, I've made it quite explicit that during the build process [1] of PyAV, we build with the LGPL version, the PyAV compiled files are not really bound by the GPL license anymore. The user is able to then choose which version of ffmpeg they want to install, the GPL compiled one (which includes x264 and x265 among other things) or the non-gpl compiled one. What this does to their resulting license of PyAV is unclear to me.

My ask, is that you continue to differentiate between the license of the source (which, according to the history of the license file, you did not intend on being licensed through the GPL license), and the license of the binary, which may, according to different interpretations, be subject to the GPL terms.

In terms of the pypi distribution, I also feel like it would be nice for your end users, if you didn't set the license to GPL (but that is up to you). I'm not sure about the best way to do this on pypi. Optional packages come to mind, but I can't comment on the details of the implementation. A different license for the sdist and the wheel might be an other option.

[1] https://github.com/conda-forge/av-feedstock/pull/60

hmaarrfk avatar Aug 21 '22 18:08 hmaarrfk

The appended readme message in this PR is vague and not very helpful. Our binaries are GPLv3 in the PyPI release (with other compatible licenses for deps), but this git repo is BSD by itself, but can be used to build other licenses (LGPLv2, LGPLv3, GPLv2).

Our LICENSE.txt should NOT be modified, since this repo does not contain any code GPL or LGPL code.

I'm going to close this, since this PR has major issues.

WyattBlue avatar Nov 01 '23 19:11 WyattBlue