Skip to content

Commit

Permalink
Set keyframe modality to video in frame_subsampler.py
Browse files Browse the repository at this point in the history
  • Loading branch information
libeanim committed Feb 26, 2024
1 parent 133f6f7 commit f1f2eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion video2dataset/subsamplers/frame_subsampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FrameSubsampler(Subsampler):
def __init__(self, frame_rate, downsample_method="fps", encode_format="mp4"):
self.frame_rate = frame_rate
self.downsample_method = downsample_method
self.output_modality = "video" if downsample_method == "fps" else "jpg"
self.output_modality = "video" if downsample_method in ["fps", "keyframe"] else "jpg"
self.encode_formats = {"video": encode_format}

def __call__(self, streams, metadata=None):
Expand Down

0 comments on commit f1f2eb2

Please sign in to comment.