[Libav-user] Why does sws_scale runtime depend on calling frequency?

Paul Sanderson nannapie at hotmail.co.uk
Sat Jun 1 20:33:19 EEST 2019


I think Carl’s point is interesting. It could be something funky with sleep which if I remember right is a Linux/ Debian based call. Maybe try a different method of making your program hang and see if the problem persists.

All my best,

Paul

Sent from the top a castle using a moderately sized European swallow

On 1 Jun 2019, at 16:17, Lukas Bommes <lukas.bommes at gmx.de<mailto:lukas.bommes at gmx.de>> wrote:

I'm just buffled because OpenCV uses the same code  (in fact I copied the retrieveFrame funtion from the videoio module 1:1) 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.
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.
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.

But maybe someone else has noticed a similar issue with sws_scale in FFMPEG 4.1 before.

Lukas


On 1 Jun 2019 7:04 pm, Carl Eugen Hoyos <ceffmpeg at gmail.com<mailto:ceffmpeg at gmail.com>> wrote:

Am Do., 30. Mai 2019 um 11:59 Uhr schrieb lukas <lukas.bommes at gmx.de<mailto:lukas.bommes at gmx.de>>:

> I wrote a program which extracts motion vectors from a video stream and
> encountered the problem that the runtime of sws_scale changes depending
> on whether I put a sleep command in the main loop of the caller.

Shouldn't you ask this your CPU provider?

Carl Eugen
_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org<mailto:Libav-user at ffmpeg.org>
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
libav-user-request at ffmpeg.org<mailto:libav-user-request at ffmpeg.org> with subject "unsubscribe".

_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org<mailto:Libav-user at ffmpeg.org>
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
libav-user-request at ffmpeg.org<mailto:libav-user-request at ffmpeg.org> with subject "unsubscribe".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190601/b4fd0e14/attachment.html>


More information about the Libav-user mailing list