<div dir="ltr"><br><div><div><div><div><div><div><div>Use appsink element to receive the frame and save it in .jpg format using opencv: <br><br>For eg. <br><br>GstElement *pipeline = gst_parse_launch ("rtspsrc location=rtsp://address ! YOUR CODEC ! appsink name=sink", &error);<br><br>GstElement *sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");<br><br>GstAppSink *appsink = GST_APP_SINK(sink);<br><br>GstSample *sample = gst_app_sink_pull_sample(appsink);<br><br>GstBuffer *buffer = gst_sample_get_buffer(sample);<br><br>GstMapInfo map;<br><br>gst_buffer_map (buffer, &map, GST_MAP_READ);<br><br>Mat frame(Size(320, 240), CV_8UC3, (char*)map.data, Mat::AUTO_STEP); if its a 320x240 size image<br><br>imwrite("XYZ.jpg",frame);<br><div><br><br><br><br><br><br><br></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 26, 2016 at 3:19 PM, Alexander Soloviev <span dir="ltr"><<a href="mailto:alexolut@gmail.com" target="_blank">alexolut@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all.<br><br>I'm new to gstreamer. Maybe my question is quite easy or stupid.<br><br>I would like to know the easiest way how to get frames from rtsp video stream to, for example, store them to files as jpeg/png/bmp etc.<br><br>I need to use it from C/C++ code.<br><br>Thanks in advance.<br></div>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>