Im trying to write a program that creates an mp4 from a static image and an audio file.
Here is the code im using so far:
from moviepy.editor import AudioFileClip, ImageClip
def mp3PNGMerge(fileSaveName):
audio_clip = AudioFileClip("[PATH TO AUDIO]")
image_clip = ImageClip("PATH TO IMAGE")
video_clip = image_clip.set_audio(audio_clip)
video_clip.duration = audio_clip.duration
video_clip.fps = 1
video_clip.write_videofile(fileSaveName + '_CLIP.mp4')
mp3PNGMerge('[OUTPUT FILE NAME]')
However when this is run, the program creates a video the length of the audio clip but does not play the audio, it is completely silent.
Does anyone know what is going on here?