close

[Solved] cv2: [ WARN:0] global cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error cv2: [ WARN:0] global cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback in Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How cv2: [ WARN:0] global cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback Error Occurs?

Today I get the following error cv2: [ WARN:0] global cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback in Python.

How To Solve cv2: [ WARN:0] global cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback Error ?

  1. How To Solve cv2: [ WARN:0] global cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback Error ?

    To Solve cv2: [ WARN:0] global cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback Error I've solved, the problem was that i had open my code executing already, make sure you have closed all your builds

Solution 1

This seems to be a bug in MSMF backend of opencv. You can see more details in this issue.

I don’t think this problem exists on Linux platforms. So I am providing the solution for windows.

Windows only solution

For windows platform, you can change the backend to something else (most preferably DirectShow backend. For this, add to your VideoCapture like below:

captureDevice = cv2.VideoCapture(0, cv2.CAP_DSHOW) #captureDevice = camera

This works for OpenCV>=3.4.

Solution 2

I’ve solved, the problem was that i had open my code executing already, make sure you have closed all your builds

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment