diff --git a/quick_split_video.py b/quick_split_video.py index a82650e..38237d0 100644 --- a/quick_split_video.py +++ b/quick_split_video.py @@ -11,7 +11,7 @@ OVERFLOW_SEC = 4 def get_video_real_duration(filename): ffmpeg_process = subprocess.Popen([ - "ffmpeg", "-i", filename, "-c", "copy", "-f", "null", "-" + "ffmpeg", "-hide_banner", "-i", filename, "-c", "copy", "-f", "null", "-" ], stdout=subprocess.PIPE, stderr=subprocess.PIPE) result = "0:0:0.0" for line in ffmpeg_process.stderr.readlines(): @@ -44,9 +44,9 @@ if __name__ == '__main__': print("BIAS_T", current_sec) split_process = subprocess.Popen([ "ffmpeg", "-y", "-hide_banner", "-progress", "-", "-v", "0", + "-ss", str(current_sec), "-i", input_file, "-c", "copy", "-f", "mp4", "-t", str(EACH_SEC + OVERFLOW_SEC), - "-ss", str(current_sec), "{}.mp4".format(current_dt) ]) split_process.wait()