Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 35ead09

Browse files
committed
FIX: Fix for FFMpeg + GIF
1 parent cc10355 commit 35ead09

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/animation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,9 @@ class FFMpegBase:
570570

571571
@property
572572
def output_args(self):
573-
args = ['-vcodec', self.codec]
573+
args = []
574+
if not self.outfile.endswith('.gif'):
575+
args.extend(['-vcodec', self.codec])
574576
extra_args = (self.extra_args if self.extra_args is not None
575577
else mpl.rcParams[self._args_key])
576578
# For h264, the default format is yuv444p, which is not compatible

0 commit comments

Comments
 (0)