问题
I am trying to create video writer objects in OpenCV to write frames from my webcam into a file. However I'm getting the following error on this line.
name1 = "videos/cam1.avi"
out = cv2.VideoWriter(name1,cv2.cv.CV_FOURCC('M','J','P','G'), 20.0, (1920,1080))
Error output:
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
来源:https://stackoverflow.com/questions/42013053/opencv-error-cannot-put-pipeline-to-play-in-function-cvvideowriter-gstreamer