imageio.plugins.pyav.PyAVPlugin.init_video_stream#

PyAVPlugin.init_video_stream(codec: str, *, fps: int = 24, pixel_format: Optional[str] = None) None[source]#

Initialize a new video stream.

This function adds a new video stream to the ImageResource using the selected encoder (codec), framerate, and colorspace.

Parameters:
codecstr

The codec to use, e.g. "x264" or "vp9".

fpsstr

The desired framerate of the video stream (frames per second).

pixel_formatstr

The pixel format to use while encoding frames. If None (default) use the codec’s default.