Video is now recognized as one of the fastest channels to disseminate information, especially, when the number of receivers has to be high.
Now that videos are a potential choice for communication, especially, for enterprises, it is inevitable for them to also focus on the delivery method of the video stream across multimedia devices.
This is where adaptive streaming can help you deliver a seamless experience across devices and keep the users engaged. And, through this guide we will help you implement it on your video platform.
Before you jump on to the step-wise tutorial, first understand why adaptive streaming is important for you.
Importance of Adaptive Streaming In Video Sharing
The delivery method or the video stream is much likely to impact the resolution of the video and can make or mar the overall experience of the user. A user who finds the video stream slow or with poor resolution will reject the video within initial few seconds. Also, no user would want to wait for a whole 15 minutes for the video to download to view a 15-minute video. The users are impatient and flooded with a variety of videos to watch over the web.
How your video(s) will qualify in the race among those millions of videos your user would come across and go on to create the impact your content has been designed to deliver, is dependent on the streaming of the video.
But the major problem with video is its format; every format is not compatible to every platform like mobile, web (at multiple web browsers). So, there you are. You need to generate a common format which is compatible to all platforms and you can achieve this with adaptive streaming.
A stream can handle all the above-mentioned complexities. This makes browsing convenient for the mobile video user and he doesn’t have to make efforts to download the video.
Adaptive Streaming with AWS Elastic Transcoder
There are two ways you can do this – Write a code to convert video from one format to specific format or Use third party web service (like AWS Elastic Transcoder) to achieve current requirement.
Second option seems promising and user-friendly. While implementing the Second approach, we dig for an efficient approach, so here we share the findings.
Amazon Elastic Transcoder is media transcoder in the cloud. It a highly scalable, handy and cost effective tool. It enables businesses to convert (or “transcode”) media files from their source format into versions that will playback on devices like smartphones, tablets and PCs.
By using the Cloud SaaS services, we detach the video format conversion functionality from the main server to the third party to reduce the server overhead.
The limitations of the traditional approach have been overcome by SaaS (software as a service)
How To Generate Video In Specific Format Using Saas
SaaS (Software as a services) for video transcoding is provided by various vendors like Amazon (i.e. Elastic Transcoder), Brightcove (i.e. Zencoder) etc. The common work flow for every type of SaaS is shown in the following figure:
As shown in the diagram above, every SaaS for video transcoding has the same work flow, while the approaches and customization of services differ. To understand Video Transcoding work flow practically, let’s have a brief discussion on Amazon Elastic Transcoder service.
Transcoding Video Using Amazon Elastic Transcoder Service
Pre-Requisite: To use Amazon web Services we need an account at AWS.
To transcode a video, we will use two services of Amazon that are listed below and the work flow shown in the image:
Step 1: Upload File at S3 (Simple Storage Service)
This service is used to store and retrieve any type of file at Amazon cloud using different types of requests like POST, PUT or GET, that adhere to security policies. We can trace any type of events places on storage and trigger any other services like lambda, SNS.
To upload file at S3, you need to click on S3 service as shown in the image below:
Now click on “create bucket” and provide a unique name of bucket shown in the image below i.e. Input-production:
Open a bucket by clicking on name and click on upload button. A popup will appear. Then select file from your system to upload. Using the above step of file uploading, you can upload a video file with any format in a bucket which you want to transcode.
Step 2: Configure Pipeline and Pre-Sets
To transcode video, you need to configure two things:
Pipeline: Pipelines are queues that manage transcoding jobs. When you create a job, you specify the pipeline to which you want to add the job. Elastic Transcoder starts processing the jobs in a pipeline in the same order in which you added them. Here are the steps to create pipeline:
Now click on Elastic Transcoder Service then click on create pipeline.
Select input bucket from where the video will be fetched for transcoding and select output bucket where the transcoded video will be placed. If you need thumbnails for video, then also select buckets for thumbnail as shown in below image. All bucket could be one.
Then click on create pipeline button. Pipeline will be created.
Pre-Set: The pre-set defines the audio, video, and thumbnail settings of video that Elastic Transcoder uses for transcoding. Basically, it is used to convert video in specific format, which is required to play video across platforms. Amazon provides many predefine pre-sets and you we can also create a new one as per your requirement.
Step 3: Begin Transcoding The Video
After configuring the pipeline and pre-sets finally create job to transcode video. Here are the steps to create job.
Click on “Create new job button” as shown in below image:
Select created pipeline from drop down and enter output key prefix (where to save transcoded video in bucket)
Enter the input video name which uploaded in bucket, select pre-set in the format you want to transcode, provide the segment duration (segment duration is used for HLS video, it divides in video in chunks of seconds), then give name to output video as shown in below image:
Click on Create Job. In few seconds (mainly depends on video length) video will be transcoded in specified format at specified path. As shown in below image video is transcoded in .m3u8 format because we selected pre-set for HLS format as output. By right clicking on video output file we can get URL of video and access transcoded video from anywhere if file is public.
That’s it. You can use the above-highlighted URL anywhere in your Video-Player as a source with Adaptive bit rate.
You can use the above-highlighted URL anywhere in your Video-Player as a source with Adaptive bit rate.
The above images have been sourced from Amazon’s website.
The wide variation in the multimedia devices poses a big challenge on the video providers to deliver a seamless experience. Video stream needs to adapt to vivid formats to keep the user engaged.
As a video provider, it is inevitable for you to embrace adaptive streaming. Also, you are likely to go confused when choosing the right set of tools to implement it on your video stream. You must consider factors like server overhead and scalability and choose your tools, accordingly and choose your steps considerately.
To leverage adaptive streaming for delivering a seamless experience across platforms, you need to get the execution right. Selecting the right tool is just one step in the direction. The importance lies in the step by step implementation.
If you are looking for any help on building any digital solution for better customer or employee engagement, this an area where we can help. Please contact us at firstname.lastname@example.org.