I don’t understand why it works for you but it’s so inconsistent for me, you code works and I activated the clocks but I’m back at constant fps drops every few seconds:
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1290, dropped: 0, current: 25,07, average: 25,12
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1305, dropped: 0, current: 26,41, average: 25,13
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1313, dropped: 0, current: 13,63, average: 25,01
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1321, dropped: 0, current: 11,33, average: 24,82
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1332, dropped: 0, current: 21,03, average: 24,79
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1348, dropped: 0, current: 30,98, average: 24,85
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1372, dropped: 0, current: 47,05, average: 25,05
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1389, dropped: 0, current: 30,22, average: 25,11
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1403, dropped: 0, current: 27,41, average: 25,13
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1412, dropped: 0, current: 17,57, average: 25,06
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1428, dropped: 0, current: 31,83, average: 25,12
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1440, dropped: 0, current: 22,91, average: 25,10
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1454, dropped: 0, current: 27,68, average: 25,12
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1467, dropped: 0, current: 25,39, average: 25,12
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1476, dropped: 0, current: 12,49, average: 24,97
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1479, dropped: 0, current: 5,60, average: 24,79
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1490, dropped: 0, current: 21,55, average: 24,77
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1514, dropped: 0, current: 43,81, average: 24,94
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1528, dropped: 0, current: 25,51, average: 24,94
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1544, dropped: 0, current: 29,73, average: 24,99
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1557, dropped: 0, current: 14,09, average: 24,83
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1578, dropped: 0, current: 41,03, average: 24,96
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1598, dropped: 0, current: 38,54, average: 25,07
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1613, dropped: 0, current: 25,61, average: 25,07
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1626, dropped: 0, current: 25,71, average: 25,08
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1636, dropped: 0, current: 15,77, average: 24,99
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1640, dropped: 0, current: 6,02, average: 24,80
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1653, dropped: 0, current: 24,31, average: 24,79
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1670, dropped: 0, current: 33,41, average: 24,86
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1691, dropped: 0, current: 41,22, average: 24,98
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1712, dropped: 0, current: 33,32, average: 25,06
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1725, dropped: 0, current: 25,08, average: 25,06
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1739, dropped: 0, current: 27,10, average: 25,07
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1753, dropped: 0, current: 27,37, average: 25,09
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1765, dropped: 0, current: 23,92, average: 25,08
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1778, dropped: 0, current: 25,64, average: 25,09
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1791, dropped: 0, current: 25,20, average: 25,09
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1794, dropped: 0, current: 3,41, average: 24,82
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1798, dropped: 0, current: 7,40, average: 24,69
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1814, dropped: 0, current: 31,02, average: 24,74
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1842, dropped: 0, current: 54,30, average: 24,94
I’ve also tried with a transcoding pipeline, getting a pretty simmilar result:
gst-launch-1.0 -v rtspsrc location=rtsp://192.168.0.16:8554/video latency=200 ! "application/x-rtp, media=video, encoding-name=H264, clock-rate=90000, payload=96" ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=10 ! queue max-size-time=1 min-threshold-time=5 ! rtph264depay ! "video/x-h264, stream-format=byte-stream, framerate=30/1" ! h264parse ! "video/x-h264, stream-format=byte-stream, framerate=30/1" ! omxh264dec ! "video/x-raw(memory:NVMM), format=NV12, framerate=30/1" ! nvvidconv ! "video/x-raw, format=BGRx" ! videoconvert ! "video/x-raw, format=BGR, framerate=30/1" ! videoconvert ! vp8enc threads=6 deadline=1 ! video/x-vp8 ! rtpvp8pay ! udpsink host=224.1.1.1 port=5000 auto-multicast=true
That one above behaves similarly inside and outside opencv but the one you shared the other day is still working at 25 stable fps (only transcoding, in opencv it always drops):
gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.16:8554/video ! queue ! rtph264depay ! video/x-h264, stream-format=byte-stream ! h264parse ! omxh264dec ! nvvidconv ! nvv4l2vp8enc ! video/x-vp8 ! rtpvp8pay ! udpsink host=127.0.0.1 port=5000