Skip to content

[Suggestions] Add a gpl binaries of opencv-python include ffmpeg x264, x265 #469

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

Open
talregev opened this issue Apr 23, 2021 · 9 comments

Comments

@talregev
Copy link

Add a gpl binaries of opencv-python include ffmpeg x264, x265.

@talregev
Copy link
Author

talregev commented Apr 29, 2021

I was able to create a opencv python binding with static build with ffmpeg[x264,x265] with vcpkg. Is it something that interesting you?
Will you consider to ship such a binary?

@talregev
Copy link
Author

talregev commented Apr 29, 2021

@sergregory
Fox linux I can create a docker file that will generate this python build.
How you generate python build for windows? with a script? If yes, I can take this script and modify it that it will generate the gpl ffmpeg with x264,x265 and more features that you might want.
Can we chat about this?

@skvark
Copy link
Member

skvark commented Apr 29, 2021

Enabling FFmpeg GPL extensions can be very easily done by just changing the build settings in the Dockerfiles and macOS build scripts in this repository or just by building locally against local FFmpeg. For example:

On Windows, OpenCV CMake scripts download the pre-built FFmpeg binary during the build. We do not generate the binary here.

For local builds, just follow the instructions in the README (FFmpeg should be picked up automatically from your computer by the CMake scripts): https://github.com/opencv/opencv-python#manual-builds

About creating new binary distributions for this purpose... In my opinion, it's too risky to distribute compiled binaries containing x264 and x265 encoders. IANAL, but I believe that x264 and x265 include algorithms that are subject to software patents. That's why the Windows FFmpeg downloaded by CMake during Windows builds is LGPL and the h264 encoder must be downloaded separately by the user: https://github.com/opencv/opencv/blob/master/3rdparty/ffmpeg/readme.txt

However, this is just my opinion. I'm not the main maintainer of this project anymore so it's up to the OpenCV team to decide how they would like to proceed with this and possibly seek legal advice, if needed.

@talregev
Copy link
Author

Not sure why is risky. Yes I know the license for this binary (wheel) file will be change.
The x264 and x265 are gpl, and if opencv will ship this binaries they will be gpl.
What I am suggesting that you will continue to give lgpl binaries and in addition opencv can ship binaries that gpl license.
Can you mentione the relevant person that can make such a decision?
Thank you for your comment.

@skvark
Copy link
Member

skvark commented Apr 29, 2021

If you read my comment, the issue is not GPL but patents. Read the legal info about FFmpeg here: https://www.ffmpeg.org/legal.html

I'm sure someone from the OpenCV team will express their opinion on this matter sooner or later.

@talregev
Copy link
Author

Now is more understood. Maybe to call it for private use? Not sure how to approach it from legal view.
If there is a lawyer in the crowd, maybe he can give advice.

@talregev
Copy link
Author

@skvark what do you think about openh264?
https://www.openh264.org/faq.html
Soon vcpkg will release ffmpeg with openh264.
Will opencv will consider to distribute such a binary?

@alalek
Copy link
Member

alalek commented Apr 29, 2021

Releasing build scripts != binaries distribution

@talregev
Copy link
Author

Can you elaborate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants