So I am trying to export my video in moviepy. All other videos export fine (with write_videofile()
) but for some reason this one isn't. It exports fine until frame 7423 - where it throws this error:
IndexError: index -239606 is out of bounds for axis 0 with size 200000
Here is my export code:
videoName = self.nameEntry.get()
clips = []
for key in list(self.clipFrames.keys()):
clips.append(self.clipFrames[key][1])
for index, clip in enumerate(clips):
clips[index] = clip.without_audio().set_audio(clip.audio)
final_clip = concatenate_videoclips(clips)
if self.fpsEntry.get() != "":
final_clip = final_clip.set_fps(int(self.fpsEntry.get()))
print(final_clip.duration)
# final_clip.set_duration(final_clip.duration)
print(type(final_clip))
final_clip.write_videofile(videoName + ".mp4", verbose=True, threads=6) # , preset=str(self.speedList.get())
box.showinfo("Success", "Your video has been successfully created!")
does anyone have any idea what is going wrong?