Problem: Huge memory leak is seen when using libvmaf filter. Note: The command uses "-vframes 10" as I wanted to limit the log size. Please run the command without "-vframes" and check the output of "top" command to reproduce the issue.
Command to reproduce the issue: ffmpeg started on 2017-11-09 at 17:08:39 Report written to "ffmpeg-20171109-170839.log" Command line: ./ffmpeg -v 9 -loglevel 99 -report -f lavfi -i testsrc2 -f lavfi -i testsrc2 -vframes 10 -lavfi "libvmaf=model_path=model/vmaf_v0.6.1.pkl" -f null - ffmpeg version N-88671-g7b7775a604-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.4.0 (Debian 6.4.0-9) 20171026 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg libavutil 56. 0.100 / 56. 0.100 libavcodec 58. 1.100 / 58. 1.100 libavformat 58. 2.100 / 58. 2.100 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 0.101 / 7. 0.101 libswscale 5. 0.101 / 5. 0.101 libswresample 3. 0.101 / 3. 0.101 libpostproc 55. 0.100 / 55. 0.100 Splitting the commandline. Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Reading option '-f' ... matched as option 'f' (force format) with argument 'lavfi'. Reading option '-i' ... matched as input url with argument 'testsrc2'. Reading option '-f' ... matched as option 'f' (force format) with argument 'lavfi'. Reading option '-i' ... matched as input url with argument 'testsrc2'. Reading option '-vframes' ... matched as option 'vframes' (set the number of video frames to output) with argument '10'. Reading option '-lavfi' ... matched as option 'lavfi' (create a complex filtergraph) with argument 'libvmaf=model_path=model/vmaf_v0.6.1.pkl'. Reading option '-f' ... matched as option 'f' (force format) with argument 'null'. Reading option '-' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option v (set logging level) with argument 9. Applying option loglevel (set logging level) with argument 99. Applying option report (generate a report) with argument 1. Applying option lavfi (create a complex filtergraph) with argument libvmaf=model_path=model/vmaf_v0.6.1.pkl. Successfully parsed a group of options. Parsing a group of options: input url testsrc2. Applying option f (force format) with argument lavfi. Successfully parsed a group of options. Opening an input file: testsrc2. detected 8 logical cores [Parsed_testsrc2_0 @ 0x573e8c0] size:320x240 rate:25/1 duration:-1.000000 sar:1/1 [AVFilterGraph @ 0x573d360] query_formats: 2 queried, 1 merged, 0 already done, 0 delayed [lavfi @ 0x573c9c0] All info found Input #0, lavfi, from 'testsrc2': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0, 1, 1/25: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 0/1, 25 tbr, 25 tbn, 25 tbc Successfully opened the file. Parsing a group of options: input url testsrc2. Applying option f (force format) with argument lavfi. Successfully parsed a group of options. Opening an input file: testsrc2. [Parsed_testsrc2_0 @ 0x577d200] size:320x240 rate:25/1 duration:-1.000000 sar:1/1 [AVFilterGraph @ 0x5740b40] query_formats: 2 queried, 1 merged, 0 already done, 0 delayed [lavfi @ 0x577b860] All info found Input #1, lavfi, from 'testsrc2': Duration: N/A, start: 0.000000, bitrate: N/A Stream #1:0, 1, 1/25: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 0/1, 25 tbr, 25 tbn, 25 tbc Successfully opened the file. [Parsed_libvmaf_0 @ 0x57baa60] Setting 'model_path' to value 'model/vmaf_v0.6.1.pkl' Parsing a group of options: output url -. Applying option vframes (set the number of video frames to output) with argument 10. Applying option f (force format) with argument null. Successfully parsed a group of options. Opening an output file: -. Successfully opened the file. Stream mapping: Stream #0:0 (rawvideo) -> libvmaf:main Stream #1:0 (rawvideo) -> libvmaf:reference libvmaf -> Stream #0:0 (wrapped_avframe) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) [rawvideo @ 0x5740700] PACKET SIZE: 115200, STRIDE: 480 cur_dts is invalid (this is harmless if it occurs once at the start per stream) [rawvideo @ 0x57b96e0] PACKET SIZE: 115200, STRIDE: 480 [Parsed_libvmaf_0 @ 0x57bffc0] Setting 'model_path' to value 'model/vmaf_v0.6.1.pkl' [graph 0 input from stream 0:0 @ 0x57c0c80] Setting 'video_size' to value '320x240' [graph 0 input from stream 0:0 @ 0x57c0c80] Setting 'pix_fmt' to value '0' [graph 0 input from stream 0:0 @ 0x57c0c80] Setting 'time_base' to value '1/25' [graph 0 input from stream 0:0 @ 0x57c0c80] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 0x57c0c80] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 0x57c0c80] Setting 'frame_rate' to value '25/1' [graph 0 input from stream 0:0 @ 0x57c0c80] w:320 h:240 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2 [graph 0 input from stream 1:0 @ 0x57c19c0] Setting 'video_size' to value '320x240' [graph 0 input from stream 1:0 @ 0x57c19c0] Setting 'pix_fmt' to value '0' [graph 0 input from stream 1:0 @ 0x57c19c0] Setting 'time_base' to value '1/25' [graph 0 input from stream 1:0 @ 0x57c19c0] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 1:0 @ 0x57c19c0] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 1:0 @ 0x57c19c0] Setting 'frame_rate' to value '25/1' [graph 0 input from stream 1:0 @ 0x57c19c0] w:320 h:240 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2 [AVFilterGraph @ 0x57bf2e0] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed [Parsed_libvmaf_0 @ 0x57bffc0] [framesync @ 0x57c00c8] Selected 1/25 time base [Parsed_libvmaf_0 @ 0x57bffc0] [framesync @ 0x57c00c8] Sync level 2 Output #0, null, to 'pipe:': Metadata: encoder : Lavf58.2.100 Stream #0:0, 0, 1/25: Video: wrapped_avframe, 1 reference frame, yuv420p, 320x240 [SAR 1:1 DAR 4:3], 0/1, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default) Metadata: encoder : Lavc58.1.100 wrapped_avframe [rawvideo @ 0x5740700] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x57b96e0] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x5740700] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x57b96e0] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x5740700] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x57b96e0] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x5740700] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x57b96e0] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x5740700] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x57b96e0] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x5740700] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x57b96e0] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x5740700] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x57b96e0] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x5740700] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x57b96e0] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x5740700] PACKET SIZE: 115200, STRIDE: 480 [rawvideo @ 0x57b96e0] PACKET SIZE: 115200, STRIDE: 480 No more output streams to write to, finishing. [Parsed_libvmaf_0 @ 0x57bffc0] [framesync @ 0x57c00c8] Sync level 1 [Parsed_libvmaf_0 @ 0x57bffc0] [framesync @ 0x57c00c8] Sync level 0 frame= 10 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=1.37x video:5kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Input file #0 (testsrc2): Input stream #0:0 (video): 10 packets read (1152000 bytes); 10 frames decoded; Total: 10 packets (1152000 bytes) demuxed Input file #1 (testsrc2): Input stream #1:0 (video): 10 packets read (1152000 bytes); 10 frames decoded; Total: 10 packets (1152000 bytes) demuxed Output file #0 (pipe:): Output stream #0:0 (video): 10 frames encoded; 10 packets muxed (5280 bytes); Total: 10 packets (5280 bytes) muxed 20 frames successfully decoded, 0 decoding errors [libvmaf @ 0x57c00c0] VMAF score: 99.738520
_______________________________________________ FFmpeg-trac mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-trac
