So I have am using MoviePy's concatenate_videoclips function to combine two video clips that have a image and some text overlayed on each of them. When I write the video file it takes around a WHOLE minute to complete. When I scaled it up with around 100 clips with the same info (a image and some text overlayed) it takes up to around 4 hours for just a 15 minute video. I am wondering if there is a way to mitigate this time. Is MoviePy or just Python in general not suited for something like this?
My PC's specs are: Intel i7-9700K
32GB of memory
NVIDIA GeForce RTX 2060
They seem like they should be more than enough for a job like this. It also seems that MoviePy doesn't utilize my GPU and puts all the video encoding on the CPU.
I use as many of MoviePy's ffmpeg functions as possible to speed things up but the write_videofile function is still very slow. I tried all optimizations I could find but none made a difference. With some of them I can get the iteration per seconds to go up by a significant amount but after a few seconds of processing, that number falls off a cliff and goes back to 3-5it/s. Some of the optimizations I've tried are:
threads=12
preset="ultrafast"
audio=False
logger=False
ffmpeg_params=['-b:v','10000k']