From 3f212cea31ba53b47241ef8611b05e1036b1a7be Mon Sep 17 00:00:00 2001 From: Ryan May Date: Mon, 12 Mar 2018 13:31:24 -0600 Subject: [PATCH] Backport PR #10739: FIX: ffmpeg logging level --- lib/matplotlib/animation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index f288e3892016..e2e6f51e706f 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -669,8 +669,9 @@ def _args(self): '-s', '%dx%d' % self.frame_size, '-pix_fmt', self.frame_format, '-r', str(self.fps)] # Logging is quieted because subprocess.PIPE has limited buffer size. - - if (_log.getEffectiveLevel() < logging.DEBUG): + # If you have a lot of frames in your animation and set logging to + # DEBUG, you will have a buffer overrun. + if (_log.getEffectiveLevel() > logging.DEBUG): args += ['-loglevel', 'quiet'] args += ['-i', 'pipe:'] + self.output_args return args