How to measrure the encoding time using omxh265enc? (Gstreamer)

Hello all,
I’ve built a video-streaming pipeline using gst-launch-1.0 like this:
Server:
gst-launch-1.0 nvcamerasrc fpsRange=“30.0 30.0” ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, format=I420, framerate=30/1’ ! omxh265enc ! ‘video/x-h265, stream-format=byte-stream’ ! rtph265pay mtu=2000 ! udpsink host= port=5000 sync=false async=false

it works well,
and I think the glass-to-glass latency is satisfying.
But my boss asked me to measure the exact time of encoding precisely. He knows nothing about gstreamer and wants to know how much time per frame when the h265 encoder works.
I don’t have any idea about how to measure the encoder’s working time.
Many thanks!

Please refer to https://devtalk.nvidia.com/default/topic/1032771/
You can add MeasureEncoderLatency=true

Another approach that might prove useful for measuring other elements aswell is to use probes.

If you compile your own gstreamer C/C++ application you can attach probes to the src & sink ends of the element.

To make a more robust solution you may even embed time-stamp metadata along with each incoming GstBuffer.

Hi Dane,
Thanks for your prompt answer!
I added it but it doesn’t show any messages. Where is the latency information? And what is KPI?

Oh! I found the enc_latency log
Many thanks !

Hi,
The results are saved to files.

nvidia@tegra-ubuntu:~$ ls gst_omx_enc_latency_*
gst_omx_enc_latency_3601.log  gst_omx_enc_latency_3657.log

You can refer to https://devtalk.nvidia.com/default/topic/1032771/ to configure max clocks.