LapStore commited on
Commit
593ade3
·
1 Parent(s): a809470
Files changed (2) hide show
  1. app.py +1 -1
  2. server.py +1 -1
app.py CHANGED
@@ -61,7 +61,7 @@ async def Video(video_file: UploadFile = File(...),kind_back: str = Form(...), b
61
  #nparr = np.frombuffer(video_data, np.uint8)
62
  #video_path=cv2.imdecode(nparr, cv2.IMREAD_COLOR) #named this as just passed as it's path
63
 
64
- video_path = f'/tmp/tmptmp.mp4'#{video_file.filename}
65
  with open(video_path, 'wb') as f:
66
  f.write(await video_file.read())
67
 
 
61
  #nparr = np.frombuffer(video_data, np.uint8)
62
  #video_path=cv2.imdecode(nparr, cv2.IMREAD_COLOR) #named this as just passed as it's path
63
 
64
+ video_path = f'/tmp/tmptmp.avi'#{video_file.filename}
65
  with open(video_path, 'wb') as f:
66
  f.write(await video_file.read())
67
 
server.py CHANGED
@@ -159,7 +159,7 @@ class SegmenterBackground():
159
  #number_frames= int(cv2.CAP_PROP_FRAME_COUNT)
160
 
161
  # Define the codec and create VideoWriter object to save the output video
162
- fourcc = cv2.VideoWriter_fourcc(*'XVID')
163
  out = cv2.VideoWriter(output_path, fourcc, fps, (frame_width, frame_height))
164
  if isinstance(background_image, Image.Image):
165
  background_image = background_image.resize((640, 480))
 
159
  #number_frames= int(cv2.CAP_PROP_FRAME_COUNT)
160
 
161
  # Define the codec and create VideoWriter object to save the output video
162
+ fourcc = cv2.VideoWriter_fourcc(*'XVID')#avi ,mp4?? H264: This is the most widely used video compression standard for MP4 files.
163
  out = cv2.VideoWriter(output_path, fourcc, fps, (frame_width, frame_height))
164
  if isinstance(background_image, Image.Image):
165
  background_image = background_image.resize((640, 480))