From ff612b547c569f3d6701398bd97ad2151905af22 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Wed, 24 Dec 2025 02:40:37 -0500 Subject: [PATCH] Fix remux build variables --- main.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 6ebd6ea..7330ded 100644 --- a/main.go +++ b/main.go @@ -3753,6 +3753,14 @@ func (s *appState) executeConvertJob(ctx context.Context, job *queue.Job, progre } } + // Source metrics (used for filters and bitrate defaults) + sourceWidth, _ := cfg["sourceWidth"].(int) + sourceHeight, _ := cfg["sourceHeight"].(int) + sourceBitrate := 0 + if v, ok := cfg["sourceBitrate"].(float64); ok { + sourceBitrate = int(v) + } + // Video filters var vf []string if !remux { @@ -3843,13 +3851,6 @@ func (s *appState) executeConvertJob(ctx context.Context, job *queue.Job, progre } } // Aspect ratio conversion - sourceWidth, _ := cfg["sourceWidth"].(int) - sourceHeight, _ := cfg["sourceHeight"].(int) - // Get source bitrate if present - sourceBitrate := 0 - if v, ok := cfg["sourceBitrate"].(float64); ok { - sourceBitrate = int(v) - } srcAspect := utils.AspectRatioFloat(sourceWidth, sourceHeight) outputAspect, _ := cfg["outputAspect"].(string) aspectHandling, _ := cfg["aspectHandling"].(string)