r_video¶
- class janim.render.renderer.r_video.FrameData(frame: 'Any', data: 'bytes | None' = None)¶
基类:
object- frame: Any¶
- data: bytes | None¶
- class janim.render.renderer.r_video.VideoReader(info: VideoInfo, components: int)¶
基类:
object- get(t: float) bytes¶
- time_to_pts(t: float) int¶
将实际时间转换为视频流时间戳
- ensure_frames_correct(pts: int) None¶
保证
pts一定满足frames[-2].pts <= pts < frames[-1].pts- 如果pts处于已解码区域的后面,但是没有超出太多(由self.pts_tolerance决定),则让已解码区域逐渐后挪 - 如果pts处于已解码区域的前面,或处于后面超出太多,则seek重新构建已解码区域
- needs_seek(pts: int) bool¶