From 097fdfbbb84f69b498f6a639e80b3c5ae9e41bff Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Sun, 18 Dec 2022 10:25:04 +0300 Subject: [PATCH] Rename HW engine for Raspberry --- cmd/ffmpeg/hardware.go | 4 ++-- cmd/ffmpeg/hardware_linux.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/ffmpeg/hardware.go b/cmd/ffmpeg/hardware.go index 3429dcf7..f389ed78 100644 --- a/cmd/ffmpeg/hardware.go +++ b/cmd/ffmpeg/hardware.go @@ -9,7 +9,7 @@ import ( const ( EngineSoftware = "software" EngineVAAPI = "vaapi" // Intel iGPU and AMD GPU - EngineV4L2 = "v4l2" // Raspberry Pi 3 and 4 + EngineV4L2M2M = "v4l2m2m" // Raspberry Pi 3 and 4 EngineCUDA = "cuda" // NVidia on Windows and Linux EngineDXVA2 = "dxva2" // Intel on Windows EngineVideoToolbox = "videotoolbox" // macOS @@ -85,7 +85,7 @@ func MakeHardware(args *Args, engine string) { args.input = "-hwaccel videotoolbox -hwaccel_output_format videotoolbox_vld " + args.input args.codecs[i] = defaults[name+"/"+engine] - case EngineV4L2: + case EngineV4L2M2M: args.codecs[i] = defaults[name+"/"+engine] } } diff --git a/cmd/ffmpeg/hardware_linux.go b/cmd/ffmpeg/hardware_linux.go index a4e70f32..00839bd1 100644 --- a/cmd/ffmpeg/hardware_linux.go +++ b/cmd/ffmpeg/hardware_linux.go @@ -11,14 +11,14 @@ func ProbeHardware(name string) string { if run( "-f", "lavfi", "-i", "testsrc2", "-t", "1", "-c", "h264_v4l2m2m", "-f", "null", "-") { - return EngineV4L2 + return EngineV4L2M2M } case "h265": if run( "-f", "lavfi", "-i", "testsrc2", "-t", "1", "-c", "hevc_v4l2m2m", "-f", "null", "-") { - return EngineV4L2 + return EngineV4L2M2M } }