Adaptive Bitrate Streaming Using Wowza Streaming Engine

June 25, 2020 by

 

Today’s viewers are accessing video content across more devices and connection speeds than ever before. Adaptive bitrate streaming (ABR) enables you to reach these users — no matter whether they’re using mobile phones in an off-the-grid area or a 5k smart TV hooked up to Ethernet — by dynamically switching between different bandwidths.

With adaptive bitrate streaming, all users get the best possible experience for their circumstances. When a mobile viewer reaches a stronger signal strength, their stream will automatically adapt to deliver a higher bitrate file. Likewise, as household internet is strained by family members logging onto multiple devices, the stream will adjust to bandwidth constraints with minimal buffering.

Built for adaptive bitrate streaming, the Wowza Streaming Engine™ software can be configured to create discrete streams at various bitrates and detect the optimum speed for delivery. In this video, Justin walks through the step-by-step process of ABR streaming, so you can ensure a good user experience for anyone accessing your content.

For more info, check out our documentation.

 

Full Video Transcript:

Justin Miller:

Let’s take an RTMP stream and transcode it into HLS with adaptive bitrate. Now for this, we’re going to be using OBS Studio as our encoder. We’ll be using Wowza Streaming Engine on Linux, and we’ll also be using THEOplayer for our playback device. Now, keep in mind, the reason you will need to be on Linux or on Windows is because these operating systems are the ones that allow the transcoder to be used. Start by going to applications and clicking on your default’s live application. If you have a different application you’d like to use, go ahead and use that. Next, we’ll go under Incoming Streams, and here we can find our current OBS stream coming in named frontrange. We’ll see the bytes in bytes out, but to know the specific amount that’s actually being used, we’ll need to go into OBS and within the Settings we can find that the current output for the video is 5,000 kilobits per second and for the audio 160 kilobits per second.

So, we’re going to need to use that information later, but back in Wowza Streaming Engine we’ll go to Transcoder. We’re first going to need to enable the transcoder. As you can see, it’s not enabled quite yet. So, once you’ve clicked on Enable Transcoder you’ll then need to Restart. Click OK, and while it’s restarting, one thing you should also note is the Fallback Template is the transrate template. We’re going to also need that information later. Now go to Incoming Streams, and here under Incoming Streams, you can see that there is see frontrange source, 360p version, and a 160p version. Let’s go back to the Transcoder tab, and here we’re going to access the transrate default by going under Transcoder Templates and clicking the Transrate (Default). Here we’ll see that source 360p and 160p are checked.

We’re going to also add 240p by clicking on 240p and then Enable Preset. Once the preset’s been enabled, you’ll still need to restart the application for that preset to take effect. Okay, now that you’ve done that, we’ll go back to Incoming Streams, and here under Incoming Streams, you can see the frontrange_240p is now listed in active. The next thing we’re going to do is add a SMIL file starting with the frontrange_source stream. So I’m going to copy that name right there, and I’m going to go under SMIL Files and Add SMIL File. I’m going to name this SMIL file frontrange, and I’ll also title it The Front Range. Once it’s been added, I can now start adding the SMIL streams. I’m going to add, first of all, a Type>Video, which will be for each type I add, and I’m going to name it… Well, I’m going to paste in my frontrange_source.

I’ll make the system language English, and if you recall in the beginning when I checked in OBS, the video bitrate was 5,000 kilobits. The video with was 1280. The video height, 720, and the audio bitrate 160 kilobits. Okay. Once I’m done, I can add this in. Once that’s done, I can start adding in the rest of my streams. So, I’m going to start by adding in first the 360p stream which I’ll just amend with the 360p for the name, but I’m not sure what my video bitrate, my video width, and my video height are. So to make things a little easier, I’m going to open up a new tab, which is basically a duplicate of my current tab and go under Transcoder to access the transrate template. Here, I can go into the 360p preset, and I can get this information directly from the page.

So, I’m going to copy the video bitrate, and then I’m going to also remember the width and the height. The audio is going to be 160 kilobits per second, just like it was previously from OBS. So, going back to my original tab, I can now enter in my system language, my video bitrate, my video width, and then my video height, as well as that 160 kilobits per second audio bitrate. Okay, now that this has been added, I’ll start again to enter in the 240p and then the 160p. I’m going to speed through this process because it’s pretty much the same as the 360p, where I will go into the other tab, get this information from the transrate template, and add the information in to my SMIL file.

Now that we’re done, we can see that the streams and the SMIL file are 160p, 240p, 360p, and the source, which is 720p. Next, I can go under Test Player, and if I look under Mobile, I can see the URL necessary for playback of the ABR stream. So, to play this back I’m going to use THEOplayer, which I’m already logged into. If I scroll down, I can go to the right under SDKs to Create, and here under create I’m going to name my new stream The Front Range. Once I have, I’ll click Next, scroll down, and I will paste in under HLS my HLS adaptive bitrate stream. Let’s load that, and once we’re done, we’ll click Next. Now we need to publish. It will take a few seconds for the SDK to be created, and once it has, you can choose to scroll down and go under “How to embed my THEOplayer HTML5 SDK?”

While you do have a step-by-step on how to do this, I would recommend going to the Full Sample Page and choosing to Download the sample. Once the sample has been downloaded, click on the sample, and it will open up in a new window where we can click on the big arrow in order to see the live stream playing back. If you go to the lower right-hand corner to the settings, you’ll see that for adaptive bitrate, it is currently adapting to a 160p quality. We can actually click here and switch that quality to the other options, which, as you recall, were 160p, 240p, 360p, and 720p. I’ve selected 720p, so as you can see, it’s going to shift from the quality of 160 to 720. Okay. That’s it for transcoding a stream from RTMP to adaptive bitrate HLS. Thanks for watching and happy streaming.

 

About Traci Ruether

As a Colorado-based B2B tech writer, Traci Ruether serves as Wowza's content marketing manager. Her background is in streaming and content delivery. In addition to writing, Traci enjoys cooking, reading, gardening, and spending quality time with her fur babies. Follow… View more