Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.1k stars 1.51k forks source link

clips_array ruins performances #2014

Open 5-30 opened 11 months ago

5-30 commented 11 months ago

Here's an example :

satisfying = VideoFileClip(f'satis/{random.randint(1, 5)}' + '.mp4', audio=False).subclip(rand, rand+(end-start))
video = clips_array([[video], [satisfying]]) # video is defined previously

await loop.run_in_executor(None, lambda: video .write_videofile(video_path.replace(".mp4", "") + ".captioned.mp4", codec="libx264", fps=24, preset='ultrafast', audio_codec='aac'))

I'm using MoviePy 1.0.3 and usually reaching around 80it/s, but for some reason I only get a maximum of 7 or 8 it/s when using clips_array.