Akane710 commited on
Commit
42951be
·
verified ·
1 Parent(s): 76cb754

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -52,10 +52,10 @@ async def compress_video(
52
  "video_codec": codec # Specify the video codec
53
  }
54
 
55
- # Add resolution if specified
56
  if resolution:
57
  transformation["width"] = resolution.split("p")[0]
58
- transformation["crop"] = "scale"
59
 
60
  # Generate the compressed and converted video URL
61
  compressed_video_url, options = cloudinary_url(
 
52
  "video_codec": codec # Specify the video codec
53
  }
54
 
55
+ # Add resolution only if specified
56
  if resolution:
57
  transformation["width"] = resolution.split("p")[0]
58
+ transformation["crop"] = "scale" # Ensures scaling to specified resolution
59
 
60
  # Generate the compressed and converted video URL
61
  compressed_video_url, options = cloudinary_url(