Skip to content

Commit

Permalink
恢复h265方法
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyiming748 committed Apr 12, 2024
1 parent a902757 commit f2f9250
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 96 deletions.
6 changes: 3 additions & 3 deletions conf.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[main]
# mission = i&v
#mission = video
mission = vp9
mission = video
#mission = vp9
# mission = OGG
# mission = audio
# mission = image
Expand Down Expand Up @@ -34,7 +34,7 @@ txt = txt
folder = /Users/zen/git
image = /Users/zen/Downloads/图片助手(ImageAssistant)_批量图片下载器/telegra.ph
audio = /mnt/e/Virtual Machines
video = /mnt/d/video/conv/swimsuit/h264
video = /mnt/c/Users/zen/Downloads/VGerotica animations 01-85 compressed
gif = /Users/zen/Downloads/Fugtrup collection/archive/webp
txt = /Users/zen/Downloads/tele
bilibili = /mnt/d/git/processAll/merge/downloads
Expand Down
92 changes: 0 additions & 92 deletions lines.txt

This file was deleted.

4 changes: 3 additions & 1 deletion processVideo/h265.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func ProcessVideo2H265(in GetFileInfo.BasicInfo, threads string) {
slog.Debug("", slog.String("out", out), slog.String("extName", in.PurgeExt))
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", "libvpx-vp9", "-crf", "31", "-c:a", "libvorbis", "-ac", "1", "-tag:v", "hvc1", "-map_chapters", "-1", "-threads", threads, mp4)
cmd := exec.Command("ffmpeg", "-threads", threads, "-i", in.FullPath, "-c:v", "libx265", "-crf", "22", "-c:a", "libvorbis", "-ac", "1", "-tag:v", "hvc1", "-map_chapters", "-1", "-threads", threads, mp4)
if mi.VideoWidth > 1920 && mi.VideoHeight > 1920 {
slog.Warn("视频大于1080P需要使用其他程序先处理视频尺寸", slog.Any("原视频", in))
ResizeVideo(in, threads)
Expand All @@ -82,6 +82,8 @@ func ProcessVideo2H265(in GetFileInfo.BasicInfo, threads string) {
addTag(in)
slog.Debug("添加标签", slog.String("文件名", in.FullPath))
}
} else if mi.VideoFormat == "vp09" {
slog.Debug(fmt.Sprintf("跳过vp9文件"), slog.String("文件名", in.FullPath))
}
slog.Info("生成的命令", slog.String("command", fmt.Sprint(cmd)))
slog.Info("视频信息", slog.Int("视频帧数", mi.VideoFrameCount), slog.String("比特率", mi.VideoBitRate))
Expand Down

0 comments on commit f2f9250

Please sign in to comment.