r_video¶
- 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
ptsalways satisfiesframes[-2].pts <= pts < frames[-1].pts- Ifptsis slightly after the decoded region (within the tolerance defined byself.pts_tolerance), gradually move the decoded region forward - Ifptsis before the decoded region, or is too far beyond it, perform aseekto rebuild the decoded region
- needs_seek(pts: int) bool¶