r_video

class janim.render.renderer.r_video.VideoRenderer

Bases: Renderer

init() None
render(item: Video) None
update_texture(item: Video) None
class janim.render.renderer.r_video.FrameData(frame: 'Any', data: 'bytes | None' = None)

Bases: object

frame: Any
data: bytes | None
class janim.render.renderer.r_video.VideoReader(info: VideoInfo, components: int)

Bases: object

get(t: float) bytes
time_to_pts(t: float) int

Convert the actual time to the video stream timestamp

ensure_frames_correct(pts: int) None

Ensure that pts always satisfies frames[-2].pts <= pts < frames[-1].pts - If pts is slightly after the decoded region (within the tolerance defined by self.pts_tolerance), gradually move the decoded region forward - If pts is before the decoded region, or is too far beyond it, perform a seek to rebuild the decoded region

needs_seek(pts: int) bool
class janim.render.renderer.r_video.DecodeWorker(task: Callable[[], FrameData | None])

Bases: object

submit()
get()
clear()