freealise commited on
Commit
cde3fbe
1 Parent(s): b73bbe4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -44,10 +44,10 @@ def get_frames(video_in, step, name):
44
  clip = VideoFileClip(video_in)
45
 
46
  #check fps
47
- if clip.fps > 30:
48
- print("vide rate is over 30, resetting to 30")
49
  clip_resized = clip.resize(height=512)
50
- clip_resized.write_videofile("video_resized.mp4", fps=30)
51
  else:
52
  print("video rate is OK")
53
  clip_resized = clip.resize(height=512)
@@ -92,7 +92,7 @@ def infer(video_in,interpolation,fps_output):
92
  frames_list= break_vid[0]
93
  fps = break_vid[1]
94
  print(f"ORIGIN FPS: {fps}")
95
- n_frame = int(4*fps) #limited to 4 seconds
96
  #n_frame = len(frames_list)
97
 
98
  if n_frame >= len(frames_list):
 
44
  clip = VideoFileClip(video_in)
45
 
46
  #check fps
47
+ if clip.fps > 25:
48
+ print("vide rate is over 25, resetting to 25")
49
  clip_resized = clip.resize(height=512)
50
+ clip_resized.write_videofile("video_resized.mp4", fps=25)
51
  else:
52
  print("video rate is OK")
53
  clip_resized = clip.resize(height=512)
 
92
  frames_list= break_vid[0]
93
  fps = break_vid[1]
94
  print(f"ORIGIN FPS: {fps}")
95
+ n_frame = int(15*fps) #limited to 15 seconds
96
  #n_frame = len(frames_list)
97
 
98
  if n_frame >= len(frames_list):