0

I have an app which receives a video file and a text from a front-end form, creates a video intro with text, merges this intro with 1 to 2 hour video. Everything is being encoded using ffmpeg, after the encode job completes, it uploads final video to S3 bucket. I wonder which will be the fastest option on AWS? Lambda is limited to run 15 mins max and not allowing to choose, e.g., 32 core CPU. I also want to modify the app so it'll upload 10 videos simultaneously and I want the ffmpeg to start the job as soon as a particular file reaches a server. Should I use the Beanstalk with 2-4 very powerful instances? Or should I use one EC2 32 core instance to do the job? Please advise.

2

1 Answer 1

1

How about using a service instead of a server? AWS Elemental Mediaconvert is file based and can do things like add intro clips, text overs, etc.

The basic tier says it includes "clipping, stitching, and static overlays, among others" and the current price is 1.5c per minute at HD - SD and 4K costs more. So to convert a 2 hour video in HD costs about $1.80, which might be good value given the high cost of high CPU instances and not having them fully utilized. SD would be $0.90 and 4K $3.60. S3 storage cost for the output should be negligable.

If you need different CODECs the professional tier costs a bit more but has a lot more features.

Otherwise I wonder if you can parallelise lambda encoding to create chunks then stitch them together to save having servers.

5
  • Any idea how different this is versus aws.amazon.com/elastictranscoder ?
    – ceejayoz
    Feb 11, 2021 at 19:17
  • 3
    FAQ: Why should I choose AWS Elemental MediaConvert over Amazon Elastic Transcoder? AWS Elemental MediaConvert should be the first option you consider for file-based video processing. MediaConvert provides a comprehensive suite of transcoding features that addresses the needs of the majority of use cases. It is optimized to reduce turnaround time and improve scalability which allows you to process more files in parallel. And you benefit from a flexible pricing structure where you only pay for functionality that you use. (continued on AWS site) aws.amazon.com/mediaconvert/faqs
    – Tim
    Feb 11, 2021 at 20:14
  • That's a really interesting option, I actually use it already for transcoding to HLS, but I didn't find any API docs except this one docs.aws.amazon.com/sdk-for-php/v3/developer-guide/… which isn't explaining, e.g., how to create an intro from static PNG file and text etc.
    – Mike
    Feb 12, 2021 at 18:03
  • Does this help at all? docs.aws.amazon.com/mediaconvert/latest/apireference/…
    – Tim
    Feb 13, 2021 at 8:43
  • 1
    I've overlooked super helpful button 'Show Json' when creating a job in AWS console, that helped a lot. Since Mediaconvert doesn't support text overlay (only image overlay), I've decided to leave this task to Lambda function with FFMPEG layer and leave all the rest job to Mediaconvert. Thanks for sharing your ideas.
    – Mike
    Feb 19, 2021 at 15:27

Not the answer you're looking for? Browse other questions tagged .