I am getting error while opening file with gstreamer in opencv below is my pipeline. I have searched on internet any try all possible things but nothing is working for me.
ERROR
[ WARN:0] OpenCV | GStreamer warning: unable to query duration of stream
[ WARN:0] OpenCV | GStreamer warning: Cannot query video position: status=1, value=1, duration=-1
cv::VideoCapture capture("filesrc location=a.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec ! videoconvert ! video/x-raw,format=GRAY8 ,width=1280,height=720 ! appsink",CAP_GSTREAMER);