OpenCV错误 - 无法在管道功能中使用CvVideoWriter_GStreamer :: open

时间:2017-02-02 21:56:14

标签: python opencv gstreamer

我正在尝试在OpenCV中创建视频编写器对象,以便将我的网络摄像头中的帧写入文件。但是我在这一行上收到以下错误。

name1 = "videos/cam1.avi"
out = cv2.VideoWriter(name1,cv2.cv.CV_FOURCC('M','J','P','G'), 20.0, (1920,1080))

错误输出:

File "TestWebcam.py", line 14, in takeImage
    out = cv2.VideoWriter(name1,cv2.cv.CV_FOURCC('M','J','P','G'), 20.0, (1920,1080))
cv2.error: /home/odroid/software/opencv/opencv-2.4.13/modules/highgui/src/cap_gstreamer.cpp:1528: error: (-2) GStreamer: cannot put pipeline to play
 in function CvVideoWriter_GStreamer::open

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,并且通过不使用name1的路径来解决了这个问题。

请参阅:VideoWriter OpenCV - cannot put pipeline to play in function CvVideoWriter_GStreamer::open