<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Hi all,</span><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">We are using textoverlay in our pipeline to dynamically update text on a camera feed. It is not the optimal way to do this since it introduces a very high CPU overhead (without the text overlay it uses ~20% with the overlay its ~60% in 1080p at 30fps) but there were no other big CPU users so it was not crucial. </div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">After 6-8 hours of operation we see that the stream is stopped and the CPU usage of the pipeline drops to 1% of CPU.</div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Our pipeline:</div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><div class="" style="background-color: rgb(255, 255, 255); line-height: 15px;"><div class="" style="color: rgb(54, 54, 54); font-family: Menlo, Monaco, "Courier New", monospace; font-size: 10px; font-weight: 800; white-space: pre;"><span class="" style="color: rgb(162, 86, 55);">nvarguscamerasrc sensor-id=0 sensor-mode=0 gainrange="1 16" ispdigitalgainrange="1 1"</span></div><div class="" style="color: rgb(54, 54, 54); font-family: Menlo, Monaco, "Courier New", monospace; font-size: 10px; font-weight: 800; white-space: pre;"><span class="" style="color: rgb(162, 86, 55);">        ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1</span></div><div class="" style="color: rgb(54, 54, 54); font-family: Menlo, Monaco, "Courier New", monospace; font-size: 10px; font-weight: 800; white-space: pre;"><span class="" style="color: rgb(162, 86, 55);">        ! nvvidconv ! textoverlay name=text_overlay ! video/x-raw,format=I420 </span></div><div class=""><span class="" style="color: rgb(162, 86, 55); font-family: Menlo, Monaco, "Courier New", monospace; font-size: 10px; font-weight: 800; white-space: pre;">        ! nvvidconv ! nvv4l2vp8enc bitrate=</span><font color="#a25637" face="Menlo, Monaco, Courier New, monospace" size="1" class=""><span class="" style="caret-color: rgb(162, 86, 55); font-weight: 800; white-space: pre;">8000000</span></font><span class="" style="color: rgb(162, 86, 55); font-family: Menlo, Monaco, "Courier New", monospace; font-size: 10px; font-weight: 800; white-space: pre;"> control-rate=1 ! rtpvp8pay mtu=1400 ! udpsink auto-multicast=true clients=<DCL_UDP_SINK_CLIENTS></span></div></div></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">We tried to debug it in:</div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><ul class="MailOutline"><li class="">info log we dont have any printouts (<span class="">unfortunately we are not able to set the debug level higher since logs would fill up the disk</span>)</li><li class="">we added the 'silent=false' option to 'nvarguscamerasrc' to verify that frames still arriving from the camera but they do</li><li class="">did some exploratory testing to remove elements from the pipeline and if we remove the textoverlay the issue is not happening</li></ul><div class=""><br class=""></div></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">This is how I get a reference to the overlay and set it up:</div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><div class="" style="color: rgb(54, 54, 54); background-color: rgb(255, 255, 255); font-family: Menlo, Monaco, "Courier New", monospace; font-weight: 800; font-size: 10px; line-height: 15px; white-space: pre;"><br class=""><div class="">    textOverlay = <span class="" style="color: rgb(99, 99, 36);">gst_bin_get_by_name</span>(<span class="" style="color: rgb(99, 99, 36);">GST_BIN</span>(pipelineElement), <span class="" style="color: rgb(99, 99, 36);">getName</span>().<span class="" style="color: rgb(99, 99, 36);">c_str</span>());</div><br class=""><div class="">    <span class="" style="color: rgb(99, 99, 36);">g_assert_nonnull</span>(textOverlay);</div><br class=""><div class="">    <span class="" style="color: rgb(99, 99, 36);">g_object_set</span>(textOverlay,</div><div class="">        <span class="" style="color: rgb(162, 86, 55);">"font-desc"</span>, <span class="" style="color: rgb(9, 89, 132);">FONT_TYPE</span>.<span class="" style="color: rgb(99, 99, 36);">c_str</span>(),</div><div class="">        <span class="" style="color: rgb(162, 86, 55);">"shaded-background"</span>, <span class="" style="color: rgb(63, 151, 223);">true</span>,</div><div class="">        <span class="" style="color: rgb(162, 86, 55);">"shading-value"</span>, <span class="" style="color: rgb(73, 104, 57);">40</span>,</div><div class="">        <span class="" style="color: rgb(162, 86, 55);">"xpos"</span>, <span class="" style="color: rgb(73, 104, 57);">0.0</span>,</div><div class="">        <span class="" style="color: rgb(162, 86, 55);">"ypos"</span>, <span class="" style="color: rgb(73, 104, 57);">0.0</span>,</div><div class="">        <span class="" style="color: rgb(162, 86, 55);">"wrap-mode"</span>, -<span class="" style="color: rgb(73, 104, 57);">1</span>,</div><div class="">        <span class="" style="color: rgb(162, 86, 55);">"halignment"</span>,<span class="" style="color: rgb(146, 205, 120);"> /* position */</span> <span class="" style="color: rgb(73, 104, 57);">0</span>,</div><div class="">        <span class="" style="color: rgb(162, 86, 55);">"valignment"</span>,<span class="" style="color: rgb(146, 205, 120);"> /* position */</span> <span class="" style="color: rgb(73, 104, 57);">3</span>,</div><div class="">        <span class="" style="color: rgb(63, 151, 223);">NULL</span>);</div></div></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">and this is how I update the text on it from a thread:</div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><div class="" style="color: rgb(54, 54, 54); background-color: rgb(255, 255, 255); font-family: Menlo, Monaco, "Courier New", monospace; font-weight: 800; font-size: 10px; line-height: 15px; white-space: pre;"><div class=""></div><div class="">            <span class="" style="color: rgb(99, 99, 36);">g_object_set</span>(textOverlay, <span class="" style="color: rgb(162, 86, 55);">"text"</span>, <span class="" style="color: rgb(9, 89, 132);">firstLine</span>.<span class="" style="color: rgb(99, 99, 36);">c_str</span>(), <span class="" style="color: rgb(63, 151, 223);">NULL</span>);</div></div></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">After each cycle I call 'clear' on the string to empty the previous content.</div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Also after each update we sleep the thread for 0.3 seconds, we tried to play around with the refresh rate but it does not seem to have any effect.</div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Do you have any idea what can cause this? What I am doing wrong here? Or any suggestions how could we debug it further?</div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Thanks for your help!</div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Bests,</div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Peter</div></body></html>