Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unspecified loop duration causes clip to blank #2135

Open
dcaponi opened this issue Mar 13, 2024 · 1 comment
Open

Unspecified loop duration causes clip to blank #2135

dcaponi opened this issue Mar 13, 2024 · 1 comment
Labels
bug Issues that report (apparent) bugs.

Comments

@dcaponi
Copy link

dcaponi commented Mar 13, 2024

Expected Behavior

Using either the .loop() method on VideoFileClip or the loop function imported from fx should loop my gif forever when placed inside another video (so for the duration of the video)

Actual Behavior

The gif clip takes up the whole screen and is just black

Steps to Reproduce the Problem

from moviepy.editor import VideoFileClip, CompositeVideoClip
from moviepy.video.fx.all import loop

bg = VideoFileClip(stock_footage_path).resize((1080, 1920))
fg = VideoFileClip(gif_path).resize((300, 300)).loop()
# loop(VideoFileClip(gif_path).resize((300, 300))
clip = CompositeVideoClip([bg, fg])

I also tried taking out the resize calls and it still has the same effect

Specifications

  • Python Version: Python 3.11.7
  • MoviePy Version: moviepy==1.0.3
  • Platform Name: Apple M1
  • Platform Version:MacOS Sonoma 14.3.1
@dcaponi dcaponi added the bug Issues that report (apparent) bugs. label Mar 13, 2024
@dcaponi
Copy link
Author

dcaponi commented Mar 13, 2024

Workaround:

Specify an absurdly long loop duration (I did 10 days)

VideoFileClip(gif_path).resize((300, 300)).loop(999999)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that report (apparent) bugs.
Projects
None yet
Development

No branches or pull requests

1 participant