Stop thumbnail generator attemps after 60 seconds of input file.

This commit is contained in:
voussoir 2025-11-22 20:27:56 -08:00
parent 8b4fa133d1
commit 48c7a8e8d9

View file

@ -289,7 +289,7 @@ def generate_video_thumbnail(filepath, width, height, special={}) -> PIL.Image:
if 'timestamp' in special: if 'timestamp' in special:
timestamp_choices = [float(special['timestamp'])] timestamp_choices = [float(special['timestamp'])]
else: else:
timestamp_choices = list(range(0, int(duration), 3)) timestamp_choices = list(range(0, min(int(duration), 60), 3))
image = None image = None
for this_time in timestamp_choices: for this_time in timestamp_choices: