When Apple first introduced http-live-streaming over four years ago with iOS 3.0, iOS was the only mobile operating system that supported the adaptive bitrate format. With the explosion of mobile video and the need to create seamless viewing experiences across all devices, HLS has exploded accordingly. Starting with Android 4.1 (JellyBean), limited support for HLS was available. With the more current version of Android, 4.4 (KitKat), full support for HLS has been added. In addition, HLS has become the preferred format for the most popular OTT devices, including Roku and AppleTV. The new and popular Google ChromeCast does not support HLS, but rather MPEG-DASH, Microsoft Smooth Streaming, and Progressive MP4.
The beauty of http-live-streaming is that a consistent user-experience is achieved across devices, connection speeds, and screen sizes. This is accomplished by breaking up the video into small chunks (called segments). A collection of segments is created for multiple bandwidths and resolutions. As a viewer watches video on their device, the stream is navigated in real-time, as available bandwidth changes. This is why the segments are so important, as streams switch between segments at varying bandwidths and resolutions to create a seamless experience for the viewer.
To create the HLS segments, Apple released their media segmenter tool, which breaks up your source content into those segments. It’s a great tool, but it’s only available on OSX. Encoding.com quickly identified the need to have a segmenter tool that could be easily integrated with their cloud encoding infrastructure which runs on Linux not OSX. Because of this, we developed our own media segmenter tool.
While http-live-streaming is a fantastic technology, it does have its drawbacks. The primary drawback is the use of the MPEG-TS codec. While MPEG-TS is battle tested and well proven, it comes with a lot of overhead. This is because when MPEG-TS was invented in the 90s, network technology favored transmission over processing; meaning hardware was better at transmitting data than processing it. Because of this, hardware favored formats that were easier to process and not easier to transmit. At its worst, the overhead with MPEG-TS can be upwards of 15%. Now imagine if you have a large video catalog of thousands of terabytes, if you can reduce the 15% to 5%, that’s a big savings in storage, not to mention streaming costs. That’s where the segmenter tool comes in.
We’re now on v3 of our HLS Cloud Media Segmenter. With each release we’ve made significant improvements. Using Apple’s Media Stream Validator we generated the following results with the various versions of our media segmenter tool.
V1 – This is the segmenter bundled with FFMPEG and carries significant overhead (as much as 27% with a 364kbps file or 17.3% with a 864kbps file!), and generated several warnings.
V2 – This is based on HTTP Live Segmenter based tool. It carries with it the same overhead, but generates far fewer warnings.
V3 – This version, we call tsparser, we built in-house from the ground up to be optimized for our cloud infrastructure. This has significantly less overhead (5.8% with a 364kbps file or 3.8% with a 864kbps file), and does not generate any warnings.
Creating HLS outputs with Encoding.com is easy, and we give you granular control over all the HLS parameters. Our API builder (login required) takes the guesswork out out building your XML or JSON. Let’s take a closer look.
Segmenter – This allows you to choose which media segmenter tool you’d like to use. While v3 is the most efficient, we still provide access to previous versions for legacy customers.
Bitrates/Framerates – Specify the bitrates and framerates for each stream, by creating a wide variety of streams across multiple bitrates and framerates, you are ensuring seamless playback over a wider range of devices and bandwidths.
Keyframes – Each stream has it’s own set of keyframes, when switching between streams the keyframes for each bandwidth are matched to create a seamless transition between streams.
Pack_Files – This allows you to package the output as a compressed tarball. Because the so many output segments are create, packaging them for delivery makes things far more efficient.
Segment_Duration – This gives you control over the size of the segments that are created. Apple recommends a segment size of 10 second. In cases where you may want to lower segments size to allow for faster navigation of streams, keep in mind the smaller the segments size, the more segments that are created.
Creating HLS Streams in our User Interface (login required) is just as easy. Everything you need is one place.
HTTP Live Streaming is the leading media format that is driving the explosion in mobile video consumption because of it’s flexibility, broad support, and ability to create seamless viewing experiences across all devices. Because of this, generating low overhead, warning free HLS output is a critical component to your mobile video distribution strategy.