Jeffgold commited on
Commit
8447861
·
1 Parent(s): 852120d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -85,9 +85,9 @@ def convert_video(video_file, quality, aspect_ratio, video_url):
85
  return output_path
86
  else:
87
  # The file does not exist, so we need to convert it
88
- if aspect_ratio is None:
89
- video = VideoFileClip(input_path)
90
- aspect_ratio = f"{video.size[0]}:{video.size[1]}"
91
 
92
  ffmpeg_command = f"ffmpeg -i {input_path} -c:v libx264 -crf {quality} -vf scale=-1:720,setsar={aspect_ratio} -hls_time 6 -hls_playlist_type vod -f hls {output_path}"
93
 
 
85
  return output_path
86
  else:
87
  # The file does not exist, so we need to convert it
88
+ if aspect_ratio is None:
89
+ video = VideoFileClip(input_path)
90
+ aspect_ratio = f"{video.size[0]}:{video.size[1]}"
91
 
92
  ffmpeg_command = f"ffmpeg -i {input_path} -c:v libx264 -crf {quality} -vf scale=-1:720,setsar={aspect_ratio} -hls_time 6 -hls_playlist_type vod -f hls {output_path}"
93