From 849f6eeab8549024bd0c9d4e9a9499224a6c83df Mon Sep 17 00:00:00 2001 From: jmal Date: Mon, 8 Jul 2024 11:07:58 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=BD=AC=E7=A0=81=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=97=8B=E8=BD=AC=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/jmal/clouddisk/video/FFMPEGCommand.java | 1 - src/main/java/com/jmal/clouddisk/video/VideoInfo.java | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/jmal/clouddisk/video/FFMPEGCommand.java b/src/main/java/com/jmal/clouddisk/video/FFMPEGCommand.java index cd2c23f6..e54a5fda 100644 --- a/src/main/java/com/jmal/clouddisk/video/FFMPEGCommand.java +++ b/src/main/java/com/jmal/clouddisk/video/FFMPEGCommand.java @@ -212,7 +212,6 @@ static ProcessBuilder useNvencCuda(String fileId, Path fileAbsolutePath, int bit "-hwaccel", "cuda", "-hwaccel_output_format", "cuda", "-threads", "1", - "-autorotate", "0", "-i", fileAbsolutePath.toString(), "-autoscale", "0", "-map_metadata", "-1", diff --git a/src/main/java/com/jmal/clouddisk/video/VideoInfo.java b/src/main/java/com/jmal/clouddisk/video/VideoInfo.java index f3ae99a2..dd8b171a 100644 --- a/src/main/java/com/jmal/clouddisk/video/VideoInfo.java +++ b/src/main/java/com/jmal/clouddisk/video/VideoInfo.java @@ -14,6 +14,10 @@ public class VideoInfo { private Double frameRate; private Integer duration; private String covertPath; + /** + * 视频旋转角度 + */ + private Integer rotation; /** * 转码后的视频高度 @@ -49,6 +53,7 @@ public VideoInfo(String videoPath, int width, int height, String format, int bit this.bitrate = bitrate; this.duration = duration; this.frameRate = frameRate; + this.rotation = rotation; log.debug("\r\nvideoPath: {}, width: {}, height: {}, format: {}, bitrate: {}, duration: {}", videoPath, width, height, format, bitrate, duration); }