Spaces:
Build error
Build error
Commit
Β·
01c4816
1
Parent(s):
84a1b4f
Update video_watermark_remover.py
Browse files
video_watermark_remover.py
CHANGED
@@ -83,8 +83,12 @@ def remove_watermark(sketch, images_path='frames', output_path='output_images'):
|
|
83 |
def convert_video_to_frames(video):
|
84 |
if os.path.exists('input_video.mp4'):
|
85 |
os.remove('input_video.mp4')
|
86 |
-
|
87 |
-
|
|
|
|
|
|
|
|
|
88 |
video_path = 'input_video.mp4'
|
89 |
|
90 |
if os.path.exists('frames'):
|
|
|
83 |
def convert_video_to_frames(video):
|
84 |
if os.path.exists('input_video.mp4'):
|
85 |
os.remove('input_video.mp4')
|
86 |
+
|
87 |
+
with open(video, 'rb') as f:
|
88 |
+
with open('input_video.mp4', 'wb') as f2:
|
89 |
+
f2.write(f.read())
|
90 |
+
|
91 |
+
#os.system(f"ffmpeg -i {video} input_video.mp4")
|
92 |
video_path = 'input_video.mp4'
|
93 |
|
94 |
if os.path.exists('frames'):
|