Jan-20-2023, 10:52 PM
(This post was last modified: Jan-20-2023, 11:51 PM by Larz60+.
Edit Reason: fixed error bbcode tags
)
Good evening, can you help me and tell me what I am doing wrong because it tells me that it is not callable. reggards
# Import Pmw from this directory tree. #!/usr/local/bin/python # -*- coding: UTF-8 -*- from moviepy.editor import CompositeVideoClip, VideoFileClip, TextClip, concatenate_videoclips,vfx import time import math clip2 = VideoFileClip("F:/ave-maria-mosca.mp4") tiem=0.0 print ("eee") tiempo_ralentizado=4 #4 segundos lugar_ralentizado=5 #En el segundo 5 Framerate=50 arco_ralen=tiempo_ralentizado*Framerate def tiempo(tiem,tiempo_ralentizado,lugar_ralentizado,Framerate,arco_ralen): gek=tiem punto_entrada=lugar_ralentizado -( tiempo_ralentizado /2 ) print (gek, abs(math.sin(gek/arco_ralen)), punto_entrada) donde=[2] calcular=abs(math.sin(gek/4)*2) return gek+1- calcular clip2 = clip2.fl_time( tiempo(tiem,tiempo_ralentizado,lugar_ralentizado,Framerate,arco_ralen) ).set_duration(40)give me this error
Error:File "F:\post-produccion.py", line 35, in <module>
clip2 = clip2.fl_time( tiempo(tiem,tiempo_ralentizado,lugar_ralentizado,Framerate,arco_ralen) ).set_duration(40)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\moviepy\Clip.py", line 190, in fl_time
return self.fl(lambda gf, t: gf(t_func(t)), apply_to,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\moviepy\Clip.py", line 138, in fl
newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<decorator-gen-57>", line 2, in set_make_frame
File "C:\Python311\Lib\site-packages\moviepy\decorators.py", line 14, in outplace
f(newclip, *a, **k)
File "C:\Python311\Lib\site-packages\moviepy\video\VideoClip.py", line 666, in set_make_frame
self.size = self.get_frame(0).shape[:2][::-1]
^^^^^^^^^^^^^^^^^
File "<decorator-gen-10>", line 2, in get_frame
File "C:\Python311\Lib\site-packages\moviepy\decorators.py", line 89, in wrapper
return f(*new_a, **new_kw)
^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\moviepy\Clip.py", line 95, in get_frame
return self.make_frame(t)
^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\moviepy\Clip.py", line 138, in <lambda>
newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\moviepy\Clip.py", line 190, in <lambda>
return self.fl(lambda gf, t: gf(t_func(t)), apply_to,