MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _args

Method _args

lib/matplotlib/animation.py:627–646  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

625 supported_formats = ['png', 'jpeg', 'tiff', 'raw', 'rgba']
626
627 def _args(self):
628 # Returns the command line parameters for subprocess to use
629 # ffmpeg to create a movie using a collection of temp images
630 args = []
631 # For raw frames, we need to explicitly tell ffmpeg the metadata.
632 if self.frame_format in {'raw', 'rgba'}:
633 args += [
634 '-f', 'image2', '-vcodec', 'rawvideo',
635 '-video_size', '%dx%d' % self.frame_size,
636 '-pixel_format', 'rgba',
637 ]
638 args += ['-framerate', str(self.fps), '-i', self._base_temp_name()]
639 if not self._tmpdir:
640 args += ['-frames:v', str(self._frame_counter)]
641 # Logging is quieted because subprocess.PIPE has limited buffer size.
642 # If you have a lot of frames in your animation and set logging to
643 # DEBUG, you will have a buffer overrun.
644 if _log.getEffectiveLevel() > logging.DEBUG:
645 args += ['-loglevel', 'error']
646 return [self.bin_path(), *args, *self.output_args]
647
648
649# Base class for animated GIFs with ImageMagick

Callers

nothing calls this directly

Calls 2

_base_temp_nameMethod · 0.80
bin_pathMethod · 0.45

Tested by

no test coverage detected