[feat] backend=av

This commit is contained in:
zhengzangw 2024-05-30 08:51:22 +00:00
parent 6fe7aa36b9
commit ba6c800e9a

View file

@ -68,7 +68,7 @@ class VideoTextDataset(torch.utils.data.Dataset):
if file_type == "video":
# loading
vframes, vinfo = read_video(path, backend='cv2')
vframes, vinfo = read_video(path, backend='av')
video_fps = vinfo["video_fps"] if 'video_fps' in vinfo else 24
# Sampling video frames
@ -145,7 +145,7 @@ class VariableVideoTextDataset(VideoTextDataset):
video_fps = 24 # default fps
if file_type == "video":
# loading
vframes, vinfo = read_video(path, backend='cv2')
vframes, vinfo = read_video(path, backend='av')
video_fps = vinfo["video_fps"] if 'video_fps' in vinfo else 24
# Sampling video frames