Skip to content

FIX: Fix for FFmpeg + GIF #17401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,9 @@ class FFMpegBase:

@property
def output_args(self):
args = ['-vcodec', self.codec]
args = []
if not Path(self.outfile).suffix == '.gif':
args.extend(['-vcodec', self.codec])
extra_args = (self.extra_args if self.extra_args is not None
else mpl.rcParams[self._args_key])
# For h264, the default format is yuv444p, which is not compatible
Expand Down