gst-shark
gst-shark copied to clipboard
Time axis value is coming wrong
I am able to draw different plots for tracers interlatency, proctime and etc. But in all plot diagrams, I am getting time axis wrong.
In example diagram : https://developer.ridgerun.com/wiki/index.php?title=File:Test_proctime_plot.png, I could see time scale is 0, 0.5sec, 1sec, 1.5sec and so on.
But when I plot, I am getting time axis as 0, 41401, 41402, 41403 and so on.
How to get timescale like shown in your examples ?
I am using Ubuntu version : 18.04 Gstreamer : 1.16
Thank you Naveen
I'm sorry for the very slow response. @mleivaf can you check on this?
Hello,
The steps in the X axis are defined automatically by the plot (plot_tracer.m#L150)
But you can force the plot to get the steps required by you. For example:
GST_SHARK_LOCATION=./proctime GST_DEBUG="GST_TRACER:7" GST_TRACERS="proctime" \ gst-launch-1.0 videotestsrc num-buffers=100 ! identity sleep-time=8500 ! tee name=t \ t. ! queue ! identity sleep-time=50000 ! fakesink \ t. ! queue ! identity sleep-time=30000 ! fakesink
Create proctime plot
./gstshark-plot proctime -p
Now you can set the X-axis step on octave console with these commands.
timestamp_max = max(max(tracer.proctime.timestamp_mat))
step=1.5 # X axis step
set(gca, 'xtick', 0:step:timestamp_max);
Also, you can add this code here: plot_tracer.m#L150 to get always the same result.
Hi @mleivaf
Thanks for your response.
When I generate tracers, created folder contains only two files like below:
- datastream
- metadata
tracers folder should contain proctime.mat ?
As I am new to matlab coding, I added above mentioned line at https://github.com/RidgeRun/gst-shark/blob/master/scripts/graphics/plot_tracer.m#L150 and it is giving error: parse error near line 150 of file /home/naveen/video_analytics/gst_shark/master_shark/gst-shark/scripts/graphics/plot_tracer.m syntax error
timestamp_max = max(max(tracer.proctime.timestamp_mat)) step=1.5 # X axis step set(gca, 'xtick', 0:step:timestamp_max);
error: called from ./gstshark-plot.m at line 71 column 5
Best Regards, Naveen.
Hi,
The proctime.mat file is created here: gstshark-plot#L133
I am not sure if these scripts work with Matlab, but based on this link: https://www.mathworks.com/help/matlab/ref/xticks.html
I think for Matlab the commands are slightly different:
timestamp_max = max(max(tracer.proctime.timestamp_mat))
step=1.5 # X axis step
xticks(0:step:timestamp_max)
I recommend using GNU Octave for your tests https://www.gnu.org/software/octave/download.html
Regards, Manuel.