Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyiming748 committed Dec 23, 2023
1 parent 46b314d commit da78bba
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions processVideo/h265.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,28 +71,6 @@ func ProcessVideo2H265(in GetFileInfo.BasicInfo, threads string) {
mp4 := strings.Replace(out, in.PurgeExt, "mp4", -1)
slog.Debug("调试", slog.String("输入文件", in.FullPath), slog.String("输出文件", mp4))
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 fmt.Sprintf("%v", cpuid.CPU.VendorID) == "Intel" {
// bitRate, err := GetFileInfo.GetBitRate(in.FullPath)
// slog.Debug("bitrate in h265", slog.String("bitrate", bitRate))
// if err != nil {
// goto AGAIN
// } else {
// b := strings.Join([]string{bitRate, "k"}, "")
// slog.Debug("获取的比特率", slog.String("bitrate", b))
// if b == "" || b == "0" || b == "k" {
// slog.Warn("获取比特率失败", slog.String("bitrate", b))
// goto AGAIN
// } else {
// //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)
// slog.Info("检测到Intel系统", slog.String("命令改变为", fmt.Sprint(cmd)))
// }
// }
// }
//AGAIN:
bitRate, _ := GetFileInfo.GetBitRate(in.FullPath)
slog.Debug("bitrate in h265", slog.String("bitrate", bitRate))

Expand Down

0 comments on commit da78bba

Please sign in to comment.