I am trying to add subtitles to a video using the recommended method in the docs
from moviepy.editor import *
from moviepy.video.tools.subtitles import SubtitlesClip
from moviepy.video.io.VideoFileClip import VideoFileClip
generator = lambda txt: TextClip(txt, font='Georgia-Regular', fontsize=24, color='white')
sub = SubtitlesClip("Output.srt", generator)
myvideo = VideoFileClip("video.mp4")
final = CompositeVideoClip([myvideo, sub])
final.write_videofile("final.mp4", fps=myvideo.fps,threads = 4)
This will take more than 2 hour to process, however when removing the subtitles (as below) it runs less than a minute, please let me know if I am missing something or if this is normal, appreciated!
from moviepy.editor import *
from moviepy.video.tools.subtitles import SubtitlesClip
from moviepy.video.io.VideoFileClip import VideoFileClip
myvideo = VideoFileClip("video.mp4")
final = CompositeVideoClip([myvideo])
final.write_videofile("final.mp4", fps=myvideo.fps,threads = 4)