mhamza-007 commited on
Commit
1950d24
·
verified ·
1 Parent(s): f0ef166

Update routes/video_routes.py

Browse files
Files changed (1) hide show
  1. routes/video_routes.py +4 -4
routes/video_routes.py CHANGED
@@ -31,13 +31,13 @@ async def receive_video(video: VideoUrl = Body(...)):
31
  temp_file.write(chunk)
32
  video_filename = temp_file.name
33
 
34
- noaudio_video = remove_audio_from_video(video_filename)
35
- if not noaudio_video:
36
- raise HTTPException(status_code=400, detail="Failed to remove audio from the video.")
37
 
38
  start_time = time.time()
39
  print("\n<======= Extracting faces from video =======>")
40
- extract_face_from_video(noaudio_video, EXTRACTED_FRAMES_DIR)
41
  if not os.listdir(EXTRACTED_FRAMES_DIR):
42
  raise HTTPException(status_code=400, detail="No frames were extracted.")
43
  print(f"Face extraction completed in {time.time() - start_time:.2f} seconds")
 
31
  temp_file.write(chunk)
32
  video_filename = temp_file.name
33
 
34
+ # noaudio_video = remove_audio_from_video(video_filename)
35
+ # if not noaudio_video:
36
+ # raise HTTPException(status_code=400, detail="Failed to remove audio from the video.")
37
 
38
  start_time = time.time()
39
  print("\n<======= Extracting faces from video =======>")
40
+ extract_face_from_video(video_filename, EXTRACTED_FRAMES_DIR)
41
  if not os.listdir(EXTRACTED_FRAMES_DIR):
42
  raise HTTPException(status_code=400, detail="No frames were extracted.")
43
  print(f"Face extraction completed in {time.time() - start_time:.2f} seconds")