Skip to content

DOC: Add constructor parameter documentation to FFMpegFileWriter #30222

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
17 changes: 17 additions & 0 deletions lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,23 @@ class FFMpegFileWriter(FFMpegBase, FileMovieWriter):
This effectively works as a slideshow input to ffmpeg with the fps passed as
``-framerate``, so see also `their notes on frame rates`_ for further details.

Parameters
----------
fps : int, default: 5
Movie frame rate (frames per second).
codec : str or None, default: :rc:`animation.codec`
The codec to use for video compression.
bitrate : int, default: :rc:`animation.bitrate`
The bitrate of the movie, in kilobits per second. Higher values mean
better quality at the cost of file size. A value of -1 lets ffmpeg choose.
extra_args : list of str or None, optional
Additional command-line arguments passed to ffmpeg.
If None, uses :rc:`animation.ffmpeg_args`.
metadata : dict of str, default: {}
Metadata to embed in the output file. Possible keys include:
'title', 'artist', 'genre', 'subject', 'copyright',
'srcform', and 'comment'.

.. _their notes on frame rates: https://trac.ffmpeg.org/wiki/Slideshow#Framerates
"""
supported_formats = ['png', 'jpeg', 'tiff', 'raw', 'rgba']
Expand Down
Loading