JpegSource

Inheritance diagram of JpegSource

JpegSource inheritance diagram

class savant.client.JpegSource(source_id, filepath, pts=0, framerate=(30, 1), updates=None)

Frame source for JPEG files.

Parameters:
property source_id: str

Source ID.

property filepath: Union[str, PathLike]

Path to a JPEG file.

property pts: int

Frame presentation timestamp.

property framerate: Tuple[int, int]

Framerate.

property updates: List[VideoFrameUpdate]

List of frame updates.

property duration: int

Frame duration.

with_pts(pts)

Set frame presentation timestamp.

with_framerate(framerate)

Set framerate.

with_update(update)

Apply an update to a frame.

build_frame()

Build a frame.

Returns:

A tuple of a frame metadata and its content.

Return type:

Tuple[VideoFrame, bytes]