OpenCV Error: Unspecified error (GStreamer: cannot link elements ) in CvVideoWriter_GStreamer::open, file /data/opencv-3.2.0/modules/videoio/src/cap_gstreamer.cpp, line 1492 VIDEOIO(cvCreateVideoWriter_GStreamer(filename, fourcc, fps, frameSize, is_color)): raised OpenCV exception:
/data/opencv-3.2.0/modules/videoio/src/cap_gstreamer.cpp:1492: error: (-2) GStreamer: cannot link elements in function CvVideoWriter_GStreamer::open
my code:
```
coding: utf-8
import numpy as np import cv2 import base64
fourcc = cv2.VideoWriter_fourcc(*'XVID') out = cv2.VideoWriter("avi_file.avi", fourcc, 24, (307, 568)) for i in range(0, 45): img12 = cv2.imread('/data/zgsee/opencv/img/{}.jpg'.format(i)) out.write(img12) out.release() ```