赞
踩
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)
修改代码为
videoCapture = cv2.VideoCapture(“video.avi”,cv2.CAP_DSHOW)
换了个电脑就可以了,感觉是因为我电脑没有摄像头的缘故?
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。