From f1f2eb2d9c8019a2c16c1f73e8bab778f28b1b0a Mon Sep 17 00:00:00 2001 From: libeanim Date: Mon, 26 Feb 2024 17:17:33 +0100 Subject: [PATCH] Set keyframe modality to video in frame_subsampler.py --- video2dataset/subsamplers/frame_subsampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video2dataset/subsamplers/frame_subsampler.py b/video2dataset/subsamplers/frame_subsampler.py index c1d9ae6d..fbf4ce92 100644 --- a/video2dataset/subsamplers/frame_subsampler.py +++ b/video2dataset/subsamplers/frame_subsampler.py @@ -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):