OpenCV Assertion Fail

Hi,
Usually we run a gstreamer pipeline in cv2.VideoCapture(). Please refer to the sample:
How to Filesink and Appsink simultaneously in OpenCV Gstreamer. (Gstreamer pipeline included) - #7 by DaneLLL
And give it a try.