Skip to content

Open-Sora: Democratizing Efficient Video Production for All

Python

[feat] backend=av

zhengzangwba6c800e9afc
diff --git a/opensora/datasets/datasets.py b/opensora/datasets/datasets.py
index 9287c70..43ee214 100644
--- a/opensora/datasets/datasets.py
+++ b/opensora/datasets/datasets.py
@@ -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