Skip to content

Commit bf1c422

Browse files
committed
Switch to VAAPI for Intel GPUs (potential compatibility fix)
1 parent 293274b commit bf1c422

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

README.MD

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Under the hood, the application leverages the power of FFMPEG to handle video pr
2323
- Saving upscaled videos to disk rather than real-time preview.
2424
- User-friendly graphical interface for easy operation; no command-line usage is required.
2525
- Support for most popular video encoders: H.264, H.265, AV1 (CPU based or GPU accelerated)
26-
- Hardware acceleration with NVIDIA (CUDA + NVENC), AMD (OpenCL + AMF), and Intel (QSV) graphics cards.
26+
- Hardware acceleration with NVIDIA (CUDA + NVENC), AMD (OpenCL + AMF), and Intel (VAAPI) graphics cards.
2727
- Compatibility with multiple audio and subtitles streams
2828
- Support for various video formats: MP4, AVI, and MKV (both input and output).
2929
- Quick and hassle-free installation.

data.go

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type Shader struct {
2020
type Encoder struct {
2121
Name string
2222
FfmpegValue string
23+
Format string
2324
Vendor string
2425
}
2526

ffmpeg.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ func buildUpscalingParams(anime Anime, resolution Resolution, shader Shader, out
8989
params = append(params,
9090
"-i", fmt.Sprintf("%s", anime.Path), // Path to input file
9191
"-init_hw_device", "vulkan",
92-
"-vf", fmt.Sprintf("format=yuv420p,hwupload,libplacebo=w=%d:h=%d:upscaler=ewa_lanczos:custom_shader_path=%s,hwdownload,format=yuv420p", resolution.Width, resolution.Height, shader.Path),
92+
"-vf", fmt.Sprintf("format=%s,hwupload,libplacebo=w=%d:h=%d:upscaler=ewa_lanczos:custom_shader_path=%s,hwdownload,format=yuv420p",
93+
availableEncoders[settings.Encoder].Format, resolution.Width, resolution.Height, shader.Path),
9394

9495
"-c:a", "copy", // Copy all audio streams
9596
"-c:s", "copy", // Copy all subtitles streams
@@ -161,7 +162,7 @@ func searchHardwareAcceleration() {
161162

162163
logMessage("Available GPU acceleration: AMF", false)
163164
} else if intel {
164-
hwaccelParams = append(hwaccelParams, "-hwaccel", "vulkan")
165+
hwaccelParams = append(hwaccelParams, "-hwaccel", "vaapi")
165166
addEncoders("intel")
166167

167168
logMessage("Available GPU acceleration: QSV", false)

main.go

+14-14
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,20 @@ var (
4040
}
4141

4242
allEncoders = []Encoder{
43-
{"H.264 (CPU)", "libx264", "cpu"},
44-
{"H.264 NVENC (NVIDIA)", "h264_nvenc", "nvidia"},
45-
{"H.264 AMF (AMD)", "h264_amf", "advanced micro devices"},
46-
{"H.264 QSV (Intel)", "h264_qsv", "intel"},
47-
48-
{"H.265 (CPU)", "libx265", "cpu"},
49-
{"H.265 NVENC (NVIDIA)", "hevc_nvenc", "nvidia"},
50-
{"H.265 AMF (AMD)", "hevc_amf", "advanced micro devices"},
51-
{"H.265 QSV (Intel)", "hevc_qsv", "intel"},
52-
53-
{"AV1 (CPU)", "libsvtav1", "cpu"},
54-
{"AV1 NVENC (NVIDIA)", "av1_nvenc", "nvidia"},
55-
{"AV1 AMF (AMD)", "av1_amf", "advanced micro devices"},
56-
{"AV1 QSV (Intel)", "av1_qsv", "intel"},
43+
{"H.264 (CPU)", "libx264", "yuv420p", "cpu"},
44+
{"H.264 NVENC (NVIDIA)", "h264_nvenc", "yuv420p", "nvidia"},
45+
{"H.264 AMF (AMD)", "h264_amf", "yuv420p", "advanced micro devices"},
46+
{"H.264 VAAPI (Intel)", "h264_vaapi", "nv12", "intel"},
47+
48+
{"H.265 (CPU)", "libx265", "yuv420p", "cpu"},
49+
{"H.265 NVENC (NVIDIA)", "hevc_nvenc", "yuv420p", "nvidia"},
50+
{"H.265 AMF (AMD)", "hevc_amf", "yuv420p", "advanced micro devices"},
51+
{"H.265 VAAPI (Intel)", "hevc_vaapi", "nv12", "intel"},
52+
53+
{"AV1 (CPU)", "libsvtav1", "yuv420p", "cpu"},
54+
{"AV1 NVENC (NVIDIA)", "av1_nvenc", "yuv420p", "nvidia"},
55+
{"AV1 AMF (AMD)", "av1_amf", "yuv420p", "advanced micro devices"},
56+
{"AV1 VAAPI (Intel)", "av1_vaapi", "nv12", "intel"},
5757
}
5858

5959
availableEncoders = make([]Encoder, 0)

0 commit comments

Comments
 (0)