Opencv error in python

no matter what "CV_FOURCC" I use this:

OpenCV error: unsupported format or combination of formats (Gstreamer The Opencv operating system does not support this codec.) 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, there is no / usr / src / packages / BUILD / OpenCV -2.2.0 / modules / highgui / src / cap_gstreamer.cpp.

Also CV_FOURCC('H','F','Y','U')creates an empty file.

Input * .png , output *. avi

Details: Opensuse 10.4, OpenCv 2.2.0

EDIT: if I do this, it will create 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
+2
source share
1 answer

, 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
+1

All Articles