[Python] Trying to concatanate a list of images to make a video but i get a error

Discussão em 'Python' iniciado por Stack, Abril 19, 2025.

  1. Stack

    Stack Membro Participativo

    [This is a screenshot ofHeres a screenshot of the error code block]2Heres the code:

    import os
    from moviepy.editor import *

    Memes = []
    numLabel = 0

    for pictures in os.listdir("memes"):
    ImageClip("memes/" + pictures).set_duration(5)
    Memes.append(pictures)

    video = concatenate(Memes, method="compose")
    video.write_videofile('test.mp4', fps=24)


    I get this error:

    'str' object has no attribute 'duration'

    as you can see there is a duration assigned to the list of memes please help me I wasted 3 days on this error

    Continue reading...

Compartilhe esta Página