1

I've recently updated a Windows desktop application from having a dependency on OpenCV 3 to OpenCV 4, and have discovered that OpenCV versions 3.4 and above, on Windows, have a dependency on Microsoft's "Windows Media Feature Pack". This feature is not installed by default on distributions Windows 10N, Windows 10KN, Windows 11N, and Windows 11KN.

Common advice is to install the Media Feature Pack manually via the control panel, Apps > Apps and Features > Optional Features > Add a Feature. This works for end users but what is the best practice when implementing an installer with this dependency? Should the installer just detect that Media Feature Pack is not available via the registry and error out or is there a way to install it programmatically?

2

1 Answer 1

2

I had the same problem with running cv2.

Don't know about you, but I couldn't simply add Media Feature Pack through the windows update interface. Rather, I was forced to manually add/install Media Feature Pack, which I did through CMD.

I used these commands:

dism /online /remove-capability /capabilityname:Media.MediaFeaturePack~~~~0.0.1.0
dism /online /add-capability /capabilityname:Media.MediaFeaturePack~~~~0.0.1.0

Hope this helps!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.