0

Trying to get something basic to work on movie.py Just want to display some text and play some music. The text displays but the music does not Here is my code

from moviepy.editor import *
audio=AudioFileClip("music/above-the-clouds.mp3")
txt_clip=TextClip("rock around the clock",fontsize=70,color='white')
txt_clip=txt_clip.set_pos('center').set_duration(300)
txt_clip.fps=24
txt_clip.set_audio(audio.volumex(4))
txt_clip.write_videofile("merged.mp4")
Tommie Jones
  • 957
  • 1
  • 16
  • 37

1 Answers1

0

Try to change this line

txt_clip.set_audio(audio.volumex(4))

to

txt_clip = txt_clip.set_audio(audio.volumex(4))
Yuretz
  • 49
  • 8