background

Add custom watermarked text to each frame of the video

implementation

# install ImageMagick video = VideoFileClip("3.mp4") # create text, Specify text size,color, and position txt_clip = TextClip("2020",fontsize=70,color='red') txt_clip = Txt_clip.set_position ('center').set_duration(video.duration) # watermark duration # overlay text on video result = CompositeVideoClip([video, Txt_clip]) # FPS: result.videofile ("myHolidays_edited. Mp4 ", FPS =25) # FPS: result.videofile ("myHolidays_edited. Mp4 ", FPS =25)Copy the code

Reference documentation

MoviePy – MoviePy is a professional Python video editing library