Prevents issues when letterbox cropping <30s videos
Some checks failed
KnarCraft/FFmpegConvert/pipeline/head There was a failure building this commit

This commit is contained in:
2025-12-16 16:07:05 +01:00
parent 4159210f76
commit c73dcc5408

View File

@@ -160,7 +160,14 @@ public class LetterboxCropper extends AbstractConverter {
throw new RuntimeException("Unable to get duration from video file");
}
int increments = (int) (duration / 30d);
int increments;
if (duration > 300) {
increments = (int) (duration / 30d);
} else if (duration > 30) {
increments = 5;
} else {
increments = 1;
}
for (int i = 0; i < duration; i += increments) {
FFMpegCommand clone = probeCommand.clone();