Spaces:
Build error
Build error
app.py
CHANGED
|
@@ -166,18 +166,18 @@ def gen_moviepy_gif(start_seconds, end_seconds):
|
|
| 166 |
video_path = "./ShiaLaBeouf.mp4"
|
| 167 |
video = mp.VideoFileClip(video_path) #.resize(0.3)
|
| 168 |
final_clip = video.subclip(start_seconds, end_seconds)
|
| 169 |
-
final_clip.write_videofile("gifimage.mp4")
|
| 170 |
print("I am here now")
|
| 171 |
|
| 172 |
-
gifclip = VideoFileClip("gifimage.mp4")
|
| 173 |
print("all good so far")
|
| 174 |
-
|
| 175 |
print("pretty good")
|
| 176 |
-
gif_img = mp.VideoFileClip("gifimage.gif")
|
| 177 |
|
| 178 |
#final_clip.close()
|
| 179 |
print("At the very end")
|
| 180 |
-
return gif_img
|
| 181 |
|
| 182 |
|
| 183 |
# showing gif
|
|
|
|
| 166 |
video_path = "./ShiaLaBeouf.mp4"
|
| 167 |
video = mp.VideoFileClip(video_path) #.resize(0.3)
|
| 168 |
final_clip = video.subclip(start_seconds, end_seconds)
|
| 169 |
+
#final_clip.write_videofile("gifimage.mp4")
|
| 170 |
print("I am here now")
|
| 171 |
|
| 172 |
+
#gifclip = VideoFileClip("gifimage.mp4")
|
| 173 |
print("all good so far")
|
| 174 |
+
final_clip.write_gif("gifimage.gif") #, program='ffmpeg', tempfiles=True, fps=15, fuzz=3)
|
| 175 |
print("pretty good")
|
| 176 |
+
#gif_img = mp.VideoFileClip("gifimage.gif")
|
| 177 |
|
| 178 |
#final_clip.close()
|
| 179 |
print("At the very end")
|
| 180 |
+
return #gif_img
|
| 181 |
|
| 182 |
|
| 183 |
# showing gif
|