<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 2 févr. 2020 10 h 30, solo_juan <<a href="mailto:solo_juan@gmx.com">solo_juan@gmx.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm learning Gstreamer. I'm trying to use the *Tracer* subsystem but I don't<br>
know how to interpret the measurements.<br>
<br>
The data:<br>
<br>
- Rasberry Pi 3<br>
- Raspbian Buster<br>
- Raspberry Camera Module V2<br>
- gstreamer, version 1.17.1<br>
- Capture data: Motion-JPEG, 426x240 and 429000 bps of bitrate<br>
<br>
*Pipeline 1 (15 fps):*<br>
<br>
/opt/vc/bin/raspivid -t 60000 -cd MJPEG -w 426 -h 240 -fps 15 -b 429000 -vf<br>
-hf \<br>
-o - | GST_DEBUG="GST_TRACER:7" GST_DEBUG_FILE=240.log<br>
GST_TRACERS="latency(flags=pipeline+element+reported)" \<br>
gst-launch-1.0 -v fdsrc do-timestamp=true ! \<br>
"image/jpeg,width=426,height=240,framerate=15/1,payload=(int)26" ! \<br>
jpegparse ! rtpjpegpay ! \<br>
udpsink port=13000 host=192.168.1.111 && gst-stats-1.0 240.log<br>
<br>
*Measure (pipeline 1):*<br>
<br>
Latency Statistics:<br>
0x20340f0.fdsrc0.src|0x20ff150.udpsink0.sink: mean=0:00:00.001291400<br>
min=0:00:00.000751041 max=0:00:00.007009887<br>
<br>
Element Latency Statistics:<br>
0x21040f0.capsfilter0.src: mean=0:00:00.000236961 min=0:00:00.000096875<br>
max=0:00:00.000554530<br>
0x20ec2d0.jpegparse0.src: mean=0:00:00.000558282 min=0:00:00.000346250<br>
max=0:00:00.006139732<br>
0x20f80b8.rtpjpegpay0.src: mean=0:00:00.000458047 min=0:00:00.000248542<br>
max=0:00:00.004859044<br>
<br>
Element Reported Latency:<br>
0x20340f0.fdsrc0: min=0:00:00.000000000 max=0:00:00.000000000<br>
ts=0:00:00.644349393<br>
0x21040f0.capsfilter0: min=0:00:00.000000000 max=0:00:00.000000000<br>
ts=0:00:00.644468508<br>
0x20ec2d0.jpegparse0: min=0:00:00.000000000 max=0:00:00.000000000<br>
ts=0:00:00.644528403<br>
0x20f80b8.rtpjpegpay0: min=0:00:00.000000000 max=99:99:99.999999999<br>
ts=0:00:00.644595383<br>
<br>
<br>
*Pipeline 2(rpicamsrc, 30 fps):*<br>
<br>
GST_DEBUG="GST_TRACER:7" GST_DEBUG_FILE=240p.log<br>
GST_TRACERS="latency(flags=pipeline+element+reported)" \<br>
gst-launch-1.0 rpicamsrc preview=0 rotation=180 bitrate=4429000 ! \<br>
image/jpeg,width=1270, height=720,framerate=30 ! \<br>
jpegparse ! rtpjpegpay ! port=13000 host=192.168.1.111 && gst-stats-1.0<br>
240p.log<br>
<br>
*Measure (pipeline 2):*<br>
<br>
Latency Statistics:<br>
0x485738.rpicamsrc0.src|0x550e98.udpsink0.sink: mean=0:00:00.002029413<br>
min=0:00:00.000996300 max=0:00:00.007922902<br>
<br>
Element Latency Statistics:<br>
0x556118.capsfilter0.src: mean=0:00:00.000220204 min=0:00:00.000116354<br>
max=0:00:00.000882290<br>
0x53c2e8.jpegparse0.src: mean=0:00:00.000840342 min=0:00:00.000421510<br>
max=0:00:00.006688112<br>
0x54a0c8.rtpjpegpay0.src: mean=0:00:00.000968794 min=0:00:00.000458436<br>
max=0:00:00.006141604<br>
<br>
Element Reported Latency:<br>
0x485738.rpicamsrc0: min=0:00:00.000000000 max=0:00:00.000000000<br>
ts=0:00:00.473207970<br>
0x556118.capsfilter0: min=0:00:00.000000000 max=0:00:00.000000000<br>
ts=0:00:00.473302137<br>
0x53c2e8.jpegparse0: min=0:00:00.000000000 max=0:00:00.000000000<br>
ts=0:00:00.473359064<br>
0x54a0c8.rtpjpegpay0: min=0:00:00.000000000 max=0:00:00.000000000<br>
ts=0:00:00.473419220<br>
<br>
I understand that in the first pipeline, it takes *644.3* ms o receive the<br>
data stream from the camera and in the second pipeline it takes *473.2* ms.<br>
<br>
Is this interpretation of the data correct? If so, why does it take so long<br>
to acquire the flow?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">This is not what the latency tracer measure. It mesure the latency added by the pipeline while processing the frames. In your case, it says you have about 1ms latency, which is near to nothing. Basically it's the average processing delay. This is considered zero-latency.</div><div dir="auto"><br></div><div dir="auto">The ts= value is the time the trace was recorded. Reported latency can be changed at run-time by elements, so we have to add this information here in order to differentiate the records. What it says is that it took 473 and 644ms for the pipeline to reach a point we're latency could be calculated. This is likely close to when the pipeline started streaming, but this is just correlation, and not the intended information.</div><div dir="auto"><br></div><div dir="auto">Measure the glass to glass latency is not possible from a tracer. You need special streams and equipment to achieve this.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers.<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>