hwaccel qsv

This commit is contained in:
2026-03-13 11:29:18 +08:00
parent fe09c60822
commit f1634fcecc

View File

@@ -557,12 +557,13 @@ func compressVideoGPU(ctx context.Context, inputFile, outputFile string, height
outputFile, outputFile,
} }
case "qsv": case "qsv":
scaleFilter := fmt.Sprintf("scale=-2:%d", height) scaleFilter := fmt.Sprintf("scale_qsv=-2:%d", height)
ffmpegCmd = []string{ ffmpegCmd = []string{
FfmpegExec, FfmpegExec,
"-hide_banner", "-hide_banner",
"-y", "-y",
"-hwaccel", "qsv", "-hwaccel", "qsv",
"-hwaccel_output_format", "qsv",
"-i", inputFile, "-i", inputFile,
"-vf", scaleFilter, "-vf", scaleFilter,
"-c:v", "h264_qsv", "-c:v", "h264_qsv",