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

Freeze effect removes with_start and with_end from clip #2334

Open
Pierrad opened this issue Jan 19, 2025 · 1 comment
Open

Freeze effect removes with_start and with_end from clip #2334

Pierrad opened this issue Jan 19, 2025 · 1 comment
Labels
bug Issues that report (apparent) bugs.

Comments

@Pierrad
Copy link

Pierrad commented Jan 19, 2025

Hi, thanks for this great library!

Problem

When working on a video, we just run into the following bug (we think it's a bug).

When you use the Freeze effect on a VideoClip, you need to put the with_start() after the with_effects()otherwise it will remove the previous clip (if exists) from the final video. It seems that the Freeze effect redefine the start and end of a VideoClip.

Non-working code :

from moviepy import *

clip = VideoFileClip("clip.mp4")
clip = clip.with_start(other_clip.end)
clip = clip.with_effects([vfx.Freeze(12, 2)]) # Effect after with_start()

Working code :

from moviepy import *

clip = VideoFileClip("clip.mp4")
clip = clip.with_effects([vfx.Freeze(12, 2)]) # Effect before with_start()
clip = clip.with_start(other_clip.end)

Expected behavior

We think that whenever the position of the effect, it should not erase the start and end of the video. Or otherwise, it should be specified somewhere in the documentation.

Specifications

  • Python Version: 3.10
  • MoviePy Version: 2.1.1
  • Platform Name: MacOS
  • Platform Version: 14.5
@Pierrad Pierrad added the bug Issues that report (apparent) bugs. label Jan 19, 2025
@Implosiv3
Copy link

Implosiv3 commented Jan 19, 2025

Yes, thats a good point. I've been watching the code and that is because that effect is creating a new clip instead of just transforming the original one (as most of the effects do), so the new clip doesn't have those start and end properties.

As the Freeze effect will always increase the duration, I think setting the start and end of that new clip would not be a problem, so it would work as the others (preserving start and end), but lets listen one of the main project maintainers.

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

2 participants