0

I'm an experienced dev but new to video processing. I need to be able to quickly process large volumes of 30 sec videos doing things like adding logos, concatenating and combining clips, and overlaying titles and graphics.

Functionally MoviePy seems to work well, it has all the features I need but it seems incredibly slow. e.g. in one of my tests, running on a 2016 MacBook Pro (2.9 GHz Core i7, 16GB RAM) it's taking around 258 seconds to process and write a 30 second video with just a few of the modifications I mentioned.

I've tried running it on several different types of AWS EC2 instances (Compute optimised and GPU instances) but it's actually considerably slower than on my laptop (360-380 seconds).

I've had a quick look at a couple of online services (Cloudinary and encoding.com), which have basic video editing facilities but they lack even basic effects like being able to fade one clip into another.

Are there any other libraries (any language) or services that might be able to handle this task quicker than MoviePy and are more fully featured than the online services that I've found?

  • Video editing tends to be O/I bound (as you are reading & writing large amounts of data. Using an SSD or RAID system can speed things up a lot. (The slow performance of the AWS instances is likely due to file up/download times). – Steve Barnes Dec 30 '18 at 20:40
  • Thanks @SteveBarnes I'll give that a go. Do you think that holds true even for small files? I'm only producing approx 10MB output files. – Danny S Dec 31 '18 at 16:32
  • Oh, and I've found one setting that's sped things up massively. If I set the explicit FPS (to 30 in this instance) when writing the file, then it renders twice as quickly (even though this is the same fps as the current input files). – Danny S Dec 31 '18 at 16:34
  • Behind the scenes moviepy uses FFMPEG & that works the fastest when using stream copy (ffmpeg.org/ffmpeg.html#toc-Stream-copy) so you could try specifying codec='copy', audio_codec='copy' in the call to write_videofile or you can use the ffmpeg_params parameter. zulko.github.io/moviepy/ref/VideoClip/… – Steve Barnes Jan 1 at 8:26
  • Thanks @SteveBarnes – Danny S Jan 6 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.