Plotter.open_movie(filename, framerate=24, quality=5, **kwargs)[source]#

Establish a connection to the ffmpeg writer.

Requires imageio to be installed.

filenamestr | Path

Filename of the movie to open. Filename should end in mp4, but other filetypes may be supported. See imageio.get_writer().

framerateint, default: 24

Frames per second.

qualityint, default: 5

Quality 10 is the top possible quality for any codec. The range is 0 - 10. Higher quality leads to a larger file.

**kwargsdict, optional

See the documentation for imageio.get_writer() for additional kwargs.


See the documentation for imageio.get_writer().


Open a MP4 movie and set the quality to maximum.

>>> import pyvista as pv
>>> pl = pv.Plotter()
>>> pl.open_movie('movie.mp4', quality=10)