We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, First I want to say Moviepy is freaking magic! Thank you for making it!
Platform: Windows 7 64bit, Python 2.7.9
Issue:
Traceback (most recent call last): File "soccer_cuts.py", line 18, in <module> volumes = [volume(cut(i)) for i in range(0,int(clip.audio.duration-2))] File "soccer_cuts.py", line 16, in <lambda> cut = lambda i: clip.audio.subclip(i,i+1).to_soundarray(fps=22000) File "<string>", line 2, in to_soundarray File "C:\Python27\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration return f(clip, *a, **k) File "C:\Python27\lib\site-packages\moviepy\audio\AudioClip.py", line 116, in to_soundarray tt = np.arange(0,clip.duration, 1.0/fps) NameError: global name 'clip' is not defined
"clip" was not capitalized in line 116 of C:\Python27\lib\site-packages\moviepy\audio\AudioClip.py
I edited that to be consistent with the rest of the file: I changed: from:
tt = np.arange(0,clip.duration, 1.0/fps)
to:
tt = np.arange(0,Clip.duration, 1.0/fps)
which gave this on the output:
Traceback (most recent call last): File "soccer_cuts.py", line 18, in <module> volumes = [volume(cut(i)) for i in range(0,int(inputvideoclip.audio.duration-2))] File "soccer_cuts.py", line 16, in <lambda> cut = lambda i: inputvideoclip.audio.subclip(i,i+1).to_soundarray(fps=22000) File "<string>", line 2, in to_soundarray File "C:\Python27\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration return f(clip, *a, **k) File "C:\Python27\lib\site-packages\moviepy\audio\AudioClip.py", line 116, in to_soundarray tt = np.arange(0,Clip.duration, 1.0/fps) AttributeError: class Clip has no attribute 'duration'
I looked at the C:\Python27\lib\site-packages\moviepy\audio\AudioClip.py file closer and I changed: from:
tt = np.arange(0,self.duration, 1.0/fps)
and It works now!
Did I mention that Moviepy is AMAZING? :)
The text was updated successfully, but these errors were encountered:
Thanks for the bug report and for the fix !
I can't believe this bug hadn't been reported yet. I'll correct that.
Sorry, something went wrong.
No problem. Glad to help!
Fixed. Thanks for this !
No branches or pull requests
Hello,
First I want to say Moviepy is freaking magic! Thank you for making it!
Platform: Windows 7 64bit, Python 2.7.9
Issue:
"clip" was not capitalized in line 116 of C:\Python27\lib\site-packages\moviepy\audio\AudioClip.py
I edited that to be consistent with the rest of the file: I changed:
from:
to:
which gave this on the output:
I looked at the C:\Python27\lib\site-packages\moviepy\audio\AudioClip.py file closer and I changed:
from:
to:
and It works now!
Did I mention that Moviepy is AMAZING? :)
The text was updated successfully, but these errors were encountered: