Python 解决 Python 内 CvCapture 视频文件格式不支持问题

膨化先生 · May 26, 2021 · 1254 hits

报错如下:

CvCapture_MSMF::initStream Failed to set mediaType (stream 0, (640x480 @ 30) MFVideoFormat_RGB24(codec not found)
`anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback

解决方式

cv2.VideoCapture(0 + cv2.CAP_DSHOW)

转自:http://t.zoukankan.com/geoffreygao-p-14266884.html

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
No Reply at the moment.
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up