ariansyahdedy commited on
Commit
730bd4b
·
1 Parent(s): 9bc9d8e
Files changed (1) hide show
  1. app/routers/video.py +3 -3
app/routers/video.py CHANGED
@@ -107,9 +107,9 @@ async def process_video_and_return_url(video_file: UploadFile):
107
  logger.info(f"Output directory created or already exists: {output_dir}")
108
  if not os.access(output_dir, os.W_OK):
109
  raise PermissionError(f"Cannot write to directory: {output_dir}")
110
- output_image_path = f"./code/output_frames/{os.path.splitext(video_file.filename)[0]}_first_frame.png"
111
  logger.info(f"Output image path: {output_image_path}")
112
- print(output_image_path)
113
  # output_image_path = (os.path.join(output_dir, f"{os.path.splitext(video_file.filename)[0]}_first_frame.png")).replace("\\", "/")
114
 
115
  # Save the uploaded video file
@@ -121,7 +121,7 @@ async def process_video_and_return_url(video_file: UploadFile):
121
  logger.error(f"Error saving uploaded video: {e}")
122
  raise HTTPException(status_code=500, detail="Failed to save uploaded video")
123
 
124
- print(output_image_path)
125
  # Process the video asynchronously
126
  success = await save_first_frame(video_path, output_image_path)
127
  if success:
 
107
  logger.info(f"Output directory created or already exists: {output_dir}")
108
  if not os.access(output_dir, os.W_OK):
109
  raise PermissionError(f"Cannot write to directory: {output_dir}")
110
+ output_image_path = f"./output_frames/{os.path.splitext(video_file.filename)[0]}_first_frame.png"
111
  logger.info(f"Output image path: {output_image_path}")
112
+ # print(output_image_path)
113
  # output_image_path = (os.path.join(output_dir, f"{os.path.splitext(video_file.filename)[0]}_first_frame.png")).replace("\\", "/")
114
 
115
  # Save the uploaded video file
 
121
  logger.error(f"Error saving uploaded video: {e}")
122
  raise HTTPException(status_code=500, detail="Failed to save uploaded video")
123
 
124
+ # print(output_image_path)
125
  # Process the video asynchronously
126
  success = await save_first_frame(video_path, output_image_path)
127
  if success: