<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 26-07-2022 09:36, Sergio González
via gstreamer-devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CADX23kYV7SAa8L_HNJfsB82CxVp_cBhacaj_-XxxMmWzz54jKA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Dear All,
<div><br>
</div>
<div>I am having an issue when using gstreamer to decode 4K
60fps video in a custom app.</div>
<div><br>
</div>
<div>The pipeline's structure is as follows:</div>
<div><br>
</div>
<div>appsrc ! queue ! typefind ! h265parse ! capsfilter !
avdec_h265 ! queue ! videoconvert ! queue ! appsink</div>
<div><br>
</div>
<div>What I am observing is that when I push buffers to the
appsrc, if the decoding components are linked, there is a high
surge of CPU consumption (as in, 12 of the 16 cores are at
100%). However, if on the same machine I just execute the same
pipeline with gst-launch, the cpu usage is way more reasonable
and the decoding goes smoothly.</div>
<div><br>
</div>
<div>Adding a Probe to the sink and the source pads of the
avdec_h265 tells me that the time between decoding buffers at
the beginning is of about 200ms, but as app keeps decoding, it
soon reaches 600ms.</div>
<div><br>
</div>
<div>Do you have some insight on what might cause this? Maybe I
am missing some property in some of the components?</div>
<div><br>
</div>
<div>Any help would be much appreciated. Let me know if you need
any more information.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Sergio</div>
</div>
</blockquote>
<p><br>
</p>
<p>When running with gst-launch, what source do you use? One
difference might be how you are feeding data to the appsrc. It
might also help to increase the queue sizes, especially after the
decoder; a 4K raw video frame will be larger than the default
queue <a moz-do-not-send="true"
href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-queue.html#GstQueue--max-size-bytes">max-size-bytes</a>
so it will only hold one frame. I would set it to zero so it's
only limited by time and buffers, so you get some more concurrency
in the pipeline. However, that doesn't explain the difference
between your two cases; when running from the command line the
queue would be just as big.</p>
<p>HTH,<br>
Michiel<br>
</p>
</body>
</html>