Error while streaming MJPEG video with RTSP protocol

philippe renon philippe_renon at
Tue Nov 7 08:20:39 UTC 2017

You have one sink too many.You should remove the ximagesink. 

    Le Lundi 6 novembre 2017 17h35, HeroGian <Brilli.Gianluca at> a écrit :

I want to stream a MJPEG video from my ethernet camera with OpenCV and
I have tried to open the stream with the following gstreamer pipeline:

std::string pipe(
                "rtspsrc location=rtsp:// !
application/x-rtp,encoding-name=JPEG,payload=26 ! "
                "rtpjpegdepay ! jpegdec ! xvimagesink sync=false ! appsink"
cv::VideoCapture cap(pipe, cv::CAP_GSTREAMER);

but the previous code returns me the following error:

OpenCV Error: Unspecified error (GStreamer: cannot find appsink in manual
) in cvCaptureFromCAM_GStreamer, file
line 796
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised
OpenCV exception:

error: (-2) GStreamer: cannot find appsink in manual pipeline
 in function cvCaptureFromCAM_GStreamer

I managed to stream the the same RTSP source with H264 and H265 algorithms, 
MJPEG is the only format that doesn't work, then I suppose that is a
gstreamer pipeline problem..


Sent from:
gstreamer-devel mailing list
gstreamer-devel at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list