compute latency in video streaming

Nirbheek Chauhan nirbheek.chauhan at
Wed Dec 31 03:54:12 PST 2014

On 31-Dec-2014 5:18 pm, "frank82" <francescomarino84627 at> wrote:
> I have a pipeline that captures the video from a webcam encode it and send
> the video through udp protocol. On the client side I get the video from
> udp port and show it on a window. I'm able to see the video but delayed of
> about 500 ms. I computed this time in a very rough way: I put the camera
> front of the screen of my computer with a digital clock running and then I
> capture the screen with the digital clock so I can make the difference
> between what the clock shows on my desktop and on the video window.   I
> would like to know how to compute exactly the latency on video streaming
> (using for example some gstreamer calls), someone can give me an hint?
> Thank you for the support.

If you add a "clockoverlay" element in the pipeline after the "v4l2src" you
have in your pipeline, you will get a millisecond-granularity timer synced
to the pipeline clock overlayed on the video and you'll be able to use the
same technique you already are to get a more accurate latency measure.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list