Skip to content

Commit

Permalink
修复部分视频截取出来开头几秒卡住的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
chn-lee-yumi committed Jul 8, 2024
1 parent 55dac8c commit 2021900
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,14 @@ def crop_video(input_file, output_file, start_time, end_time):
cmd += ".exe"
command = [
cmd,
'-i', input_file,
'-ss', format_seconds(start_time),
'-to', format_seconds(end_time),
'-i', input_file,
'-c:v', 'copy',
'-c:a', 'copy',
output_file
]
logger.info("Crop video:", " ".join(command))
subprocess.run(command)


Expand Down

0 comments on commit 2021900

Please sign in to comment.