feat(core): 非标分辨率改为每1024px一档并扩展至19K
This commit is contained in:
+243
-33
@@ -146,6 +146,56 @@ func moveVerticalVideo(pickerDir string) {
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical9KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical10KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_10k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical10KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical11KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_11k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical11KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical12KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_12k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical12KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical13KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_13k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical13KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical14KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_14k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical14KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical15KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_15k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical15KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical16KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_16k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical16KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical17KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_17k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical17KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical18KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_18k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical18KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVertical19KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_19k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoVertical19KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoVerticalHKList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_竖屏_原画质"
|
||||
util.CreateDir(videoDirPath)
|
||||
@@ -201,6 +251,56 @@ func moveHorizontalVideo(pickerDir string) {
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal9KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal10KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_10k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal10KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal11KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_11k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal11KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal12KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_12k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal12KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal13KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_13k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal13KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal14KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_14k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal14KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal15KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_15k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal15KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal16KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_16k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal16KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal17KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_17k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal17KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal18KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_18k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal18KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontal19KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_19k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoHorizontal19KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoHorizontalHKList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_横屏_原画质"
|
||||
util.CreateDir(videoDirPath)
|
||||
@@ -311,6 +411,56 @@ func moveSquareVideo(pickerDir string) {
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare9KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare10KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_10k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare10KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare11KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_11k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare11KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare12KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_12k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare12KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare13KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_13k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare13KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare14KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_14k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare14KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare15KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_15k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare15KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare16KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_16k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare16KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare17KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_17k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare17KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare18KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_18k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare18KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquare19KList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_19k"
|
||||
util.CreateDir(videoDirPath)
|
||||
util.DoMoveFileToDir(vars.VideoSquare19KList, videoDirPath)
|
||||
}
|
||||
if len(vars.VideoSquareHKList) > 0 {
|
||||
videoDirPath := pickerDir + pathSeparator + "视频_等比_原画质"
|
||||
util.CreateDir(videoDirPath)
|
||||
@@ -364,27 +514,47 @@ func handleVerticalVideo(currentVideoPath string, height int, suffix string) {
|
||||
vars.VideoVerticalGifList = append(vars.VideoVerticalGifList, currentVideoPath)
|
||||
return
|
||||
}
|
||||
if height < 1000 {
|
||||
if height < 1024 {
|
||||
vars.VideoVerticalNormalList = append(vars.VideoVerticalNormalList, currentVideoPath)
|
||||
} else if height < 2000 {
|
||||
} else if height < 2048 {
|
||||
vars.VideoVertical1KList = append(vars.VideoVertical1KList, currentVideoPath)
|
||||
} else if height < 3000 {
|
||||
} else if height < 3072 {
|
||||
vars.VideoVertical2KList = append(vars.VideoVertical2KList, currentVideoPath)
|
||||
} else if height < 4000 {
|
||||
} else if height < 4096 {
|
||||
vars.VideoVertical3KList = append(vars.VideoVertical3KList, currentVideoPath)
|
||||
} else if height < 5000 {
|
||||
} else if height < 5120 {
|
||||
vars.VideoVertical4KList = append(vars.VideoVertical4KList, currentVideoPath)
|
||||
} else if height < 6000 {
|
||||
} else if height < 6144 {
|
||||
vars.VideoVertical5KList = append(vars.VideoVertical5KList, currentVideoPath)
|
||||
} else if height < 7000 {
|
||||
} else if height < 7168 {
|
||||
vars.VideoVertical6KList = append(vars.VideoVertical6KList, currentVideoPath)
|
||||
} else if height < 8000 {
|
||||
} else if height < 8192 {
|
||||
vars.VideoVertical7KList = append(vars.VideoVertical7KList, currentVideoPath)
|
||||
} else if height < 9000 {
|
||||
} else if height < 9216 {
|
||||
vars.VideoVertical8KList = append(vars.VideoVertical8KList, currentVideoPath)
|
||||
} else if height < 10000 {
|
||||
} else if height < 10240 {
|
||||
vars.VideoVertical9KList = append(vars.VideoVertical9KList, currentVideoPath)
|
||||
} else if height >= 10000 {
|
||||
} else if height < 11264 {
|
||||
vars.VideoVertical10KList = append(vars.VideoVertical10KList, currentVideoPath)
|
||||
} else if height < 12288 {
|
||||
vars.VideoVertical11KList = append(vars.VideoVertical11KList, currentVideoPath)
|
||||
} else if height < 13312 {
|
||||
vars.VideoVertical12KList = append(vars.VideoVertical12KList, currentVideoPath)
|
||||
} else if height < 14336 {
|
||||
vars.VideoVertical13KList = append(vars.VideoVertical13KList, currentVideoPath)
|
||||
} else if height < 15360 {
|
||||
vars.VideoVertical14KList = append(vars.VideoVertical14KList, currentVideoPath)
|
||||
} else if height < 16384 {
|
||||
vars.VideoVertical15KList = append(vars.VideoVertical15KList, currentVideoPath)
|
||||
} else if height < 17408 {
|
||||
vars.VideoVertical16KList = append(vars.VideoVertical16KList, currentVideoPath)
|
||||
} else if height < 18432 {
|
||||
vars.VideoVertical17KList = append(vars.VideoVertical17KList, currentVideoPath)
|
||||
} else if height < 19456 {
|
||||
vars.VideoVertical18KList = append(vars.VideoVertical18KList, currentVideoPath)
|
||||
} else if height < 20480 {
|
||||
vars.VideoVertical19KList = append(vars.VideoVertical19KList, currentVideoPath)
|
||||
} else if height >= 20480 {
|
||||
vars.VideoVerticalHKList = append(vars.VideoVerticalHKList, currentVideoPath)
|
||||
}
|
||||
}
|
||||
@@ -451,27 +621,47 @@ func handleHorizontalVideo(currentVideoPath string, width int, height int, suffi
|
||||
return
|
||||
}
|
||||
// 非标规格
|
||||
if width < 1000 {
|
||||
if width < 1024 {
|
||||
vars.VideoHorizontalNormalList = append(vars.VideoHorizontalNormalList, currentVideoPath)
|
||||
} else if width < 2000 {
|
||||
} else if width < 2048 {
|
||||
vars.VideoHorizontal1KList = append(vars.VideoHorizontal1KList, currentVideoPath)
|
||||
} else if width < 3000 {
|
||||
} else if width < 3072 {
|
||||
vars.VideoHorizontal2KList = append(vars.VideoHorizontal2KList, currentVideoPath)
|
||||
} else if width < 4000 {
|
||||
} else if width < 4096 {
|
||||
vars.VideoHorizontal3KList = append(vars.VideoHorizontal3KList, currentVideoPath)
|
||||
} else if width < 5000 {
|
||||
} else if width < 5120 {
|
||||
vars.VideoHorizontal4KList = append(vars.VideoHorizontal4KList, currentVideoPath)
|
||||
} else if width < 6000 {
|
||||
} else if width < 6144 {
|
||||
vars.VideoHorizontal5KList = append(vars.VideoHorizontal5KList, currentVideoPath)
|
||||
} else if width < 7000 {
|
||||
} else if width < 7168 {
|
||||
vars.VideoHorizontal6KList = append(vars.VideoHorizontal6KList, currentVideoPath)
|
||||
} else if width < 8000 {
|
||||
} else if width < 8192 {
|
||||
vars.VideoHorizontal7KList = append(vars.VideoHorizontal7KList, currentVideoPath)
|
||||
} else if width < 9000 {
|
||||
} else if width < 9216 {
|
||||
vars.VideoHorizontal8KList = append(vars.VideoHorizontal8KList, currentVideoPath)
|
||||
} else if width < 10000 {
|
||||
} else if width < 10240 {
|
||||
vars.VideoHorizontal9KList = append(vars.VideoHorizontal9KList, currentVideoPath)
|
||||
} else if width >= 10000 { // 提示请忽略
|
||||
} else if width < 11264 {
|
||||
vars.VideoHorizontal10KList = append(vars.VideoHorizontal10KList, currentVideoPath)
|
||||
} else if width < 12288 {
|
||||
vars.VideoHorizontal11KList = append(vars.VideoHorizontal11KList, currentVideoPath)
|
||||
} else if width < 13312 {
|
||||
vars.VideoHorizontal12KList = append(vars.VideoHorizontal12KList, currentVideoPath)
|
||||
} else if width < 14336 {
|
||||
vars.VideoHorizontal13KList = append(vars.VideoHorizontal13KList, currentVideoPath)
|
||||
} else if width < 15360 {
|
||||
vars.VideoHorizontal14KList = append(vars.VideoHorizontal14KList, currentVideoPath)
|
||||
} else if width < 16384 {
|
||||
vars.VideoHorizontal15KList = append(vars.VideoHorizontal15KList, currentVideoPath)
|
||||
} else if width < 17408 {
|
||||
vars.VideoHorizontal16KList = append(vars.VideoHorizontal16KList, currentVideoPath)
|
||||
} else if width < 18432 {
|
||||
vars.VideoHorizontal17KList = append(vars.VideoHorizontal17KList, currentVideoPath)
|
||||
} else if width < 19456 {
|
||||
vars.VideoHorizontal18KList = append(vars.VideoHorizontal18KList, currentVideoPath)
|
||||
} else if width < 20480 {
|
||||
vars.VideoHorizontal19KList = append(vars.VideoHorizontal19KList, currentVideoPath)
|
||||
} else if width >= 20480 { // 提示请忽略
|
||||
vars.VideoHorizontalHKList = append(vars.VideoHorizontalHKList, currentVideoPath)
|
||||
}
|
||||
}
|
||||
@@ -482,27 +672,47 @@ func handleSquareVideo(currentVideoPath string, width int, height int, suffix st
|
||||
vars.VideoSquareGifList = append(vars.VideoSquareGifList, currentVideoPath)
|
||||
return
|
||||
}
|
||||
if width < 1000 {
|
||||
if width < 1024 {
|
||||
vars.VideoSquareNormalList = append(vars.VideoSquareNormalList, currentVideoPath)
|
||||
} else if width < 2000 {
|
||||
} else if width < 2048 {
|
||||
vars.VideoSquare1KList = append(vars.VideoSquare1KList, currentVideoPath)
|
||||
} else if width < 3000 {
|
||||
} else if width < 3072 {
|
||||
vars.VideoSquare2KList = append(vars.VideoSquare2KList, currentVideoPath)
|
||||
} else if width < 4000 {
|
||||
} else if width < 4096 {
|
||||
vars.VideoSquare3KList = append(vars.VideoSquare3KList, currentVideoPath)
|
||||
} else if width < 5000 {
|
||||
} else if width < 5120 {
|
||||
vars.VideoSquare4KList = append(vars.VideoSquare4KList, currentVideoPath)
|
||||
} else if width < 6000 {
|
||||
} else if width < 6144 {
|
||||
vars.VideoSquare5KList = append(vars.VideoSquare5KList, currentVideoPath)
|
||||
} else if width < 7000 {
|
||||
} else if width < 7168 {
|
||||
vars.VideoSquare6KList = append(vars.VideoSquare6KList, currentVideoPath)
|
||||
} else if width < 8000 {
|
||||
} else if width < 8192 {
|
||||
vars.VideoSquare7KList = append(vars.VideoSquare7KList, currentVideoPath)
|
||||
} else if width < 9000 {
|
||||
} else if width < 9216 {
|
||||
vars.VideoSquare8KList = append(vars.VideoSquare8KList, currentVideoPath)
|
||||
} else if width < 10000 {
|
||||
} else if width < 10240 {
|
||||
vars.VideoSquare9KList = append(vars.VideoSquare9KList, currentVideoPath)
|
||||
} else if width >= 10000 {
|
||||
} else if width < 11264 {
|
||||
vars.VideoSquare10KList = append(vars.VideoSquare10KList, currentVideoPath)
|
||||
} else if width < 12288 {
|
||||
vars.VideoSquare11KList = append(vars.VideoSquare11KList, currentVideoPath)
|
||||
} else if width < 13312 {
|
||||
vars.VideoSquare12KList = append(vars.VideoSquare12KList, currentVideoPath)
|
||||
} else if width < 14336 {
|
||||
vars.VideoSquare13KList = append(vars.VideoSquare13KList, currentVideoPath)
|
||||
} else if width < 15360 {
|
||||
vars.VideoSquare14KList = append(vars.VideoSquare14KList, currentVideoPath)
|
||||
} else if width < 16384 {
|
||||
vars.VideoSquare15KList = append(vars.VideoSquare15KList, currentVideoPath)
|
||||
} else if width < 17408 {
|
||||
vars.VideoSquare16KList = append(vars.VideoSquare16KList, currentVideoPath)
|
||||
} else if width < 18432 {
|
||||
vars.VideoSquare17KList = append(vars.VideoSquare17KList, currentVideoPath)
|
||||
} else if width < 19456 {
|
||||
vars.VideoSquare18KList = append(vars.VideoSquare18KList, currentVideoPath)
|
||||
} else if width < 20480 {
|
||||
vars.VideoSquare19KList = append(vars.VideoSquare19KList, currentVideoPath)
|
||||
} else if width >= 20480 {
|
||||
vars.VideoSquareHKList = append(vars.VideoSquareHKList, currentVideoPath)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user