[FFmpeg-trac] #11217(ffmpeg:new): -ss causing a substantial memory increase

FFmpeg trac at avcodec.org
Tue Oct 1 21:01:08 EEST 2024


#11217: -ss causing a substantial memory increase
-------------------------------------+-------------------------------------
             Reporter:  Bryce        |                     Type:  defect
  Chester Newman                     |
               Status:  new          |                 Priority:  important
            Component:  ffmpeg       |                  Version:  7.1
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 There appears to be a behavior change or bug introduced between FFmpeg 6.1
 and 7.0/7.1 when using the “-ss” argument that is causing a substantial
 memory increase.
 Running the command below using FFmpeg 6.1 memory usage is about 500MB –
 which is expected.
 Running the command below using FFmpeg 7.0/7.1 memory usage is about 3GB –
 which is not expected.
 If I remove the “-ss” argument when running on FFmepg 7.0 or 7.1 the
 memory footprint is the same as 6.1. I can reproduce this on Linux(Ubuntu)
 and Apple M2. I can reproduce the memory increase using .mxf, mov and .mp4
 as an input file.

 How to reproduce:
 {{{
 ffmpeg -report -v 9 -loglevel 99 -y -i 1951279840.mov  \
 -filter_complex
 "[0:v:0]scale='768:432':force_original_aspect_ratio=decrease:force_divisible_by=2[jpg-600];[0:v:0]scale='1280:640'[mp4-640]"
 \
 -map "[jpg-600]" -ss 67 -f image2 -q:v 5 -update 1 -frames:v 1
 /tmp/jpg-600-123456.jpg \
 -map "[mp4-640]" -map_metadata -1 -f mp4 -vcodec libx264 -profile:v main
 -level 3.1 -crf 23 -b:v 2500K -movflags faststart -refs 4 -pix_fmt yuv420p
 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -preset medium
 /tmp/mp4-640-23456.mp4
 }}}
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11217>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list