Browse Source
update
Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
main
1 changed files with
1 additions and
1 deletions
-
video_decoder.py
|
@ -39,7 +39,7 @@ class VideoDecoder(PyOperator): |
|
|
elif self._sample_type.lower() == SAMPLE_TYPE.UNIFORM_TEMPORAL_SUBSAMPLE: |
|
|
elif self._sample_type.lower() == SAMPLE_TYPE.UNIFORM_TEMPORAL_SUBSAMPLE: |
|
|
end_time = self._end_time if self._end_time is not None and self._end_time <= duration else duration |
|
|
end_time = self._end_time if self._end_time is not None and self._end_time <= duration else duration |
|
|
start_time = self._start_time if self._start_time is not None else 0 |
|
|
start_time = self._start_time if self._start_time is not None else 0 |
|
|
nums = int(stream.rate * (end_time - start_time)) |
|
|
|
|
|
|
|
|
nums = int(stream.average_rate * (end_time - start_time)) |
|
|
return partial(self._uniform_temporal_subsample, total_frames=nums) |
|
|
return partial(self._uniform_temporal_subsample, total_frames=nums) |
|
|
elif self._sample_type.lower() == SAMPLE_TYPE.TIME_STEP_SAMPLE: |
|
|
elif self._sample_type.lower() == SAMPLE_TYPE.TIME_STEP_SAMPLE: |
|
|
start_time = self._start_time if self._start_time is not None else 0 |
|
|
start_time = self._start_time if self._start_time is not None else 0 |
|
|