Created
October 21, 2018 17:08
-
-
Save rsnk96/85995fe5e6ec171c9dca699c0f0dbb8c to your computer and use it in GitHub Desktop.
Merging indexed video fragments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess as sp | |
with open("temp_files.txt", "w") as f: | |
for t in ["output_{}.avi".format(i) for i in range(num_processes)]: | |
f.write("file {} \n".format(t)) | |
ffmpeg_command = "ffmpeg -f concat -safe 0 -i temp_files.txt -vcodec copy" | |
sp.Popen(ffmpeg_command, shell=True).wait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment