Hi,
when I am testing it with Debian testing distribution and the following ffmpeg versions (non static build) I have no memory problems:
ffmpeg version 4.4.1-3+b2 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 11 (Debian 11.2.0-18)
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Maybe it has to do something with ffmpeg version?
Have you tried it with build in ffmpeg (static build) or system ffmpeg (non-static)?
I am using the following build parameters: --enable-libav --disable-hdhomerun_client --disable-hdhomerun_static --disable-ffmpeg_static --disable-libffmpeg_static --enable-libx264 --enable-libx265 --enable-vaapi --enable-libfdkaac --disable-libx264_static --disable-libx265_static --disable-libfdkaac_static --disable-libvorbis_static --disable-libtheora_static --disable-libvpx_static --disable-libopus_static --enable-libav
I guess with static build memory problems are gone.