jschwab21 commited on
Commit
bc61f55
·
verified ·
1 Parent(s): f5e8a49

Update video_processing.py

Browse files
Files changed (1) hide show
  1. video_processing.py +3 -0
video_processing.py CHANGED
@@ -27,6 +27,8 @@ def process_video(video_url, description):
27
 
28
  # Save and return the final clip
29
  try:
 
 
30
  final_clip.write_videofile(final_clip_path)
31
  except Exception as e:
32
  return str(e)
@@ -117,3 +119,4 @@ def download_video(video_url):
117
  video_file = ydl.prepare_filename(info_dict)
118
 
119
  return video_file
 
 
27
 
28
  # Save and return the final clip
29
  try:
30
+ if os.path.exists(final_clip_path):
31
+ os.remove(final_clip_path)
32
  final_clip.write_videofile(final_clip_path)
33
  except Exception as e:
34
  return str(e)
 
119
  video_file = ydl.prepare_filename(info_dict)
120
 
121
  return video_file
122
+