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

Skip to content

Commit 60fd88f

Browse files
authored
Merge pull request #17401 from larsoner/ffmpeg
FIX: Fix for FFmpeg + GIF
2 parents 23335e6 + 1982469 commit 60fd88f

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 Path(self.outfile).suffix == '.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)