[FFmpeg-trac] #8956(undetermined:new): af1761f causes OOM

FFmpeg trac at avcodec.org
Wed Oct 28 21:30:06 EET 2020


#8956: af1761f causes OOM
-------------------------------------+-------------------------------------
               Reporter:  llogan     |                  Owner:
                   Type:  defect     |                 Status:  new
               Priority:  important  |              Component:
                Version:  git-       |  undetermined
  master                             |               Keywords:  regression
             Blocked By:             |               Blocking:
Reproduced by developer:  0          |  Analyzed by developer:  0
-------------------------------------+-------------------------------------
 Regression since af1761f7b5b1b72197dc40934953b775c2d951cc can cause OOM
 and crash.

 Two examples. In both I manually stopped the encoding before all 16 GB RAM
 consumed and computer freezes.

 {{{
 $ ./ffmpeg -f lavfi -i testsrc=s=1280x720 -filter_complex
 "[0][0]concat=n=2:v=1:a=0" -f null -
 ffmpeg version N-99792-g37d742b607 Copyright (c) 2000-2020 the FFmpeg
 developers
   built with gcc 10.2.0 (GCC)
   configuration:
   libavutil      56. 60.100 / 56. 60.100
   libavcodec     58.112.100 / 58.112.100
   libavformat    58. 64.100 / 58. 64.100
   libavdevice    58. 11.102 / 58. 11.102
   libavfilter     7. 88.100 /  7. 88.100
   libswscale      5.  8.100 /  5.  8.100
   libswresample   3.  8.100 /  3.  8.100
 Input #0, lavfi, from 'testsrc=s=1280x720':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1280x720
 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 (rawvideo) -> concat:in0:v0
   Stream #0:0 (rawvideo) -> concat:in1:v0
   concat -> Stream #0:0 (wrapped_avframe)
 Press [q] to stop, [?] for help
 Output #0, null, to 'pipe:':
   Metadata:
     encoder         : Lavf58.64.100
     Stream #0:0: Video: wrapped_avframe, rgb24, 1280x720 [SAR 1:1 DAR
 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
     Metadata:
       encoder         : Lavc58.112.100 wrapped_avframe
 [out_0_0 @ 0x5620a99660c0] 100 buffers queued in out_0_0, something may be
 wrong.
 [out_0_0 @ 0x5620a99660c0] 1000 buffers queued in out_0_0, something may
 be wrong.
 frame= 5101 fps=303 q=-0.0 Lsize=N/A time=00:03:24.04 bitrate=N/A
 speed=12.1x
 video:2670kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 }}}

 In the above example the memory consumption is avoided by using two of the
 same inputs instead of referring to the same input twice in the
 filtergraph.

 {{{
 $ ./ffmpeg -f lavfi -i testsrc=s=1280x720 -f lavfi -i testsrc=s=1280x720
 -filter_complex "[0:v]nullsink;[1:v]nullsink" -map 0 -f null -
 ffmpeg version N-99792-g37d742b607 Copyright (c) 2000-2020 the FFmpeg
 developers
   built with gcc 10.2.0 (GCC)
   configuration:
   libavutil      56. 60.100 / 56. 60.100
   libavcodec     58.112.100 / 58.112.100
   libavformat    58. 64.100 / 58. 64.100
   libavdevice    58. 11.102 / 58. 11.102
   libavfilter     7. 88.100 /  7. 88.100
   libswscale      5.  8.100 /  5.  8.100
   libswresample   3.  8.100 /  3.  8.100
 Input #0, lavfi, from 'testsrc=s=1280x720':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1280x720
 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
 Input #1, lavfi, from 'testsrc=s=1280x720':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #1:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1280x720
 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 (rawvideo) -> nullsink (graph 0)
   Stream #1:0 (rawvideo) -> nullsink (graph 0)
   Stream #0:0 -> #0:0 (rawvideo (native) -> wrapped_avframe (native))
 Press [q] to stop, [?] for help
 Output #0, null, to 'pipe:':
   Metadata:
     encoder         : Lavf58.64.100
     Stream #0:0: Video: wrapped_avframe, rgb24, 1280x720 [SAR 1:1 DAR
 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
     Metadata:
       encoder         : Lavc58.112.100 wrapped_avframe
 frame= 4580 fps=299 q=-0.0 Lsize=N/A time=00:03:03.20 bitrate=N/A speed=
 12x
 video:2397kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 }}}

 Not sure if it is a duplicate of other af1761f related tickets: #6323,
 #6472, #6375.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8956>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list