Omnibus commited on
Commit
65ed852
·
1 Parent(s): ec20097

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -81,7 +81,8 @@ def trim_vid(vid,start_time,end_time):
81
  start=start_hr+start_min+start_sec
82
  end=end_hr+end_min+end_sec
83
 
84
- clip = VideoFileClip(vid)
 
85
  mod_fps=clip.fps
86
  clip = clip.subclip(start, end)
87
  clip.write_videofile(f"{uid}-clip.mp4", fps=mod_fps)
@@ -113,9 +114,9 @@ def get_frames(vid):
113
  capture.set(cv2.CAP_PROP_POS_FRAMES, i)
114
  _, frame = capture.read()
115
  #frame = cv2.resize(frame, (350, 600))
116
- cv2.imwrite(f'{uid}-{i}.png', cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
117
- frame_text.append(f'{uid}-{i}.png')
118
- yield frame_text
119
 
120
  tog_box=[]
121
  def tog_box(inp):
 
81
  start=start_hr+start_min+start_sec
82
  end=end_hr+end_min+end_sec
83
 
84
+ og_clip = VideoFileClip(vid)
85
+ clip=og_clip.without_audio()
86
  mod_fps=clip.fps
87
  clip = clip.subclip(start, end)
88
  clip.write_videofile(f"{uid}-clip.mp4", fps=mod_fps)
 
114
  capture.set(cv2.CAP_PROP_POS_FRAMES, i)
115
  _, frame = capture.read()
116
  #frame = cv2.resize(frame, (350, 600))
117
+ #cv2.imwrite(f'{uid}-{i}.png', cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
118
+ #frame_text.append(f'{uid}-{i}.png')
119
+ yield frame
120
 
121
  tog_box=[]
122
  def tog_box(inp):