Uncategorized

Using AWS Elemental MediaConvert to convert video into HLS

This post is part of the series of blogs where will understand How to Protect Videos Using AWS Elemental MediaConvert and HLS just like a Netflix.

Using AWS Elemental MediaConvert to convert video into HLS

Step 1: Upload files into your S3 bucket

  1. In the Buckets pane, choose the name of your input bucket.
  2. Choose Upload.
  3. In the Upload dialog box, choose Add files, and then upload a media file that you want to transcode.
  4. Choose Upload.

Step 2: Create MediaConvert job

  1. Open the MediaConvert console at https://console.aws.amazon.com/mediaconvert.
  2. On the Create job page, in the Job pane on the left, choose Input 1. Make sure that you pick the same Region for your job and your file storage.
  3. In the Input 1 pane, provide the URI to your video input file that is stored in Amazon S3 or on an HTTP(S) server.
  4. Click on Add to add Output groups just below the Input section at left.
  5. Select Apple HLS option. H.264, AAC will be created under Apple HLS Output group
  6. Select this H.264, AAC output, and then in Output settings pane click on Remove output button.
  7. Specify the group name in the Custom group name field.
  8. Specify the location of the output in the Destination field. After setting the destination path, append the name with it. In my case, the video name will be “my-video-name”.

9. Now go to the Outputs pane and add 5 outputs. I am creating 5 different resolutions of video. You can add or remove depending on your requirements. After creating 5 outputs give them name like 144p, 360p, 480p, 720p (HD), 1080p (FHD).

outputs

10. Now it’s the time to define resolution of each output. From Output groups settings select first output which is 144p and set Resolution (w x h) for video to 256 and 144, Bitrate (bits/s) to 90000 and Audio Bitrate (kbit/s) to 96.0. Perform these steps for all 5 output. I use following resolution and bitrate for my videos. You can use the same or change it depending on your requirements:

NameResolutionVideo BitrateAudio Bitrate
144p256×1449000064k
360p640×360800000128k
480p854×4801500000160k
720p (HD)1280×7204500000192k
1080p (FHD)1920×10807500000192k

11. Now click on Create button.

Leave a Reply

Your email address will not be published. Required fields are marked *