Skip to content
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

Failed build opencv-python without ffmpeg option in Windows #1023

Open
ioctl-user opened this issue Aug 26, 2024 · 2 comments
Open

Failed build opencv-python without ffmpeg option in Windows #1023

ioctl-user opened this issue Aug 26, 2024 · 2 comments

Comments

@ioctl-user
Copy link

I'm trying build minimal OpenCV-python for Windows for my project, without not needed functions. In my case I don't need video encoding and decoding functions. Also I would like to minimize LGPL libs presence.

At that setup.py contains the following lines:

    rearrange_cmake_output_data = {
        "cv2": (
            [r"bin/opencv_videoio_ffmpeg\d{4}%s\.dll" % ("_64" if is64 else "")]
            if os.name == "nt"
            else []
        )
        +

Here is expected, that ffmpeg dll will be built and packaged. However, there is no such file in case of building without FFMPEG (with CMAKE_ARGS="-DWITH_FFMPEG=OFF" env variable set). These lines leads to build fail in such configuration.

I have changed these lines to fix problem in my case. However, it seems disabling FFMPEG is a common need given the considerations above. Build should not fail in this case.

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

No branches or pull requests

4 participants
@ioctl-user and others