The big picture.
Video content is king, there is no doubt about this. We have reached the time when video content is in high demand and it seems that this is not going to stop here. Companies around the world are exploring this niche especially now as we are making efforts to socially distance. Events that once happened on big arenas now are happening remote, on Zoom, WebEx, Whereby and other video streaming platforms. eLearning apps are taking the place of onsite learning opportunities and everything that used to happen in person, is now happening thorough a screen via video streaming.
The social distance is not the only decisive factor that creates this increased need for video streaming. Communities are more engaged to use video streaming platforms as a form of expression and communication with their peers. Platforms such as Twitch,Tiktok, Instagram (Reels) are coming to support this need of the market and to offer suitable streaming solutions.
Video streaming, either live or on-demand, is happening right now, while you are reading this.
So today, regardless of the sector you are operating in, if you plan on starting a stream into the virtual world, delivering quality content to millions of people you have 2 obvious options:
- Use an existing video streaming platform and comply with their terms, conditions, and prices.
- Build your own custom streaming platform using a reliable partner.
Let us focus on the second option and see what it takes to create your own streaming platform, what services you can use to achieve that and what could be the estimated cost. We will go forward in this article with a use case of Microsoft Azure and its related services to achieve our purpose.
Building a video streaming app.
You should know that there are 2 types of video streaming:
- Live Streaming: a live event which is simultaneously recorded and broadcasted almost in real-time.
- Video on-demand: broadcasting an existing video when this is requested.
For this specific matter, Microsoft Azure offers support via Microsoft Media Services for both mentioned streaming possibilities.
Let’s dive deeper and look at the operations that must be performed so you can deliver video on-demand streaming, what are the must know terminologies when it comes to videos and how the overall simplified architecture looks like.
Concepts and Services.
A video file contains multiple components such as an audio track, caption track, metadata about the video and many more. All of this are stored in a structured manner inside a container which is described as the video format which can be MP4, AVI, or other types of format. In Azure Media Services any digital video file is described as an Asset. For example, when you upload a new video file this will be stored as an asset item inside the platform.
Before being able to stream a video, an operation called encoding must be done. The encoding operation is responsible to compress the initial file and to prepare multiple quality versions of it. The encoding process is based on a specific algorithm which is called codec such as H264. For the encoding process, Azure Media Services offers an integrated system which helps you process the raw digital files by offering a set of encoding presets and the possibility for custom defined ones.
Now we are a couple of steps away until we can stream a video. But first let us see if you and your business have the need to deliver the content in a secure way, to be able to restrict access to specific streams and to decrease the possibility of copyright infringement and piracy. For this specific matter, there is an integrated technology which helps to achieve all of this called DRM (Digital Right Management). Azure Content Policy Service allows you to manage DRM licenses in a convenient way with 3 biggest DRM providers:
- Widevine: proprietary technology owned by Google
- PlayReady: proprietary technology owned by Microsoft
- FairPlay: proprietary technology owned by Apple
Now, when you want to start streaming a video, you are in the position where you have a big video file. This must be sent in small pieces since you do not want to force the user to download all the video file at once. Here, the streaming protocols are coming into the picture and there are 2 approaches:
- Progressive download: send small chunks of data to the user
- Adaptive streaming: send small chunks of data to the user and select the best video quality based on multiple factors such as network speed. Some of these protocols are HLS, DASH or Smooth Streaming.
After the previous steps has been decided an output locator has to be created and a streaming endpoint. The output locator identifies which asset do you want to stream and under what policies (streaming policy and encryption policy). The streaming endpoint will stream your content to the clients and will provide the streaming URLs. For an easy integration, Azure offers its own player, which has an embed mechanism for the DRM licenses, called Azure Media Player.
How much does it cost?
Now that you have a clear overview on what are the technologies and services that will be used, we can look at what costs you might expect. The following scenario has been taken into consideration and it consists of:
- Usage of 1h of HD quality encoding services (done only one when the video is uploaded).
- 10GB of assets distributed around the globe using Content Delivery Network for a better network management and availability.
- Usage of 10000 DRM protection licenses for each of the 3 provides (Widevine, FairPlay and PlayReady).
- The usage of Azure streaming services.
All of these yield an estimated cost which starts from $135.08/month for a scalable and easy to integrate a streaming solution.
After the overall picture is painted and the estimated costs are known, most of the unknown variables seem to get more clarity. As a business that wants to get into the video streaming sector, now, you can easily assess if this a suitable solution that satisfies your needs and enables you to provide quality video and audio content for your audience at a large scale.