Commit
·
c485ab3
1
Parent(s):
9ca6daf
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,11 +52,18 @@ def get_frames(video_in, step, name):
|
|
| 52 |
#check fps
|
| 53 |
if clip.fps > 30:
|
| 54 |
print("vide rate is over 30, resetting to 30")
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
| 56 |
clip_resized.write_videofile("video_resized.mp4", fps=30, bitrate="12000k")
|
| 57 |
else:
|
| 58 |
print("video rate is OK")
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
clip_resized.write_videofile("video_resized.mp4", fps=clip.fps, bitrate="12000k")
|
| 61 |
|
| 62 |
print("video resized to 576 height")
|
|
|
|
| 52 |
#check fps
|
| 53 |
if clip.fps > 30:
|
| 54 |
print("vide rate is over 30, resetting to 30")
|
| 55 |
+
# note: we used to resize the input video, but this is gonna prevent us from working with portrait videos, so..
|
| 56 |
+
# clip_resized = clip.resize(height=576)
|
| 57 |
+
clip_resized = clip
|
| 58 |
+
|
| 59 |
clip_resized.write_videofile("video_resized.mp4", fps=30, bitrate="12000k")
|
| 60 |
else:
|
| 61 |
print("video rate is OK")
|
| 62 |
+
|
| 63 |
+
# note: we used to resize the input video, but this is gonnal prevent us from working with portrait videos, so..
|
| 64 |
+
# clip_resized = clip.resize(height=576)
|
| 65 |
+
clip_resized = clip
|
| 66 |
+
|
| 67 |
clip_resized.write_videofile("video_resized.mp4", fps=clip.fps, bitrate="12000k")
|
| 68 |
|
| 69 |
print("video resized to 576 height")
|