Skip to content

Commit

Permalink
Merge pull request #126 from jamebal/recycle
Browse files Browse the repository at this point in the history
perf: 转码自动旋转视频
  • Loading branch information
jamebal authored Jul 8, 2024
2 parents ff6a894 + 849f6ee commit 3322fbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/main/java/com/jmal/clouddisk/video/FFMPEGCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/jmal/clouddisk/video/VideoInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ public class VideoInfo {
private Double frameRate;
private Integer duration;
private String covertPath;
/**
* 视频旋转角度
*/
private Integer rotation;

/**
* 转码后的视频高度
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 3322fbf

Please sign in to comment.