Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from os import sep
- from moviepy.editor import *
- import gc
- def function():
- clips = []
- for i in range(len(self.cuts)):
- for j in range(len(self.cuts[i])):
- clips.append((VideoFileClip(video)).subclip((self.cuts[i][j][0]), (self.cuts[i][j][1])))
- if not self.audio:
- clips[-1] = clips[-1].without_audio()
- location = "output"+sep
- panel = None
- try:
- panel = concatenate_videoclips(clips)
- panel.write_videofile("{}{}{}.{}".format(location, oname, '_'+attempt, output_type), fps=30, bitrate=self.bitrate)
- except Exception as e:
- del panel, clips
- gc.collect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement