Currently I have one web server running Django, which takes a series of images from a user, uploads them to an Amazon S3 bucket, and finally calls an Amazon Lambda instance, which runs a python script that uses ffmpeg to create a video from the series of images, and uploads it to the same storage bucket. The issue is that creating a simple video from 15 still JPEGs (1920 x 1080 resolution) takes ~40 seconds, each of which is billed on AWS Lambda. Previously this compilation with ffmpeg took place on the same server which runs our django web appand took about 10 seconds per videobut had to be moved to amazon because it would regularly use >600MB of ram and our web host only allows us 512MB. The fact that the process executed so much quicker before leads me to believe there's a much better design than what I've implemented, I'm just not sure what that design might be. Things I'm considering:Would the video be created faster if I wrote the lambda in C++/Java? I think not, because the ffmpeg binary is doing all the heavy lifting, and not python. Should this be moved to an Amazon EC2 instance? If so, what machine specs will speed this process up? (Same RAM, better CPU?)What do you all think?
Distributed Design to Speed Up Video Processing
performance;video;aws