title: Generating number of thumbnails depending on video size using AWS MediaConvert
body: <p>After reading this <a href="https://aws.amazon.com/blogs/media/create-a-poster-frame-and-thumbnail-images-for-videos-using-aws-elemental-mediaconvert/" rel="nofollow noreferrer">article</a> I get the sense that AWS media convert job template cannot be re-used to generate thumbnails of arbitrary video size. The article assumes that we know the size/duration of video uploaded upfront hence the number of thumbnails we desire.</p>
  <p>What I am looking for is to generate a random number of thumbnails based of video size (e.g large number of thumbnails for large video and small number of thumbnails for small video). I approached this solution using lambda trigger and ffmpeg lambda layer but lambda function timeouts (15 minutes max) for videos larger than 150MB (since it takes time to read the video from the s3 bucket).</p>
  <p>What are my options to process large number of video , generate a variable number of thumbnails, merge those thumbs to generate a sprite?</p>
  <p>I tried lambda trigger with ffmpeg/ffprob to generate sprite, but that has timeout issue. Now I have setup a cloud watch event rule to trigger lambda function on mediaconvert job status change( completed)
  and merge the thumbs to generate sprite, which seems much lighter but I need an arbitrary number of thumbs.</p>