diff --git a/src/main/java/net/knarcraft/ffmpegconverter/converter/LetterboxCropper.java b/src/main/java/net/knarcraft/ffmpegconverter/converter/LetterboxCropper.java index a29bb25..266e66e 100644 --- a/src/main/java/net/knarcraft/ffmpegconverter/converter/LetterboxCropper.java +++ b/src/main/java/net/knarcraft/ffmpegconverter/converter/LetterboxCropper.java @@ -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();