In gstreamer
pipeline, I'm trying to figure out if there's a way to specify that I only want key frames from a RTSP stream.
In ffmpeg
you can do this with with -skip_frame nokey
flag. E.g.:
ffmpeg -skip_frame nokey -i rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov -qscale 0 -r 1/1 frame%03d.jpg
The corresponding gstreamer command to read the RTSP feed looks like this:
gst-launch-1.0 rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov ! decodebin ! videorate ! "video/x-raw,framerate=1/1" ! videoconvert ! autovideosink
Does anyone know if it is possible to ask gstreamer to only return keyframes?
I think you could try add GST_PAD_PROBE_TYPE_BUFFER
pad probe and return GST_PAD_PROBE_DROP
on buffers with GST_BUFFER_FLAG_DELTA_UNIT
flag set.