[Python] Error with the output when using moviepy module to concatenate video files

Discussão em 'Python' iniciado por Stack, Julho 4, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to use moviepy to join some video clips together, I get the output, with the files joined as expected. When watching the final video, clip1 looks as expected but clip2 has an error, see image. [​IMG] All resources I have looked at show that the way the code I have written should work, so am unure what I could do to solve the issue. Any suggestion would be amazing!

    The code that I used

    filenames = ['clip1.mp4', 'clip2.mp4', 'clip3.mp4']

    for x in range(len(filenames)):
    filenames[x] = VideoFileClip(filenames[x])

    final_video = concatenate_videoclips(filenames)
    final_video.to_videofile("final_video.mp4", fps=30, codec="mpeg4")

    Continue reading...

Compartilhe esta Página