freealise commited on
Commit
03cf9d3
1 Parent(s): 6f829cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -44,18 +44,18 @@ def get_frames(video_in, step, name):
44
  clip = cv2.VideoCapture(video_in)
45
  cframes = int(clip.get(cv2.CAP_PROP_FRAME_COUNT))
46
  cfps = int(clip.get(cv2.CAP_PROP_FPS))
47
- print(f'Frames {cframes} fps: {cfps}')
48
 
49
  #clip = VideoFileClip(video_in)
50
 
51
  #check fps
52
  if cfps > 25:
53
  print("video rate is over 25, resetting to 25")
54
- clip_resized = clip.resize(height=1024)
55
  clip_resized.write_videofile("video_resized.mp4", fps=25)
56
  else:
57
  print("video rate is OK")
58
- clip_resized = clip.resize(height=1024)
59
  clip_resized.write_videofile("video_resized.mp4", fps=cfps)
60
 
61
  print("video resized to 1024 height")
 
44
  clip = cv2.VideoCapture(video_in)
45
  cframes = int(clip.get(cv2.CAP_PROP_FRAME_COUNT))
46
  cfps = int(clip.get(cv2.CAP_PROP_FPS))
47
+ print(f'Frames: {cframes}, fps: {cfps}')
48
 
49
  #clip = VideoFileClip(video_in)
50
 
51
  #check fps
52
  if cfps > 25:
53
  print("video rate is over 25, resetting to 25")
54
+ clip_resized = clip #.resize(height=1024)
55
  clip_resized.write_videofile("video_resized.mp4", fps=25)
56
  else:
57
  print("video rate is OK")
58
+ clip_resized = clip #.resize(height=1024)
59
  clip_resized.write_videofile("video_resized.mp4", fps=cfps)
60
 
61
  print("video resized to 1024 height")