I'm trying to set audio clip on image clip in moviepy. I read this page, then I wrote code like this.
from moviepy.editor import *
clip = ImageClip('img/output_1.png')
audio_clip = AudioFileClip('audio/output_1.mp3')
clip = clip.set_duration(audio_clip.duration)
clip = clip.set_audio(audio_clip)
Audio and duration are returns value.
>>> clip.audio
<moviepy.audio.io.AudioFileClip.AudioFileClip object at 0x1241dbd30>
>>> clip.duration
4.18
However when I write as file.
clip.write_videofile('mov/sample.mp4',fps=4)
I can't hear the sound. Are there any mistake on my code? I don't know how should I change my code... If you have any idea please help me!
My environment is
MacOS 11.3.1
python 3.9.5
moviepy 1.0.3
I had run same code on google colab, I got same problem. The video has 4.18 seconds, however it's no sound...