hello,
I have an application in python that’s running pipeline:
udpsrc → tsdemux → h265parse → queue → avdec_h265 → x264enc → rtph264pay → appsink → appsrc → webrtcbin.
I want to measure the latency of the pipeline:
how much time in average (in ms) does it takes for a frame to travel from udpsrc to the sink of webrtcbin.
My problem is that I can’t use probes (insert the time to a queue in udpsrc/tsdemux probe and then pop in webrtcbin’s probe) because the probes triggers different times per second (the probes and signals of the elements don’t directly align)
I also tried using buffers (subtract pts) but the buffers can be duplicated, split, or delayed, and there’s no guarantee that the buffer I see at tsdemux is the same one I send through appsrc.
I also tried streaming the same pcap (with timeoverlay element to see differences) with pipeline:
udpsrc → tsdemux → h265parse → queue → avdec_h265 →autovideosink
and look for differences in ms in the timer of timeoverlay (to see the latency of the pipeline from encoding to webrtcbin).
but it turned out that the pipeline with autovideosink has more latency than mine so I can’t really measure the latency with this method.
Ideas anyone?