-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
make_frame(t) after concatenation #632
Comments
…() make_frame(). fixes Zulko#632
Hi, I hit the same issue when the subtitles time is outside the video limits. Here is a sample code to reproduce the bug:
Hope it helps! |
Hey @llazzaro, I tried, but I couldn't replicate your crash. For me, the background clip just stopped for a second before the video finished. Even though you are getting an IndexError, this is definitely a different issue, so would you mind opening a new issue with more details (such as the clip that you are using as |
@tburrows13 I will try to open a new issue with a test to reproduce the bug, thanks! |
First of all I wanted to say what a cool project moviepy is and thank everyone who participated in it.
I wrote an algorithm using moviepy which cuts a clip in very tiny bits and applies different effects to it and then concatenates them back together.
Sometimes I get this error message while rendering in the end:
Unfortunately I cant narrow it down to a minimal example that repoduces it but in
concatenate.py in line 82 the
make_frame(t)
-method tries to find out which of the concatenated clips it has to use for the current frame. For this it enumerates overtt
buttt
has always one item more than there are clips because of its creation in line 71. So in some cases (which exactly I dont fully understand) it reaches this last index which leads to the error above.You can see that when you make an explicit call to
make_frame(t)
after concatenation:A quick fix which seems to break nothing would be to adjust line 82 to
i = max([i for i, e in zip(range(len(tt) - 1), tt) if e <= t])
. So to just skip the last entry for the enumeration.The text was updated successfully, but these errors were encountered: