fix odd numbers
All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m7s

This commit is contained in:
2026-02-09 18:43:00 -05:00
parent 3650ab7271
commit 2c2bf21c37
2 changed files with 5 additions and 3 deletions

3
app.py
View File

@@ -128,7 +128,8 @@ def process_video():
scale_percentage = data.get('scale_percentage', 100)
if scale_percentage != 100:
# Scale based on percentage - ffmpeg will apply this after crop
scale_filter = f"scale=iw*{scale_percentage/100}:ih*{scale_percentage/100}"
# Force dimensions divisible by 2 for H.264 compatibility
scale_filter = f"scale=trunc(iw*{scale_percentage/100}/2)*2:trunc(ih*{scale_percentage/100}/2)*2"
filters.append(scale_filter)
# Apply filters if any