image_clip = ImageClip("img1.jpg")
image_clip = image_clip.set_duration(wait_time).set_position('center').set_fps(24)
image_clip.write_videofile("image_clip.mp4", fps=24)
this code can work well, image_clip.mp4 can be played correctly.
if I change the image file: image_clip = ImageClip(“dog.jpg”)
the image_clip.mp4 can be generated, but the image(dog) can be seen in the video image_clip.mp4.
Environment: virtual studio code 1.81.0
I tried different images. the images from my phone are OK. the images which are downloaded in the internet don’t work well.
New contributor
ju jinqian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.