[Python] Python MoviePy 2 rendering super slow when using Loop/TimeSymmetrize/TimeMirror

Discussão em 'Python' iniciado por Stack, Maio 1, 2025.

  1. Stack

    Stack Membro Participativo

    For the first frames, that exist in the video, the rendering goes normally. However after it passes the frames of the original video and has to start rendering the video in reverse, it gets super slow and prints an error on every frame. As far as I understand, it is trying to access frames that don't exist. Although when I wait for the process to finish, the result looks fine. The original clip is 1002 frames long.

    clip = VideoFileClip("C:/Users/Marte/PycharmProjects/RedditStoriesGenerator/videos/road.mp4")
    final_clip = TimeSymmetrize().apply(clip)

    final_clip.write_videofile("road_looped.mp4", codec="libx264")


    Error:

    frame_index: 50%|█████ | 1003/2004 [03:39<03:50, 4.34it/s, now=None]
    C:\Users\Marte\PycharmProjects\RedditVideoMakerBot\.venv1\lib\site-packages\moviepy\video\io\ffmpeg_reader.py:178:
    UserWarning: In file C:/Users/Marte/PycharmProjects/RedditStoriesGenerator/videos/road.mp4,
    11059200 bytes wanted but 0 bytes read at frame index 1002
    (out of a total 1002 frames), at time 16.72/16.72 sec.
    Using the last valid frame instead.
    warnings.warn(


    What am I doing wrong?

    I have tries using different syntax but with no help.

    Continue reading...

Compartilhe esta Página