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(); // 해상도 부분을 찾음