roychao19477 commited on
Commit
68a2244
·
1 Parent(s): b58f36c

Add limitations

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -146,7 +146,7 @@ def downsample_if_needed(video_path):
146
  cap.release()
147
 
148
  if max(width, height) > 720:
149
- downsampled_path = video_path.replace(".mp4", "_720p.mp4")
150
  ffmpeg.input(video_path).output(
151
  downsampled_path, vf="scale='min(720,iw)':-2", **{"c:v": "libx264"}
152
  ).overwrite_output().run()
 
146
  cap.release()
147
 
148
  if max(width, height) > 720:
149
+ downsampled_path = f"/tmp/downsampled_720p.mp4"
150
  ffmpeg.input(video_path).output(
151
  downsampled_path, vf="scale='min(720,iw)':-2", **{"c:v": "libx264"}
152
  ).overwrite_output().run()