Python上的OpenCV错误
无论我使用什么 我都会得到:
OpenCV错误:CvVideoWriter_GStreamer :: open中不支持的格式或格式组合(Gstreamer
Opencv后端不完全支持此编解码器。),文件/usr/src/packages/BUILD/OpenCV-2.2.0/modules/highgui/src/
cap_gstreamer.cpp,第489行
writer = cv.CreateVideoWriter( filename=file,
fourcc=cv.CV_FOURCC('F', 'M', 'P', '4') ,
fps=iFps,
frame_size=(800,600),
is_color=1)
cv.WriteFrame(writer, cv.LoadImage(frames[i]))
另外/usr/src/packages/BUILD/OpenCV-2.2.0/modules/highgui/src/cap_gstreamer.cpp不存在。
也CV_FOURCC('H','F','Y','U')
使空文件。
输入是 .avi*
writer = cv.CreateVideoWriter( filename=file,
fourcc=cv.CV_FOURCC('F', 'M', 'P', '4') ,
fps=iFps,
frame_size=(800,600),
is_color=1)
cv.WriteFrame(writer, cv.LoadImage(frames[i]))
del writer # this makes a working AVI
回答:
writer = cv.CreateVideoWriter( filename=file,
fourcc=cv.CV_FOURCC('F', 'M', 'P', '4') ,
fps=iFps,
frame_size=(800,600),
is_color=1)
cv.WriteFrame(writer, cv.LoadImage(frames[i]))
del writer # this makes a working AVI
以上是 Python上的OpenCV错误 的全部内容, 来源链接: utcz.com/qa/399862.html