Best Practice for video storage and retrieval

0

I am building a web application that will allow the end-user to also submit a video when recording a review. I want to put restrictions in place for the minimum and maximum length of the video. As well, I don't want the video to exceed a certain size, say 25MB. My application is built on React and communicates with a serverless backend. My questions are the following:

  1. What is the best practice for sending video over API?
  2. Is there a way that I can break or compress the video when storing it and then later re-stitch it on demand?
  3. What is the most cost-effective way to transmit and store video data?
  4. What is a service that I can use to transcribe the contents of the video for sentiment analysis?
質問済み 1年前339ビュー
1回答
3
承認された回答

As for #1, #2, and #3, I would say best practice would be to place the video file directly on S3, which is a very cost efficient way of storing data. Here is an article providing an overview regarding how to directly store on S3:

https://aws.amazon.com/blogs/compute/uploading-to-amazon-s3-directly-from-a-web-or-mobile-application/

Also, you can use presigned URL to specify the minimum and maximum file size range. If you are not uploading directly to S3, you can use some python code (used in an Lambda function) to specify the minimum and maximum size of the video. See the param ContentLengthRange (the example below limits to 10 MB).

url = s3.generate_presigned_url(
    'put_object',
    Params={
        'Bucket': bucket_name,
        'Key': object_key,
        'ContentLengthRange': '0-10485760',
    },
    ExpiresIn=expiration,
)

Upon storing the video to S3, trigger a Lambda function (or possibly am API service on a Fargate container for longer running processes) using events to do any processing, such as storing metadata or to kick off sentiment analysis (which is discussed later in this answer). Concerning Lambda, be mindful that this process must complete within 15 minutes.

Also, at time of submission of the video you may need to call a Lambda function to store incoming data (such as username, etc.) from the client. I'm assuming you'll be storing this metadata and incoming data in some type of DB. Ideally, you'll join this incoming data with any extracted metadata into a DB records to provide a complete overview of what is being submitted.

Concerning sentiment analysis of videos, I am going to assume that you're referring to the audio portion of the video. Amazon Comprehend would be an excellent way to determine the sentiment of the raw text. To get the video into the raw text format, you'll likely need to use AWS Transcoder and Amazon Transcribe.

If you're concerning about facial sentiment analysis, you'll likely need AWS Rekognition.

Hope this helps, if it does please accept this answer.

profile picture
回答済み 1年前
profile picture
エキスパート
レビュー済み 3ヶ月前
profile picture
エキスパート
レビュー済み 6ヶ月前
  • It sounds like you have wonderful coding journey ahead of you. Don't forget to give my response a thumbs up. Happy coding!

  • Great advice!

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ