def get_item(self, idx: int) -> VideoItem:
        """Get video clip and metadata at the given index.

        Args:
            idx: Index of the clip to retrieve

        Returns:
            VideoItem containing the clip frames, masks, path and metadata
        """
        with warnings.catch_warnings():
            # silence warning caused by bug in torchvision
            # see https://github.com/pytorch/vision/issues/5787
            warnings.simplefilter("ignore")
            clip, _, _, _ = self.get_clip(idx)

        video_idx, clip_idx = self.get_clip_location(idx)
        video_path = self.video_paths[video_idx]
        clip_pts = self.clips[video_idx][clip_idx]

        return VideoItem(
            image=clip,
            gt_mask=self.get_mask(idx),
            video_path=video_path,
            frames=clip_pts,
            last_frame=self.last_frame_idx(video_idx),
        )
Get video clip and metadata at the given index.

        Args:
            idx: Index of the clip to retrieve

        Returns:
            VideoItem containing the clip frames, masks, path and metadata
        
src/anomalib/data/utils/video.py