PngSource
- class savant.client.PngSource(source_id, file, pts=0, framerate=(30, 1), updates=None)
Frame source for PNG files.
- Parameters:
source_id (str) – Source ID.
file (str | PathLike | BinaryIO) – Path to a PNG file or a file handle to a PNG file opened as binary.
pts (int) – Frame presentation timestamp.
framerate (Tuple[int, int]) – Framerate (numerator, denominator).
updates (List[VideoFrameUpdate] | None) – List of frame updates.
- build_frame()
Build a frame.
- with_framerate(framerate)
Set framerate.
- with_pts(pts)
Set frame presentation timestamp.
- with_update(update)
Apply an update to a frame.