Last active
March 6, 2020 13:13
-
-
Save fberndl/97382904c34cc88d572c1eb5439a1f97 to your computer and use it in GitHub Desktop.
gst latency-clock ( Gstreamer Latency Measurement)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install and build | |
sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-0 libgstreamer1.0-dev libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio -y | |
https://github.com/stb-tester/latency-clock.git | |
cd latency-clock | |
make all | |
export GST_PLUGIN_PATH=/usr/local/lib/ | |
# shit | |
sudo mv libgsttimeoverlayparse.so /usr/local/lib/ | |
## create and decode immediatly ( only show timestamp) | |
GST_DEBUG=*:4 unbuffer ./client "videotestsrc is-live=true pattern=white ! video/x-raw,width=1280,height=720,framerate=50/1,format=RGB ! timestampoverlay ! queue ! videoconvert ! timeoverlayparse" | grep "Latency" | awk '{print $10}' | |
# CREATE CSV | |
echo "time latency" > outputLatency.csv; GST_DEBUG=*:4 unbuffer ./client "videotestsrc is-live=true pattern=white ! video/x-raw,width=1280,height=720,framerate=50/1,format=RGB ! timestampoverlay ! queue ! videoconvert ! timeoverlayparse" | grep "Latency" | awk '{print $1,$10}' >> outputLatency.csv | |
# For gst noobs like myself x-raw can't be transmitted using udpsink, we need rtsp / h265 tests | |
## | |
#output | |
#:00:00.000000105 | |
#:00:00.000000105 | |
#:00:00.000000104 | |
#:00:00.000000104 | |
#:00:00.000000103 | |
# Show latency and average value | |
GST_DEBUG=*:4 unbuffer ./client "videotestsrc is-live=true pattern=white ! video/x-raw,width=1280,height=720,framerate=50/1,format=RGB ! timestampoverlay ! queue ! videoconvert ! timeoverlayparse" | grep "Latency" | awk '{print $10}' | awk -F : '{ if(NR>30)total += $3 count++; print "Latency(s) ", $3, "Average ", total/count }' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment