![]() ![]() ![]() AWS Managed Policy for Basic Lambda Role.The function uses an IAM Role with two permission policies: The deployed function is associated to CloudFront *.m3u8 Cache Behavior, and triggered on “Origin Request“ Event. While the *.m3u8 Cache Behavior also forwards Query String parameters: width, height, and function CloudFront distribution endpoint domain nameĪ CloudFront distribution is deployed with the HLS stream S3 bucket as origin with two additional Cache Behaviors:Ġ – *.m3u8 path pattern for HLS manifest requests.ġ – *.ts path pattern for the HLS video segment requests.įor each Cache Behavior, there is a Cache Policy and Origin Request Policy attached.īoth Cache Behavior policies enable CORS headers.When your CloudFormation deployment is completed, check the outputs tab values and you should see four resources key values: It can take up to 10 minutes for CloudFormation to complete deployment. Step 4: Review and acknowledge the stack configuration, and choose Create stack. (Optional – specify tags to resources in the Stack). Step 3: Use the default configuration options in this step and choose Next. You can keep the default name, or change it to a name of your choice. The “Stack name” populates a default name: “on-the-fly-video-convert”. The template appends your AWS Account ID as suffix in this format: Step 2: Provide names for your media source S3 Bucket, and for your HLS streams S3 Bucket. Choose Next to configure the stack options. Your CloudFormation Console will open in us-east-1 Region. Step 1: Choose the Launch Stack button to open the AWS CloudFormation console pre-loaded with the template: Create a new AWS account or use an existing account.This time, function will find the newly generated Manifest in the HLS stream S3 bucket, fetch it, and return to CloudFront for delivery to your end user. CloudFront forwards the intro manifest back to the end user for playback.Īssuming the end user’s player sends a refresh manifest request, this process begins all over at step 1.While MediaConvert initiates the conversion job, function generates an HLS manifest pointing to an intro video segment, and return it immediately.It stores them in the HLS Stream S3 bucket, and continues to update the manifest until the conversion process is complete. MediaConvert begins to generate an HLS manifest and segments.MediaConvert receives the conversion job request, and attempts to fetch the mp4 video source from the media source S3 bucket.If the manifest is not found, invokes a MediaConvert job (providing the resolution and mp4 video source file name parameters in a job setting). If the manifest is found, function returns the manifest.function parses the query string parameters, and attempts to fetch the requested manifest from an HLS stream Amazon S3 media bucket (the Origin).CloudFront forwards your user request to your origin (assuming cache miss), and triggers a function on Origin-Request event.End user client sends a request for an HLS video stream to Amazon CloudFront (The request include a resolution and mp4 video source file name parameters in the query string).On-The-Fly video conversion workflow overview The workflow uses function to invoke an AWS Elemental MediaConvert job. ![]() This blog post introduces a serverless workflow for on-the-fly video conversion From MP4 video source files stored in an Amazon S3 bucket to HTTP Live Streaming (HLS) served through Amazon CloudFront. Infrequent replay of Online DVR (Digital Video Recorder) programs.Recorded Video Conference calls for future replay.Clips related to a featured movie, like commentary, or critique review.You can find it relevant in models like ‘free to watch’ with ads, where the return on investment for video processing and delivery ties directly to the video content popularity, or in other use cases, for example: Consider your video assets that are viewed infrequently, at a single quality rendition, or never viewed at all. You can further optimize your overall cost of media delivery by deploying an on-the-fly video conversion workflow. In order to deliver your online video content, AWS offers multiple solutions that you can use to automate your media supply chain, and streamline your content distribution. Whether your media library includes long form featured movies or short form “how-to” clips, the popularity of each video asset is typically set by your viewers preference. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |