- In MoviePy there is an api to create a clip from text as well as to concatenate list of clips.
- I am trying to create a list of clips in a loop and then trying to concatenate them.
- Problem is every time it creates a video file of 25 seconds only with the last text in a loop.
Here is the code
for text in a list:
try:
txt_clip = TextClip(text,fontsize=70,color='white')
txt_clip = txt_clip.set_duration(2)
clip_list.append(txt_clip)
except UnicodeEncodeError:
txt_clip = TextClip("Issue with text",fontsize=70,color='white')
txt_clip = txt_clip.set_duration(2)
clip_list.append(txt_clip)
final_clip = concatenate_videoclips(clip_list)
final_clip.write_videofile("my_concatenation.mp4",fps=24, codec='mpeg4')