Omnibus commited on
Commit
e1165b4
·
1 Parent(s): d03cf41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -5,6 +5,7 @@ import json
5
  from rembg import remove as rm
6
  import cv2
7
  import uuid
 
8
  from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
9
  import moviepy.video.io.ImageSequenceClip
10
  from moviepy.editor import *
@@ -183,7 +184,8 @@ def make_gif():
183
  def update_speed(inp,clip_speed,fps):
184
  mod_fps=float(fps)*float(clip_speed)
185
  clip = VideoFileClip(inp)
186
- final = clip.fx(vfx.speedx, clip_speed)
 
187
  final.write_videofile(f'{inp}', fps=mod_fps)
188
  return f'{inp}'
189
  with gr.Blocks() as app:
 
5
  from rembg import remove as rm
6
  import cv2
7
  import uuid
8
+ import moviepy
9
  from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
10
  import moviepy.video.io.ImageSequenceClip
11
  from moviepy.editor import *
 
184
  def update_speed(inp,clip_speed,fps):
185
  mod_fps=float(fps)*float(clip_speed)
186
  clip = VideoFileClip(inp)
187
+ #final = clip.fx(vfx.speedx, clip_speed)
188
+ final = moviepy.video.fx.all.speedx(clip, factor=clip_speed)
189
  final.write_videofile(f'{inp}', fps=mod_fps)
190
  return f'{inp}'
191
  with gr.Blocks() as app: