I am trying to open videowriter with gstreamer like so:
writer.open("appsrc ! videoconvert ! x264enc ! rtspclientsink location=<rtsp server stream>", cv::CAP_GSTREAMER, 0, fps, (width, height), true);
However, during execution I get the following:
cv::CvVideoWriter_GStreamer::open OpenCV | GStreamer warning: OpenCV backend does not support this file type (extension): appsrc ! videoconvert ! x264enc ! rtspclientsink location=<rtsp server stream>
Does this mean it is treating the first parameter as a filename?
I checked the codebase for cap_gstreamer.cpp and somehow it seems it was not able to understand the pipeline entered.
encodebin.attach(gst_parse_launch(filename.c_str(), err.getRef())); manualpipeline = (bool)encodebin;
manualpipeline is false causing it to evaluate the first parameter as a file.
Further digging, it seems appsrc is not a recognized element.
"no element \"appsrc\""
FFMPEG: YES (find_package)
avcodec: YES (58.134.100)
avformat: YES (58.76.100)
avutil: YES (56.70.100)
swscale: YES (5.9.100)
GStreamer: YES (1.19.2)
Media Foundation: YES
Any idea why this is happening and how to fix this?