FFmpegInteropX icon indicating copy to clipboard operation
FFmpegInteropX copied to clipboard

Insane memory useage when using loop filter

Open lukasf opened this issue 2 years ago • 3 comments

I saw memory usage skyrocketing when using loop video filter (#304):

loop=loop=-1:size=1:start=0

Not sure what is going on. Buffers are allocated and freed, looks normal to me, but something is wrong. Need to investigate with memory profiler.

lukasf avatar Sep 25 '22 15:09 lukasf

I had some pc issues this week, I'll take a look in the weekend.

brabebhin avatar Oct 10 '22 18:10 brabebhin

As a side note i encountered a similar issue with regular playback as well, on w11.

Sometimes video would stop rendering while audio and subs would still go on. Memory would go up over time as video frames are buffered, as well as disk usage going up (probably to fetch said frames).

I guess you are on w11 as well? I don't have a w10 machine anymore.

brabebhin avatar Oct 12 '22 19:10 brabebhin

This seems to be because of timestamps. FFMpeg loop filter seems to actually loop timestamps as well. Using your example someplace in the file I keep getting the same timestamp for the video sample

35201833

This will cause them to buffer very quickly and memory does go up spectacularly.

brabebhin avatar Oct 15 '22 13:10 brabebhin