amazon-s3spriteaws-media-convert

AWS Media Convert - Generating sprite for video preview on progress bar hovering


Here is my process :

  1. I upload a video in an S3 bucket
  2. I encode the video with AWS media converter
  3. The videos are generated by AWS Media converter
  4. I need "something" to create a sprite like the picture below so I can use it to display the video on hover

If anyone has a solution or just an idea, I'll be very interested.


Solution

  • You could code a solution that shouldn't be too hard. I'm not sure exactly what your architecture is, but you could bootstrap an EC2 instance with an install of ffmpeg, and script out your thumbnail reel with something like this. Imagemagick is another solution, see this post.

    You could probably even run that solution in Lambda. Here's a generic image processing post using that technology.

    In either case, once up, you can configure s3 to fire an event when a video is dropped and use Lambda natively or something like SQS or SNS to notify your ec2 instance to extract and store the thumbnail reel alongside the video file in S3 using a solution similar to this blog post.

    Again, this assumes a lot about your architecture, but hopefully there are some useful pointers in there. Feel free to leave comments if you have questions. Happy to help.