Junfeng5 commited on
Commit
b55dd40
1 Parent(s): 73c8314

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -616,7 +616,9 @@ def segment_video(video, prompt_mode, categoryname, custom_category, expressiong
616
  size = (ori_width,ori_height)
617
  print('writing video...')
618
  output_file = "test.mp4"
619
- writer = skvideo.io.FFmpegWriter(output_file,outputdict={'-r': str(read_fps),})
 
 
620
  for i in range(len(ourput_frames)):
621
  writer.writeFrame(ourput_frames[i])
622
  writer.close()
@@ -841,7 +843,9 @@ def segment_video(video, prompt_mode, categoryname, custom_category, expressiong
841
 
842
  size = (ori_width,ori_height)
843
  output_file = "test.mp4"
844
- writer = skvideo.io.FFmpegWriter(output_file,outputdict={'-r': str(read_fps),})
 
 
845
  for i in range(len(output_vos_results)):
846
  writer.writeFrame(output_vos_results[i])
847
  writer.close()
 
616
  size = (ori_width,ori_height)
617
  print('writing video...')
618
  output_file = "test.mp4"
619
+ writer = skvideo.io.FFmpegWriter(output_file,
620
+ inputdict={'-r': str(read_fps)},
621
+ outputdict={'-r': str(read_fps), '-vcodec': 'libx264'})
622
  for i in range(len(ourput_frames)):
623
  writer.writeFrame(ourput_frames[i])
624
  writer.close()
 
843
 
844
  size = (ori_width,ori_height)
845
  output_file = "test.mp4"
846
+ writer = skvideo.io.FFmpegWriter(output_file,
847
+ inputdict={'-r': str(read_fps)},
848
+ outputdict={'-r': str(read_fps), '-vcodec': 'libx264'})
849
  for i in range(len(output_vos_results)):
850
  writer.writeFrame(output_vos_results[i])
851
  writer.close()