Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def capture_function(vid):
|
|
61 |
fbox=[]
|
62 |
cnt=0
|
63 |
frame_count1= int(frame_count)
|
64 |
-
for i in range(int(frame_count1)):
|
65 |
capture.set(cv2.CAP_PROP_POS_FRAMES, i)
|
66 |
ret, frame_f = capture.read(i)
|
67 |
#frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
|
@@ -181,7 +181,10 @@ def make_gif():
|
|
181 |
|
182 |
return out,out
|
183 |
def update_speed(inp,clip_speed,fps):
|
184 |
-
|
|
|
|
|
|
|
185 |
mod_fps=float(fps)*float(clip_speed)
|
186 |
clip = VideoFileClip(inp)
|
187 |
#final = clip.fx(vfx.speedx, clip_speed)
|
|
|
61 |
fbox=[]
|
62 |
cnt=0
|
63 |
frame_count1= int(frame_count)
|
64 |
+
for i in range(int(frame_count1)-1):
|
65 |
capture.set(cv2.CAP_PROP_POS_FRAMES, i)
|
66 |
ret, frame_f = capture.read(i)
|
67 |
#frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
|
|
|
181 |
|
182 |
return out,out
|
183 |
def update_speed(inp,clip_speed,fps):
|
184 |
+
if "-split.mp4" in inp:
|
185 |
+
out_inp = f'{inp.split("-split.mp4",1)[0]}-split.mp4'
|
186 |
+
else:
|
187 |
+
out_inp = f'{inp.split(".mp4",1)[0]}-split.mp4'
|
188 |
mod_fps=float(fps)*float(clip_speed)
|
189 |
clip = VideoFileClip(inp)
|
190 |
#final = clip.fx(vfx.speedx, clip_speed)
|