<div dir='auto'><div>I'm just buffled because OpenCV uses the same code <span style="font-family: sans-serif;"> (in fact I copied the retrieveFrame funtion from the videoio module 1:1)</span> and it does not show this weird behaviour. There, the runtime of sws_scale is constant regardless of the calling frequency and retrieving one frame takes always around 1.3 ms.</div><div dir="auto">However, my OpenCV build (version 4.1) uses FFMPEG 3.4.6, not 4.1. So, I'm gonna try building my code with FFMPEG 3.4.6 and see if the problem persists. </div><div dir="auto">Alternatively, I add a function to the OpenCV videoio module which retrieves frame + motion vectors. However, altering the OpenCV API brings a lot of other challenges.</div><div dir="auto"><br></div><div dir="auto">But maybe someone else has noticed a similar issue with sws_scale in FFMPEG 4.1 before.</div><div dir="auto"><br><div class="gmail_extra" dir="auto">Lukas</div><div class="gmail_extra" dir="auto"><br></div><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On 1 Jun 2019 7:04 pm, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Am Do., 30. Mai 2019 um 11:59 Uhr schrieb lukas <lukas.bommes@gmx.de>:</p>
<p dir="ltr">> I wrote a program which extracts motion vectors from a video stream and<br>
> encountered the problem that the runtime of sws_scale changes depending<br>
> on whether I put a sleep command in the main loop of the caller.</p>
<p dir="ltr">Shouldn't you ask this your CPU provider?</p>
<p dir="ltr">Carl Eugen<br>
_______________________________________________<br>
Libav-user mailing list<br>
Libav-user@ffmpeg.org<br>
https://ffmpeg.org/mailman/listinfo/libav-user</p>
<p dir="ltr">To unsubscribe, visit link above, or email<br>
libav-user-request@ffmpeg.org with subject "unsubscribe".</p>
</blockquote></div><br></div></div></div>