mkl-service icon indicating copy to clipboard operation
mkl-service copied to clipboard

mkl==2020.0 breaks loading openH264 library

Open JackCaster opened this issue 4 years ago • 1 comments

This is a bit of an odd issue. I realized that the new mkl version breaks opencv-python. This issue was previously opened in the opencv-python repo (https://github.com/skvark/opencv-python/issues/308#issue-594253213), but I was suggested to opened it elsewhere. Hope you can provide some help or point me in the right direction.

Expected behaviour

OpenCV can load openh264-1.8.0-win64.dll

Actual bejaviour

OpenCV cannot load openh264-1.8.0-win64.dll

Steps to reproduce

Create a new conda environment with the following

name: test_opencv

channels:
 - defaults

dependencies:
- python
- mkl==2020.0
- numpy
- pip
- pip:
   - opencv-contrib-python

and run the following code:

import cv2

fourcc = cv2.VideoWriter_fourcc(*'X264')
out = cv2.VideoWriter('output.avi',fourcc, 20.0, (640,480))

By conda installing mkl==2020.0 opencv cannot load openh264-1.8.0-win64.dll. The following error appears:

...
Failed to load OpenH264 library: openh264-1.8.0-win64.dll
        Please check environment and/or download library: https://github.com/cisco/openh264/releases
...

Instead, installing mkl==2019.* via conda the openH264 is loaded successfully:

...
OpenH264 Video Codec provided by Cisco Systems, Inc.
...
  • operating system: Windows 10
  • architecture (e.g. x86): amd64

JackCaster avatar Apr 06 '20 18:04 JackCaster

In case other people still run into errors related to this, you can also download that particular .dll file and put it into your conda environment. I had to do this recently. You can check out what happened here

jmdelahanty avatar Mar 27 '22 03:03 jmdelahanty