[FFmpeg-trac] #10712(ffmpeg:new): scale + overlay OOM after stream EOF
FFmpeg
trac at avcodec.org
Fri Dec 1 15:21:23 EET 2023
#10712: scale + overlay OOM after stream EOF
-------------------------------------+-------------------------------------
Reporter: Leon | Type: defect
Status: new | Priority: normal
Component: ffmpeg | Version: git-
Keywords: scale | master
overlay oom | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
As in #10698, but now using the `scale` filter and `overlay` with
`shortest=1`, ffmpeg starts using a lot of memory once the stream passed
via `scale` to `overlay` goes EOF.
How to reproduce:
Create a test mkv that will be used as an input for the transcode (lower
values for -t suffice, since the subtitles are EOF immediately, but too
low values may result in the transcode finishing before a significant
increase in memory usage can be observed):
{{{
% ffmpeg -f lavfi -i color -f lavfi -i anullsrc=sample_rate=1 -t 5000 -c:v
libx264 test.mkv
}}}
Download the subtitles attached to #10698 and extract them.
Run the transcode:
{{{
ffmpeg -i test.mkv -i test.idx -map 0:0 -map 0:1 -map -0:0 -filter_complex
'[1:0]scale[sub];[0:0][sub]overlay=shortest=1' out.mkv
}}}
Additional information:
{{{
% ffmpeg -version
ffmpeg version N-112745-gda3ce21f68 Copyright (c) 2000-2023 the FFmpeg
developers
built with gcc 13.2.1 (GCC) 20230801
configuration: --prefix=/usr --disable-static --disable-stripping
--disable-htmlpages --enable-amf --enable-avisynth --enable-cuda-llvm
--enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl
--enable-ladspa --enable-libaom --enable-libass --enable-libbluray
--enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype
--enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack
--enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-
libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e
--enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt
--enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2
--enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg
--enable-opengl --enable-shared --enable-version3 --enable-vulkan
libavutil 58. 32.100 / 58. 32.100
libavcodec 60. 33.100 / 60. 33.100
libavformat 60. 17.100 / 60. 17.100
libavdevice 60. 4.100 / 60. 4.100
libavfilter 9. 13.100 / 9. 13.100
libswscale 7. 6.100 / 7. 6.100
libswresample 4. 13.100 / 4. 13.100
libpostproc 57. 4.100 / 57. 4.100
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10712>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list