Table of Contents
Shortcuts

# read_video_timestamps

torchvision.io.read_video_timestamps(filename: str, pts_unit: str = 'pts') → Tuple[List[int], Optional[float]]

  List the video frames timestamps.

  Note that the function decodes the whole video frame-by-frame.

  Parameters:

    - filename (str) – path to the video file

    - pts_unit (str, optional) – unit in which timestamp values will be returned either ‘pts’ or ‘sec’. Defaults to ‘pts’.

  Returns:

    presentation timestamps for each one of the frames in the video. video_fps (float, optional): the frame rate for the video

  Return type:

    pts (List[int] if pts_unit = ‘pts’, List[Fraction] if pts_unit = ‘sec’)

## Docs

Access comprehensive developer documentation for PyTorch

View Docs

## Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

## Resources

Find development resources and get your questions answered

View Resources

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.