Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

measuring latency between udpsink and udpsrc #68

Open
shengliangd opened this issue Mar 20, 2020 · 1 comment
Open

measuring latency between udpsink and udpsrc #68

shengliangd opened this issue Mar 20, 2020 · 1 comment

Comments

@shengliangd
Copy link

I want to measure the latency incurred by the network. I came up with the following method:

  1. Install two network interfaces on the same host, suppose they get IP1 and IP2;

  2. Run gst-shark interlatency, with the following command:

gst-launch-1.0 \
	ximagesrc \
	! videoconvert \
	! videoscale \
	! video/x-raw,width=800,height=600,framerate=24/1 \
	! queue max-size-buffers=1 \
	! x264enc tune=zerolatency \
	! h264parse \
	! rtph264pay \
	! udpsink host=<**IP1**> port=5000 async=false \
	udpsrc port=5000 \
	! application/x-rtp,clock-rate=90000,payload=96 \
	! rtph264depay \
	! h264parse \
	! queue max-size-buffers=1 \
	! avdec_h264 \
	! queue max-size-buffers=1 \
	! videoconvert \
	! autovideosink
  1. Modify the routing table to force all the traffic being sending to IP1 go via the NIC configured with IP2.

By following the above steps, the latency graph would contain the time spent between udpsink and udpsrc. But before trying the whole process, I first tried to profile this pipeline without modifying the routing table, which means, the time spent between udpsink and udpsrc is negligible. However, the resulting latency graph looks like the following:
image

The lines intersect with each other. But they shouldn't if things went well. It seems that the time a frame reaches udpsrc is reset to 0. I was wondering if it is because of the limitation of gst-shark interlatency plugin, or if there is something missing in the pipeline description. Looking forward to any hints or solutions!

@shengliangd
Copy link
Author

shengliangd commented Mar 25, 2020

This works for my need by drawing timestamps on the raw frame. But I didn't figure out what's wrong with my pipeline or interlatency plugin...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant