Prevents issues when letterbox cropping <30s videos
Some checks failed
KnarCraft/FFmpegConvert/pipeline/head There was a failure building this commit
Some checks failed
KnarCraft/FFmpegConvert/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user