Open hunterhogan opened 11 months ago
Yeah, am Aware that the video encoding is slow. When I first started the project, I didn't focus on efficiency. If it worked, I left it. It's great that you understood the code. Lately, I've been rewriting the entire code for better performance. I've also integrated Eleven Labs Speech for better text-to-speech. Honestly, even I found my own initial code a bit tricky to follow!
Also, I'll make sure to enhance the video encoding in the upcoming commit, which I plan to make by the end of next month. Thanks for pointing out the FFMPEG command and resources.
video_generator.py creates the video using
write_videofile()
, which requires re-encoding the entire video. Furthermore, I think this code is recursively concatenating the video clip one clip at a time, which is inefficient, to say the least.Since the video files are merely concatenated, it would be much faster to stream copy the files. I don't know how to write the command using
moviepy
but I know the command for FFmpeg. The following command should work for videos without the introduction. The FFmpeg wiki has an excellent explanation of concatenation. (To make it easier to read, it is split across multiple lines, but it should all be on one line.)