Do not change aspect on snippets unless user explicitly sets it

This commit is contained in:
Stu Leak 2025-12-09 01:16:53 -05:00
parent d1ba052a6d
commit d6c4f5da29

15
main.go
View File

@ -6240,12 +6240,15 @@ func (s *appState) generateSnippet() {
} }
} }
// Check if aspect ratio conversion is needed // Check if aspect ratio conversion is needed (only if user explicitly set OutputAspect)
srcAspect := utils.AspectRatioFloat(src.Width, src.Height) aspectExplicit := s.convert.OutputAspect != "" && !strings.EqualFold(s.convert.OutputAspect, "Source")
targetAspect := resolveTargetAspect(s.convert.OutputAspect, src) if aspectExplicit {
aspectConversionNeeded := targetAspect > 0 && srcAspect > 0 && !utils.RatiosApproxEqual(targetAspect, srcAspect, 0.01) srcAspect := utils.AspectRatioFloat(src.Width, src.Height)
if aspectConversionNeeded { targetAspect := resolveTargetAspect(s.convert.OutputAspect, src)
vf = append(vf, aspectFilters(targetAspect, s.convert.AspectHandling)...) aspectConversionNeeded := targetAspect > 0 && srcAspect > 0 && !utils.RatiosApproxEqual(targetAspect, srcAspect, 0.01)
if aspectConversionNeeded {
vf = append(vf, aspectFilters(targetAspect, s.convert.AspectHandling)...)
}
} }
// Frame rate conversion (only if explicitly set and different from source) // Frame rate conversion (only if explicitly set and different from source)