How to get thumbnail of video which is uploaded on Amazon S3 Storage - amazon-web-services

We have a .NET project.
We're uploading video files directly to S3.
How can we create a thumbnail of the video which is located in S3 Storage.
Which service should we use, and can we do that in javasript or using AWSSDK library.
Since the video is not uploaded to our servers we need to find a way using services.

From AWS Developer Forums: How to create only one thumbnail per video, it appears that you could:
Use Amazon Elastic Transcoder to convert the video into thumbnails
Specify a huge thumbnail interval to force it to output only one thumbnail per video

Related

FFMPEG upload output to S3

I have a video file stored in my S3 bucket. I want to take that file as the input, do some processing with FFMPEG and directly upload it to S3. How can I do this?
You can either do it yourself, or use Amazon Elastic Transcoder.
If you wish to use FFMPEG yourself, you will need somewhere to run it. This could be on an Amazon EC2 instance, or on your own computer. Your program or script would need to download the video from the S3 bucket, process it with FFMPEG and then upload the resulting file to S3.
Or, you could use Amazon Elastic Transcoder to transcode the file. It is not FFMPEG, but it has many of the same capabilities. It can read the video directly from S3 and output the result to S3. Pricing is based on the length of the input video file (eg 3c per minute).
Actually, a newer product called AWS Elemental MediaConvert is also an option. It is a professional video system used by the broadcasting industry, so it has a lot more options.

Extract picture from video stored on S3

I want to extract one frame or screenshot of a video stored in s3 at specific time, what can i use to make it ?
Lambda functions
Using the SDK
Amazon Elastic Transcoder has the ability to create videos from sources files. For example, it can stitch together multiple videos, or extract a portion of video(s).
Elastic Transcoder also has the ability to generate thumbnails of videos that it is processing.
Thus, you should be able to:
Create a job in Elastic Transcoder to create a very short-duration video from the desired time in the source video
Configure it to output a thumbnail of the new video to Amazon S3
You can then dispose of the video (configure S3 to delete it after a day) and just use the thumbnail.
Please note that Elastic Transcoder works asynchronously, so you would create a Job to trigger the above activities, then come back later to retrieve the results.
The benefit of the above method is that there is no need to download or process the video file on your own Amazon EC2 instance. It is all done within Elastic Transcoder.
The AWS SDK does not have an API that extracts pictures from a video. You can use AWS to analyze videos - such as the Amazon Rekognition service. For example:
Creating AWS video analyzer applications using the AWS SDK for Java
You can use the Amazon Rekognition to detect faces, objects, and text in videos. For example, this example detects text in a video:
https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javav2/example_code/rekognition/src/main/java/com/example/rekognition/VideoDetectText.java
The Amazon S3 API has many operations, but extracting a pic from a video is not one of them. You can get an inputstream of an object located in a bucket.
To extract a pic from a video, you would need to use a 3rd party API.

How can I upload videos to Amazon S3 (for HLS Stream) and categorize them?

I'm working on an app for on-demand HTTP Live video streaming using Amazon AWS. I was able to set up Amazon's default video-on-demand HLS workflow using the link below (i.e. video is uploaded, auto-encoded and stored in a different bucket with a unique ID). I'm trying to find a way to automatically group videos by category (in DynamoDB or another database) when I upload them. Has anyone done something similar before? Do I need to use a Lambda function?
https://docs.aws.amazon.com/solutions/latest/video-on-demand/appendix-a.html
FYI - in case anyone else is looking for a way to do this. You can upload your video to AWS and use a javascript lambda function to automatically categorize them in a nosql database

How to Generate Thumbnail from AWS S3 Media Cache Source in Wowza

Could anyone let me know how to generate thumbnail from AWS S3 media cache source?
I stream videos directly from AWS S3 bucket and want to find a way to generate a thumbnail.
Base on AWS. You can use Amazon Elastic Transcoder https://aws.amazon.com/elastictranscoder/details/
Thumbnails: Amazon Elastic Transcoder can generate thumbnails of your
output video for you. You can set the size of the thumbnails, aspect
ratio and other parameters including how many thumbnails you would
like to have generated. Generating multiple thumbnails is useful if
you want to add chapter markers, provide a visual scan function or
simply choose the most representative thumbnail for your content.
Another way. You can use ffmpeg to generate thumbnails
Cheers,
Patrick

How to transform images directly uploaded to S3 from a Heroku node app?

I have an app where I'm allowing users to upload images. I'm working on having them upload images directly to AWS S3, rather than a pass-through (sounds like it really ties up your Heroku dynos if done using pass through). However, I would like to perform transformations to the assets they upload (for example, re-sizing, compressing image quality to reduce file size and creating thumbnail versions). Since the files are being directly uploaded to S3, I can't perform any transformations until they are finished uploading to Amazon.
I'm not sure of the best way to handle this, but I'm thinking:
User uploads an image through a file input form field that is directly uploaded to S3.
Once that is successfully completed, that image url from Amazon is saved to my Heroku database.
Then, I can take that image and perform all those transformations to it.
Re-uploading the image to S3 as cropped, compressed and thumbnailed version.
Persisting the url for the new edited images in my Heroku database.
Is this the best workflow to solve this problem, or is there a more efficient solution? Thanks!
Here are some alternatives to re-processing the pictures in Heroku:
Image processing with AWS Lambda
Configure your Amazon S3 bucket to trigger an AWS Lambda function when a picture is uploaded. The Lambda function could transform the image automatically.
See: Tutorial: Using AWS Lambda with Amazon S3
Transform pictures upon retrieval
Instead of transforming and storing the images, use an online service that can transform the images on-demand, eg:
Cloudinary
Imgix