-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenCV load time linking dependency on GPL code: avformat-58.dll #11160
Comments
It is also true for ArchLinux https://archlinux.org/packages/extra/x86_64/opencv/ and so does Debian https://packages.debian.org/buster/libopencv-videoio3.2 |
GPL and BSD-3-Clause are compatible.
Correct. Assuming they release it to the public. |
I'm not sure indicating that the current Msys2 OpenCV package is BSD licensed is compatible with the GPL. By combining it with a load time linking dependency on GPL code, the released software becomes subject to the GPL license (paragraph 2 part b of GPL). The OpenCV project's source code may be BSD, but the Msys2 OpenCV is now in effect GPL. I'm aware that I may simply rebuild OpenCV with a configuration that preserves its BSD license features. Though, up until recently the Msys2 OpenCV (up to version 4.5.2) was I believe not subject to the GPL license, and thus more versatile with respect to integrating into closed source projects. Thanks for the information about Arch and Debian's libopencv_videoio GPL dependency. Maybe this "issue" should be dealt with elsewhere. I understand that the work done to maintain Msys2 is all volunteer and mostly in people's spare time, and I really appreciate it! Thank you so much for maintaining this project and for responding to the issue I created. |
Would delayimp help, or is that still too tightly coupled with GPL code? (Disclaimer: I have not tried to do delayed import on mingw-w64) |
It was previously possible to use libopencv_videoio452.dll to open a camera device without any dependency on ffmpeg. That build of opencv was generally useful for image streaming from a capture device and image processing without a GPL load time linking dependency. The Dependencies program shows no ffmpeg dependency in videoio (4.5.2):
Ideally we include dlfcn.h and use dlopen/dlsym to optionally runtime dynamic link/load code that would affect the license of a project. I'm not sure about delayimp, seems like a windows thing. I believe the videoio module is capable of runtime loading ffmpeg et al based on debug output such as:
In this case, the gstreamer backend is not available (nor is ffmpeg) and thus is not used and the DSHOW backend is finally used. As far as I can tell there is no load time linking dependency on ffmpefg (or gstreamer in this case); since those DLLs are not present in the local working directory and the code is not being run via Msys2/MinGW (so no ability to resolve libraries in the msys system paths). |
Shouldn't the grep be for |
Grep on avformat, also no load time linking dependency there either for 4.5.2
|
Is it possible to replace ffmpeg with native WMF. There is a option in cmake file: OCV_OPTION(WITH_MSMF "Build VideoIO with Media Foundation support" NOT MINGW
VISIBLE_IF WIN32
VERIFY HAVE_MSMF) |
OpenCV is licensed under Apache 2 This says that ffmpeg is LGPL but contains optional GPL parts. More discussion on The biggest achievement of GPL is that everyone has to work around it, taking up work that could have been spent more productively. |
I don't think we can do something about it! |
The current Msys2 build of OpenCV is built with a load time linking dependency on GPL licensed code (avformat library et al/ffmpeg). The Msys2 OpenCV, due to the load time GPL linking, is no longer BSD licensed.
Users who incorporate the current Msys2 OpenCV into their code assuming the BSD license are inadvertently forcing their (potentially closed source code) to be subject to the GPL.
https://packages.msys2.org/package/mingw-w64-x86_64-opencv
Package: mingw-w64-x86_64-opencv
Upstream URL: https://opencv.org/
License(s): BSD
Version: 4.5.5-1
https://packages.msys2.org/package/mingw-w64-x86_64-ffmpeg
Package: mingw-w64-x86_64-ffmpeg
Upstream URL: https://ffmpeg.org/
License(s): GPL
Version: 4.4.1-12
Dependency detection
Running dependencies on: libopencv_videoio.dll
See: https://github.com/lucasg/Dependencies
Listing dependency modules for: libopencv_videoio.dll
The text was updated successfully, but these errors were encountered: