0

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?

  • Hello, would you mind trying it with the latest master branch on GitHub and if it still crashes please post the minimal code to reproduce the issue and the video file as an issue there. – Tom Burrows Mar 26 '21 at 22:46
  • Sorry I'm not familiar with GitHub. Do you mean install the latest version? – Mini Minnow Mar 27 '21 at 08:11
  • Its a little complicated :) There's the version v2.0.0.dev2 which is installable by pip, but only if you use the `--pre` flag. Then there's the current master branch which is the very latest version that hasn't had an official release. If you can reproduce this bug on either of those 2 versions, then that's important and should be reported. – Tom Burrows Mar 27 '21 at 19:14

0 Answers0