From 0ecac0f4270ac796654f9adadf0d85a6f9e25523 Mon Sep 17 00:00:00 2001 From: zen Date: Tue, 5 Dec 2023 18:57:37 +0800 Subject: [PATCH] fix --- processVideo/h265.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processVideo/h265.go b/processVideo/h265.go index f3bd2bc..310ee86 100644 --- a/processVideo/h265.go +++ b/processVideo/h265.go @@ -74,7 +74,7 @@ func ProcessVideo2H265(in GetFileInfo.BasicInfo, threads string) { cmd := exec.Command("ffmpeg", "-threads", threads, "-i", in.FullPath, "-c:v", "libx265", "-c:a", "aac", "-ac", "1", "-tag:v", "hvc1", "-map_chapters", "-1", "-threads", threads, mp4) // info := GetFileInfo.GetVideoFileInfo(in.FullPath) if strings.Contains(cpuid.CPU.BrandName, "Intel") { - if mi.VideoBitRate != "" && mi.VideoBitRate != "0" { + if mi.VideoBitRate == "" || mi.VideoBitRate == "0" { b := strings.Join([]string{mi.VideoBitRate, "k"}, "") //ffmpeg -i in.mp4 -c:v hevc_qsv -c:a aac -ac 1 -b:v 100k, cmd = exec.Command("ffmpeg", "-threads", threads, "-i", in.FullPath, "-c:v", "hevc_qsv", "-b:v", b, "-c:a", "aac", "-ac", "1", "-tag:v", "hvc1", "-map_chapters", "-1", "-threads", threads, mp4)