[FFmpeg-devel] ffmpeg appears to be wasting CPU time

Kieran Kunhya kierank at obe.tv
Fri Apr 7 19:15:56 EEST 2023


On Fri, 7 Apr 2023 at 05:03, Davy Durham <ddurham at davyandbeth.com> wrote:

> After furiously digging through the ffmpeg code (particularly in older
> versions that also exhibit the problem, but where the code is simpler) I
> have found no reason for there to be wasted CPU time.
>
> In my travels, I frustratingly noticed that sometime the problem would
> mysteriously vanish.  And, long story short, I believe I've been chasing
> a phantom.  If, on my local machine w/ 8 cores, I start a process that
> simply spins one CPU, the problem vanishes--that is, now whether running
> ffmpeg at full speed or with a read rate limit, the cumulative CPU
> reported by 'time' is nearly** the same, as one would expect it to be.
>

Are you sure this isn't just your CPU governor and/or the effects of
frequency scaling/C-states?

Kieran


More information about the ffmpeg-devel mailing list