From 06744f356c4f2c4e70129b9b06f6f2f8d0f58857 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 3 Nov 2022 16:18:04 +0100 Subject: [PATCH] Video: Change FFmpeg params for NVidia hardware transcoding #2613 Signed-off-by: Michael Mayer --- internal/ffmpeg/convert.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/ffmpeg/convert.go b/internal/ffmpeg/convert.go index 905330cc7..687f0d1d9 100644 --- a/internal/ffmpeg/convert.go +++ b/internal/ffmpeg/convert.go @@ -99,6 +99,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc // ffmpeg -hide_banner -h encoder=h264_nvenc result = exec.Command( ffmpegBin, + "-hwaccel", "auto", "-i", fileName, "-pix_fmt", "yuv420p", "-c:v", string(encoder), @@ -113,7 +114,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc "-r", "30", "-b:v", bitrate, "-profile:v", "1", - "-level:v", "41", + "-level:v", "auto", "-coder:v", "1", "-f", "mp4", "-y",