From ea8585576434269510d0d84163eaef72cd1584ac Mon Sep 17 00:00:00 2001 From: SJ70 <50670730+SJ70@users.noreply.github.com> Date: Wed, 16 Oct 2024 00:09:09 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"=EC=9D=BC=EB=B6=80=20=EB=8F=99?= =?UTF-8?q?=EC=98=81=EC=83=81=EC=9D=B4=20=EC=97=85=EB=A1=9C=EB=93=9C?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/j9/bestmoments/constants/ImageFileTypes.java | 1 + .../java/com/j9/bestmoments/service/FfmpegService.java | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/j9/bestmoments/constants/ImageFileTypes.java b/src/main/java/com/j9/bestmoments/constants/ImageFileTypes.java index 1e03bbc..71a72b1 100644 --- a/src/main/java/com/j9/bestmoments/constants/ImageFileTypes.java +++ b/src/main/java/com/j9/bestmoments/constants/ImageFileTypes.java @@ -19,6 +19,7 @@ public enum ImageFileTypes { private final String contentType; public static boolean contains(String contentType) { + System.out.println(contentType); if (contentType == null) { return false; } diff --git a/src/main/java/com/j9/bestmoments/service/FfmpegService.java b/src/main/java/com/j9/bestmoments/service/FfmpegService.java index e0ec09b..391c82e 100644 --- a/src/main/java/com/j9/bestmoments/service/FfmpegService.java +++ b/src/main/java/com/j9/bestmoments/service/FfmpegService.java @@ -38,10 +38,10 @@ public void encodeVideo(String inputFilePath, String outputFilePath, String reso // 로그 스트림 처리 try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getErrorStream()))) { -// String line; -// while ((line = reader.readLine()) != null) { -// log.info(line); -// } + String line; + while ((line = reader.readLine()) != null) { + System.out.println(line); // 로그를 출력하거나 저장할 수 있습니다. + } } int exitCode = process.waitFor(); @@ -69,7 +69,7 @@ public String getVideoResolution(String inputFilePath) { // FFmpeg의 출력에서 해상도를 파싱하여 추출 while ((line = reader.readLine()) != null) { if (line.contains("Video:")) { - String[] parts = line.split(" "); + String[] parts = line.split(","); for (String part : parts) { if (part.trim().matches("\\d{2,}x\\d{2,}")) { resolution = part.trim(); // 해상도 부분을 찾음