how to link nvdec to appsink for cv2.VideoCapture to grab frame
Ubuntu 18.04 Gstreamer 1.14.5 Python 3.6.9
Hi, I would like to use nvdec to perform h264 decoding and then pass the frame to appsink so that python OpenCV can read it.
rtsp_url = "rtspsrc location=rtsp://127.0.0.1:8554 protocols=tcp ! rtph264depay ! h264parse ! nvdec ! videoconvert ! appsink" stream = cv2.VideoCapture(rtsp_url, cv2.CAP_GSTREAMER)
However, my code stuck at cv2.VideoCapture(rtsp_url, cv2.CAP_GSTREAMER) and there is no error displayed.
I not sure this is caused by the GStreamer pipeline or the cv2.VideoCapture.
Thanks in advance.