当前位置:   article > 正文

仍未解决。_global cap_ffmpeg_impl.hpp:1237 open could not fin

global cap_ffmpeg_impl.hpp:1237 open could not find decoder for codec_id=61

python中videoCapture = cv2.VideoCapture(“video.avi”)出错

错误原因

[ERROR:0] global /build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (1071) open Could not find decoder for codec_id=56
[ERROR:0] global /build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (1103) open VIDEOIO/FFMPEG: Failed to initialize VideoCapture
[ WARN:0] global C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-1y7gm6kn\opencv\modules\videoio\src\cap_msmf.cpp (691) CvCapture_MSMF::initStream Failed to set mediaType (stream 0, (1280x720 @ 5) MFVideoFormat_RGB32(codec not found)
  • 1
  • 2
  • 3

解决方法

修改代码为
videoCapture = cv2.VideoCapture(“video.avi”,cv2.CAP_DSHOW)
换了个电脑就可以了,感觉是因为我电脑没有摄像头的缘故?

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/484740
推荐阅读
相关标签
  

闽ICP备14008679号