1

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
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Pablo Salazar
  • 800
  • 10
  • 17
  • 1
    https://stackoverflow.com/questions/36334108/ question has some more insights into what you are wanting to do. AWS has content analysis option that could potentially help: https://aws.amazon.com/solutions/implementations/aws-content-analysis/ – zedfoxus Feb 01 '21 at 17:53
  • Thank you very much for the information – Pablo Salazar Feb 01 '21 at 17:58

2 Answers2

3

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.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
1

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.

smac2020
  • 9,637
  • 4
  • 24
  • 38
  • See the thread for ideas - https://stackoverflow.com/questions/15735716/how-can-i-get-a-frame-sample-jpeg-from-a-video-mov – smac2020 Feb 01 '21 at 21:57