read_video_timestamps¶
- torchvision.io.read_video_timestamps(filename: str, pts_unit: str = 'pts') tuple[list[int], Optional[float]] [源代码]¶
[已弃用] 列出视频帧的时间戳。
警告
已弃用:torchvision 的所有视频解码和编码功能已从 0.22 版本开始弃用,并将在 0.24 版本中移除。我们建议您迁移到 TorchCodec,我们将在其中整合 PyTorch 未来的解码/编码功能。
请注意,该函数将逐帧解码整个视频。
- 参数:
- 返回:
presentation timestamps for each one of the frames in the video. video_fps (float, optional): the frame rate for the video (视频中每一帧的演示时间戳。video_fps (float, optional):视频的帧率)
- 返回类型:
pts (List[int] if pts_unit = ‘pts’, List[Fraction] if pts_unit = ‘sec’) (pts (List[int],如果 pts_unit = ‘pts’,List[Fraction],如果 pts_unit = ‘sec’))