python 上的 opencv 错误
无论我使用什么“CV_FOURCC”我都会得到这个:
OpenCV 错误:不支持的格式或格式组合(Gstreamer Opencv 后端实际上不支持此编解码器。) CvVideoWriter_GStreamer::打开,文件 /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')
会生成空文件。
输入为 *.png,输出为 *.avi
详细信息:Opensuse 10.4、OpenCv 2.2.0
编辑:如果我这样做它会创建一个工作 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
no matter what "CV_FOURCC" I use I get this:
OpenCV Error: Unsupported format or combination of formats (Gstreamer
Opencv backend doesn't support this codec acutally.) in
CvVideoWriter_GStreamer::open, file
/usr/src/packages/BUILD/OpenCV-2.2.0/modules/highgui/src/cap_gstreamer.cpp,
line 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]))
Also /usr/src/packages/BUILD/OpenCV-2.2.0/modules/highgui/src/cap_gstreamer.cpp, does not exist.
Also CV_FOURCC('H','F','Y','U')
makes empty file.
Input is *.png, output is *.avi
Details: Opensuse 10.4, OpenCv 2.2.0
EDIT: If I do this this it creates a working AVI file:
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我这样做,它会创建一个工作 AVI 文件:
If I do this this it creates a working AVI file: