[FFmpeg-user] When using the multi overlay filter, the memory usage becomes excessively high.

ahqzy ahqzy at 163.com
Wed Dec 18 09:14:34 EET 2024


Hi all,

      When stitching four 1080p videos, multi-threaded decoding is used, and a single thread writes to their respective buffersrc filters. During the process, it was observed that memory usage rapidly increases (memory usage remains normal when only decoding is performed, without calling av_buffersrc_write_frame and av_buffersink_get_frame). Additionally, even after calling av_buffersink_get_frame, the memory does not decrease, even when av_frame_unref is invoked. It appears that there is a fixed buffer in the filter chain that is not being cleared. How can this issue be resolved?

The code is attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: overlay.cpp
Type: text/x-c
Size: 30811 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20241218/e6398bfb/attachment.bin>


More information about the ffmpeg-user mailing list