VideoWriter OpenCV - 无法在函数中播放管道 CvVideoWriter_GStreamer::open
VideoWriter OpenCV - cannot put pipeline to play in function CvVideoWriter_GStreamer::open
几乎完全相同的问题:OpenCV error - cannot put pipeline to play in function CvVideoWriter_GStreamer::open
上下文:我正在尝试使用 OpenCV 3.3.0 和 Python 2.7.
创建视频并将其保存在 .avi 文件中
问题:这段代码:
fourcc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('data/out/output.avi', fourcc, 30, (800, 600))
加薪:
(python2.7:12345): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
** (python2.7:12345): CRITICAL **: gst_ffmpeg_cfg_set_property: assertion 'qdata->size == sizeof (gint64)' failed
OpenCV Error: Unspecified error (GStreamer: cannot put pipeline to play ) in CvVideoWriter_GStreamer::open, file /soft/OpenCV3.3/opencv-3.3.0/modules/videoio/src/cap_gstreamer.cpp, line 1690
VIDEOIO(cvCreateVideoWriter_GStreamer (filename, fourcc, fps, frameSize, is_color)): raised OpenCV exception:
cap_gstreamer.cpp:1690: error: (-2) GStreamer: cannot put pipeline to play
in function CvVideoWriter_GStreamer::open
问题:如何解决这个问题,以便我可以使用 OpenCV 编写视频文件?
在 VideoWriter
的构造函数中不使用路径解决了问题。
out = cv2.VideoWriter('output.avi', fourcc, 30, (800, 600))
几乎完全相同的问题:OpenCV error - cannot put pipeline to play in function CvVideoWriter_GStreamer::open
上下文:我正在尝试使用 OpenCV 3.3.0 和 Python 2.7.
创建视频并将其保存在 .avi 文件中问题:这段代码:
fourcc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('data/out/output.avi', fourcc, 30, (800, 600))
加薪:
(python2.7:12345): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
** (python2.7:12345): CRITICAL **: gst_ffmpeg_cfg_set_property: assertion 'qdata->size == sizeof (gint64)' failed
OpenCV Error: Unspecified error (GStreamer: cannot put pipeline to play ) in CvVideoWriter_GStreamer::open, file /soft/OpenCV3.3/opencv-3.3.0/modules/videoio/src/cap_gstreamer.cpp, line 1690
VIDEOIO(cvCreateVideoWriter_GStreamer (filename, fourcc, fps, frameSize, is_color)): raised OpenCV exception:
cap_gstreamer.cpp:1690: error: (-2) GStreamer: cannot put pipeline to play
in function CvVideoWriter_GStreamer::open
问题:如何解决这个问题,以便我可以使用 OpenCV 编写视频文件?
在 VideoWriter
的构造函数中不使用路径解决了问题。
out = cv2.VideoWriter('output.avi', fourcc, 30, (800, 600))