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