@@ -71,7 +71,7 @@ class VideoClips(object):
71
71
def __init__ (self , video_paths , clip_length_in_frames = 16 , frames_between_clips = 1 ,
72
72
frame_rate = None , _precomputed_metadata = None , num_workers = 0 ,
73
73
_video_width = 0 , _video_height = 0 , _video_min_dimension = 0 ,
74
- _audio_samples = 0 ):
74
+ _audio_samples = 0 , _audio_channels = 0 ):
75
75
76
76
self .video_paths = video_paths
77
77
self .num_workers = num_workers
@@ -81,6 +81,7 @@ def __init__(self, video_paths, clip_length_in_frames=16, frames_between_clips=1
81
81
self ._video_height = _video_height
82
82
self ._video_min_dimension = _video_min_dimension
83
83
self ._audio_samples = _audio_samples
84
+ self ._audio_channels = _audio_channels
84
85
85
86
if _precomputed_metadata is None :
86
87
self ._compute_frame_pts ()
@@ -149,7 +150,8 @@ def subset(self, indices):
149
150
_video_width = self ._video_width ,
150
151
_video_height = self ._video_height ,
151
152
_video_min_dimension = self ._video_min_dimension ,
152
- _audio_samples = self ._audio_samples )
153
+ _audio_samples = self ._audio_samples ,
154
+ _audio_channels = self ._audio_channels )
153
155
154
156
@staticmethod
155
157
def compute_clips_for_video (video_pts , num_frames , step , fps , frame_rate ):
@@ -298,6 +300,7 @@ def get_clip(self, idx):
298
300
video_pts_range = (video_start_pts , video_end_pts ),
299
301
video_timebase = info ["video_timebase" ],
300
302
audio_samples = self ._audio_samples ,
303
+ audio_channels = self ._audio_channels ,
301
304
audio_pts_range = (audio_start_pts , audio_end_pts ),
302
305
audio_timebase = audio_timebase ,
303
306
)
0 commit comments