from moviepy.editor import *
bg= ImageClip('back.jpg').set_duration(10).set_fps(24).set_audio(AudioFileClip("back.mp3"))
bg = bg.fadein(bg, 2.0) #error
bg.write_videofile("clip2.mp4")
error:
TypeError: '>=' not supported between instances of 'int' and 'ImageClip'
I believe your problem is in passing the wrong parameters into fadein.
bg = bg.fadein(bg, 2.0) #error
should be
bg = bg.fadein(2.0) # No error
You were passing bg as the self (first) parameter, and then passing it again as the first explicit parameter.
It fails for me with the original code, and works with the corrected code.
Most helpful comment
I believe your problem is in passing the wrong parameters into fadein.
should be
You were passing bg as the self (first) parameter, and then passing it again as the first explicit parameter.
It fails for me with the original code, and works with the corrected code.