From 59bd3285c039550abbd67f0c452025ba66570549 Mon Sep 17 00:00:00 2001 From: Gyoungmin Kim Date: Mon, 4 Nov 2024 16:54:25 +0900 Subject: [PATCH] fix: fix code to remove wrong semicolon in ffmpeg commend --- .../src/main/java/kr/mafoo/photo/service/RecapService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/photo-service/src/main/java/kr/mafoo/photo/service/RecapService.java b/photo-service/src/main/java/kr/mafoo/photo/service/RecapService.java index d6bcdea..2add317 100644 --- a/photo-service/src/main/java/kr/mafoo/photo/service/RecapService.java +++ b/photo-service/src/main/java/kr/mafoo/photo/service/RecapService.java @@ -123,9 +123,14 @@ private Mono generateRecapPhotos(List downloadedPath, String recap filterComplex.append(String.format( "[%d]scale='min(1200,iw)':'min(1776,ih)':force_original_aspect_ratio=decrease[photo_scaled_%d]; ", inputIndex, inputIndex)); + filterComplex.append(String.format( - "[recap_bg][photo_scaled_%d]overlay=(W-w)/2:(H-h)/2+80[final%d];", + "[recap_bg][photo_scaled_%d]overlay=(W-w)/2:(H-h)/2+80[final%d]", inputIndex, inputIndex)); + + if (inputIndex < downloadedPath.size()) { + filterComplex.append(";"); + } } builder.addExtraArgs("-filter_complex", filterComplex.toString());