python上的opencv错误

不pipe是什么“CV_FOURCC”我使用我得到这个:

OpenCV错误:在CvVideoWriter_GStreamer :: open,文件/usr/src/packages/BUILD/OpenCV-2.2.0/modules/highgui/src/中,不支持的格式或格式组合(Gstreamer Opencv后端不支持此编解码器) 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')使空文件。

input是* .png ,输出是* .avi

详细信息:Opensuse 10.4,OpenCv 2.2.0

编辑:如果我这样做,它创build一个工作的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 

Solutions Collecting From Web of "python上的opencv错误"

如果我这样做,它会创建一个工作的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