Opened 8 years ago

Closed 7 years ago

#5182 closed defect (fixed)

ffmpeg OOM with filters

Reported by: Elon Musk Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:

FFmpeg caches all output frames instead of dumping them out immediately.

How to reproduce:

% ffmpeg -f lavfi -i color=white -vf "zoompan=z='min(zoom+0.0015,1.5)':d=700000:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'" -c:v rawvideo -f null -
ffmpeg version git-2016-01-23-aba45b0 Copyright (c) 2000-2016 the FFmpeg developers
built with clang version 3.7.0 (tags/RELEASE_370/final)
configuration: --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --cc=clang --as=clang --disable-ffserver --disable-ffplay --disable-indevs --disable-outdevs --enable-gpl --enable-indev=x11grab_xcb --enable-indev=lavfi --enable-indev=alsa --enable-nonfree --enable-openssl --enable-outdev=alsa --disable-shared --enable-static --enable-x11grab --enable-ladspa --enable-netcdf --enable-fontconfig --enable-libfreetype --samples=../fate-suite
libavutil      55. 14.100 / 55. 14.100
libavcodec     57. 22.100 / 57. 22.100
libavformat    57. 22.100 / 57. 22.100
libavdevice    57.  0.100 / 57.  0.100
libavfilter     6. 27.100 /  6. 27.100
libswscale      4.  0.100 /  4.  0.100
libswresample   2.  0.101 /  2.  0.101
libpostproc    54.  0.100 / 54.  0.100
Input #0, lavfi, from 'color=white':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Output #0, null, to 'pipe:':
Metadata:
encoder         : Lavf57.22.100
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder         : Lavc57.22.100 rawvideo
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[swscaler @ 0x3458900] Warning: data is not aligned! This can lead to a speedloss
[output stream 0:0 @ 0x3453540] 100 buffers queued in output stream 0:0, something may be wrong.
[output stream 0:0 @ 0x3453540] 1000 buffers queued in output stream 0:0, something may be wrong.
[output stream 0:0 @ 0x3453540] 10000 buffers queued in output stream 0:0, something may be wrong.
^C^C^CReceived > 3 system signals, hard exiting

Same can happen with fps filter and vfr input when there is big time gap between input frames.

Change History (3)

comment:1 by Elon Musk, 8 years ago

Status: newopen

comment:2 by Elon Musk, 8 years ago

Component: undeterminedavfilter

comment:3 by Elon Musk, 7 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.