From 4eef0ddc92d22537ebc1cef2563b68d087a63703 Mon Sep 17 00:00:00 2001 From: Tsai-Shien Chen Date: Fri, 5 Apr 2024 15:49:42 -0700 Subject: [PATCH] Update data_reader.py --- .../video2dataset/video2dataset/data_reader.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dataset_dataloading/video2dataset/video2dataset/data_reader.py b/dataset_dataloading/video2dataset/video2dataset/data_reader.py index 24ca10e..ec6a47f 100755 --- a/dataset_dataloading/video2dataset/video2dataset/data_reader.py +++ b/dataset_dataloading/video2dataset/video2dataset/data_reader.py @@ -179,9 +179,10 @@ def __call__(self, url): modality_paths = {} video_format_string = ( - f"wv*[height>={self.video_size}][ext=mp4]{'[codec=avc1]' if self.specify_codec else ''}{'+ba' if self.download_audio else ''}/" - f"w[height>={self.video_size}][ext=mp4]{'[codec=avc1]' if self.specify_codec else ''}{'+ba' if self.download_audio else ''}/" - f"bv/b[ext=mp4]{'[codec=avc1]' if self.specify_codec else ''}{'+ba' if self.download_audio else ''}" + f"wv*[height>={self.video_size}][ext=mp4]{'[codec=avc1]' if self.specify_codec else ''}{'+ba[ext=mp4]' if self.download_audio else ''}/" + f"w[height>={self.video_size}][ext=mp4]{'[codec=avc1]' if self.specify_codec else ''}{'+ba[ext=mp4]' if self.download_audio else ''}/" + f"bv[ext=mp4]{'[codec=avc1]' if self.specify_codec else ''}{'+ba[ext=mp4]' if self.download_audio else ''}/" + f"b[ext=mp4]{'[codec=avc1]' if self.specify_codec else ''}{'+ba[ext=mp4]' if self.download_audio else ''}" ) audio_fmt_string = ( f"wa[asr>={self.audio_rate}][ext=m4a] / ba[ext=m4a]" if self.audio_rate > 0 else "ba[ext=m4a]"