From 6b69d7a5322baf64f84af8c3ab1189454b53656e Mon Sep 17 00:00:00 2001 From: Olive Vaughn Date: Wed, 26 Aug 2026 01:51:05 -0400 Subject: [PATCH] more stuff for better wuality hopefully --- docker-compose.yml | 4 ++-- patches/go-transcode-vaapi.patch | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ba98f93..a85e543 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,10 +24,10 @@ services: volumes: - /mnt/user/plex:/media:ro - ./transcode-config.yaml:/app/config.yaml:ro - - transcode-cache-v3:/cache + - transcode-cache-v4:/cache ports: - "8090:8080" restart: unless-stopped volumes: - transcode-cache-v3: + transcode-cache-v4: diff --git a/patches/go-transcode-vaapi.patch b/patches/go-transcode-vaapi.patch index 3705833..e180624 100644 --- a/patches/go-transcode-vaapi.patch +++ b/patches/go-transcode-vaapi.patch @@ -82,7 +82,7 @@ index 9bbe037..c0297fe 100644 // Input specs args = append(args, []string{ "-i", config.InputFilePath, // Input file -@@ -89,14 +106,26 @@ func TranscodeSegments(ctx context.Context, ffmpegBinary string, config Transcod +@@ -89,14 +106,30 @@ func TranscodeSegments(ctx context.Context, ffmpegBinary string, config Transcod scale = fmt.Sprintf("scale=%d:-2", profile.Width) } @@ -105,7 +105,11 @@ index 9bbe037..c0297fe 100644 + } + args = append(args, []string{ + "-vf", scale, "-c:v", "h264_vaapi", "-profile:v", "high", -+ "-level:v", "4.0", "-b:v", fmt.Sprintf("%dk", profile.Bitrate), ++ "-level:v", "4.0", "-rc_mode", "VBR", ++ "-b:v", fmt.Sprintf("%dk", profile.Bitrate), ++ "-maxrate", fmt.Sprintf("%dk", profile.Bitrate*3/2), ++ "-bufsize", fmt.Sprintf("%dk", profile.Bitrate*2), ++ "-bf", "2", "-compression_level", "0", + }...) + } else { + args = append(args, []string{