[FFmpeg-trac] #9073(undetermined:new): ffmpeg memory overflow when trimming 4K clips

FFmpeg trac at avcodec.org
Sun Jan 24 20:58:53 EET 2021


#9073: ffmpeg memory overflow when trimming 4K clips
-------------------------------------+-------------------------------------
             Reporter:  andykais     |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:
             Keywords:  memory       |               Blocked By:
  filter_complex inputs              |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by andykais):

 So apologies, but I think I need some guidance here. I have googled
 around, and found next to nothing showing how graphmonitor and
 agraphmonitor are supposed to be used. I dropped it in the video inputs,
 and see values of zero for everything. I added it to the audio inputs
 (shown below) and I see no graph monitor display on the output. Also,
 despite only providing audio streams to the filtergraph, I still see video
 in the output. Do I have to specify (`v=0`?) Does the video automatically
 get inferred?

 {{{
   ffmpeg \
     -v 9 -loglevel 99 \
     -ss 0 -t 10 -i './samples/oom-large-4k-file/Norway 4K - Winter in
 Norway - Relaxing Music with AMAZING Beautiful Nature and sound-
 voprky8BrPw.mkv' \
     -ss 20 -t 10 -i './samples/oom-large-4k-file/Norway 4K - Winter in
 Norway - Relaxing Music with AMAZING Beautiful Nature and sound-
 voprky8BrPw.mkv' \
     -ss 40 -t 10 -i './samples/oom-large-4k-file/Norway 4K - Winter in
 Norway - Relaxing Music with AMAZING Beautiful Nature and sound-
 voprky8BrPw.mkv' \
     -ss 60 -t 10 -i './samples/oom-large-4k-file/Norway 4K - Winter in
 Norway - Relaxing Music with AMAZING Beautiful Nature and sound-
 voprky8BrPw.mkv' \
     -ss 80 -t 10 -i './samples/oom-large-4k-file/Norway 4K - Winter in
 Norway - Relaxing Music with AMAZING Beautiful Nature and sound-
 voprky8BrPw.mkv' \
     -ss 100 -t 10 -i './samples/oom-large-4k-file/Norway 4K - Winter in
 Norway - Relaxing Music with AMAZING Beautiful Nature and sound-
 voprky8BrPw.mkv' \
     -ss 120 -t 10 -i './samples/oom-large-4k-file/Norway 4K - Winter in
 Norway - Relaxing Music with AMAZING Beautiful Nature and sound-
 voprky8BrPw.mkv' \
     -ss 140 -t 10 -i './samples/oom-large-4k-file/Norway 4K - Winter in
 Norway - Relaxing Music with AMAZING Beautiful Nature and sound-
 voprky8BrPw.mkv' \
     -ss 160 -t 10 -i './samples/oom-large-4k-file/Norway 4K - Winter in
 Norway - Relaxing Music with AMAZING Beautiful Nature and sound-
 voprky8BrPw.mkv' \
     -ss 180 -t 10 -i './samples/oom-large-4k-file/Norway 4K - Winter in
 Norway - Relaxing Music with AMAZING Beautiful Nature and sound-
 voprky8BrPw.mkv' \
     -filter_complex
 'color=s=3840x2160:color=black:duration=100.00900000000001[base];
       [0:a] agraphmonitor, asetpts=PTS-STARTPTS, adelay=0:all=1,
 volume=1[a_in_0];
       [1:a] agraphmonitor, asetpts=PTS-STARTPTS, adelay=10001:all=1,
 volume=1[a_in_1];
       [2:a] agraphmonitor, asetpts=PTS-STARTPTS, adelay=20002:all=1,
 volume=1[a_in_2];
       [3:a] agraphmonitor, asetpts=PTS-STARTPTS, adelay=30003:all=1,
 volume=1[a_in_3];
       [4:a] agraphmonitor, asetpts=PTS-STARTPTS, adelay=40004:all=1,
 volume=1[a_in_4];
       [5:a] agraphmonitor, asetpts=PTS-STARTPTS,
 adelay=50004.99999999999:all=1, volume=1[a_in_5];
       [6:a] agraphmonitor, asetpts=PTS-STARTPTS,
 adelay=60005.99999999999:all=1, volume=1[a_in_6];
       [7:a] agraphmonitor, asetpts=PTS-STARTPTS, adelay=70007:all=1,
 volume=1[a_in_7];
       [8:a] agraphmonitor, asetpts=PTS-STARTPTS,
 adelay=80008.00000000001:all=1, volume=1[a_in_8];
       [9:a] agraphmonitor, asetpts=PTS-STARTPTS,
 adelay=90009.00000000001:all=1, volume=1[a_in_9];
       [base];
 [a_in_0][a_in_1][a_in_2][a_in_3][a_in_4][a_in_5][a_in_6][a_in_7][a_in_8][a_in_9]
 amix=inputs=10 [audio]' \
     -map '[audio]' \
     template.mp4 -y \
     2> ./samples/oom-large-4k-file/62041061e61fe3c628157f60602dda72
 /ffmpeg-verbose-logs.txt
 }}}
 This command does not cause the crash. The crash is only caused when both
 audio and video streams are present in the filtergraph


 >> Also please consider uploading short input samples which would allow to
 reproduce this memory issue.

 As I said, this input is far too large. I will attach a sample of the
 input, but it is not large enough to cause the crash. To download the
 input that //can// cause the crash, run this command: `youtube-dl
 'https://www.youtube.com/watch?v=voprky8BrPw'`. It is 4.2GB large. This
 requires downloading the utility youtube-dl (https://ytdl-org.github.io
 /youtube-dl/index.html)

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9073#comment:9>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list