apple http live streaming – Bitmovin https://bitmovin.com Bitmovin provides adaptive streaming infrastructure for video publishers and integrators. Fastest cloud encoding and HTML5 Player. Play Video Anywhere. Fri, 18 Aug 2023 09:44:59 +0000 en-GB hourly 1 https://bitmovin.com/wp-content/uploads/2023/11/bitmovin_favicon.svg apple http live streaming – Bitmovin https://bitmovin.com 32 32 Everything you need to know about Apple’s new Managed Media Source https://bitmovin.com/blog/managed-media-source/ https://bitmovin.com/blog/managed-media-source/#respond Tue, 20 Jun 2023 20:15:26 +0000 https://bitmovin.com/?p=263117 At their 2023 Worldwide Developer conference, Apple announced a new Managed Media Source API. This post will explain the new functionality and improvements over prior methods that will enable more efficient video streaming and longer battery life for iOS devices. Keep reading to learn more. Background and the “old” MSE The first internet videos of...

The post Everything you need to know about Apple’s new Managed Media Source appeared first on Bitmovin.

]]>
At their 2023 Worldwide Developer conference, Apple announced a new Managed Media Source API. This post will explain the new functionality and improvements over prior methods that will enable more efficient video streaming and longer battery life for iOS devices. Keep reading to learn more.

Background and the “old” MSE

The first internet videos of the early 2000s were powered by plugins like Flash and Quicktime, separate software that needed to be installed and maintained in addition to the web browser. In 2010, HTML5 was introduced, with its <video> tag that made it possible to embed video without plugins. This was a much simpler and more flexible approach to adding video to websites, but had some limitations. Apple’s HTTP Live Streaming (HLS) made adaptive streaming possible, but developers wanted more control and flexibility than native HLS offered, like the ability to select media or play DRM-protected content. In 2013, the Media Source Extension (MSE) was published by the W3C body, providing a low-level toolkit that gave more control for managing buffering and resolution for adaptive streaming. MSE was quickly adopted by all major browsers and is now the most widely used web video technology…except for on iPhones. MSE has some inefficiencies that lead to greater power use than native HLS and Apple’s testing found that adding MSE support would have meant reducing the battery life, so all the benefits of MSE have been unavailable on iPhone…until now.

New Managed Media Source in Safari 17

With MSE, it can be difficult to achieve the same quality of playback possible with HLS, especially with lower power devices and spotty network conditions. This is partly because MSE transfers most control over the streaming of media data from the User Agent to the application running in the page. But the page doesn’t have the same level of knowledge or even goals as the User Agent, and may request media data at any time, often at the expense of higher power usage. To address those drawbacks and combine the flexibility provided by MSE with the efficiency of HLS, Apple created a new Managed Media Source API (MMS).

managed media source advantages: lower power usage, Better memory handling, Less buffer management, Access to 5G connectivity, You are still in control
Advantages of Managed Media Source over MSE.
Image source: WWDC23 presentation

The new “managed” MediaSource gives the browser more control over the MediaSource and its associated objects. It makes it easier to support streaming media playback on mobile devices, while allowing User Agents to react to changes in memory usage and networking capabilities. MMS can reduce power usage by telling the webpage when it’s a good time to load more media data from the network. When nothing is requested, the cellular modem can go into a low power state for longer periods of time, increasing battery life. When the system gets into a low memory state, MMS may clear out buffered data as needed to reduce memory consumption and keep operations of the system and the app stable. MMS also tracks when buffering should start and stop, so the browser can detect low buffer and full buffer states for you. Using MMS will save your viewers bandwidth and battery life, allowing them to enjoy your videos for even longer. 

Airplay with MMS

One of the great things about native HLS support in Safari is the automatic support for AirPlay that lets viewers stream video from their phone to compatible Smart TVs and set top boxes. Airplay requires a URL that you can send, but that doesn’t exist in MSE, making them incompatible. But now with MMS, you can add an HLS playlist to a child source element for the video, and when the user AirPlays your content, Safari will switch away from your Managed Media Source and play the HLS stream on the AirPlay device. It’s a slick way to get the best of both worlds.

code snippet for adding AirPlay support when using Managed Media Source
Code snippet for adding AirPlay Support with Managed Media Source. Image source: WWDC23 presentation

Migration from MSE to MMS

The Managed Media Source is designed in a backwards compatible way. This means that changing the code from creating a MediaSource object to creating a ManagedMediaSource object after checking if the API is available is the first step:

function getMediaSource() {
    if (window.ManagedMediaSource) {
        return new window.ManagedMediaSource();
    }
    if (window.MediaSource) {
        return new window.MediaSource();
    }

    throw “No MediaSource API available”;
}
const mediaSource = getMediaSource();

As the MMS supports all methods the “old” MSE does, this is all to get you started, but doesn’t unleash the full power of this new API. For that, you need to handle different new events:

mediaSource.addEventListener(“startstreaming”, onStartStreamingHandler);

The startstreaming event indicates that more media data should now be loaded from the network.

mediaSource.addEventListener(“endstreaming”, onStopStreamingHandler);

The endstreaming event is the counterpart of startstreaming and signals that for now no more media data should be requested from the network. This status can also be checked via the streaming attribute on the MMS instance. On devices like iPhones (once fully available) and iPad, requests that follow these two hints benefit from the fast 5G network and allows the device to get into low power mode in between request batches.

In addition, the current implementation also offers hints about a preferred, suggested quality to download. The browser suggests if a high, medium, or low quality should be requested. The user agent may base this on facts like network speed, but also additional details like user settings about enabled data saver modes. This can be read from the MMS instance’s quality property and any change is signaled via an qualitychange event:

mediaSource.addEventListener(“qualitychange”, onQualityChangeHandler);

It remains to be seen if the quality hint will still be available in the future as it offers some risk of fingerprinting.

As the MMS may remove any date range at any given time (as opposed to the MSE’s behavior where this could only happen during the process of appending data), it is strongly recommended to check if the data needed next is still present or needs to be re-downloaded.

Next Steps

Managed Media Source is already available in the current Safari Tech Preview on macOS and Safari 17 on iPadOS 17 beta and can be enabled as an experimental feature on iOS 17 beta. Once generally available on iOS, without being an experimental feature, this will finally bring lots of flexibility and choices to Safari, other browsers, and Apps with WebViews on iOS. It would even be possible to finally support DASH streams on iOS, while keeping web apps power efficient. 

Apple has already submitted the proposal of the Managed Media Source API to the World Wide Web Consortium (W3C), which is under discussion and might lead to an open standard other browser vendors could adopt.

Bitmovin will be running technical evaluations to fully explore and understand the benefits of MMS, including how it performs in various real-world environments. We will closely follow the progress from Apple and consider introducing support for MMS into our Web Player SDK once it advances from being an experimental feature on iOS. Stay tuned!

If you’re interested in more detail, you can watch the replay of the media formats section from WWDC23 here and read the release notes for Safari 17 beta and iOS & iPadOS 17 beta. You can also check out our MSE demo code and our blog about developing a video player with structured concurrency.

The post Everything you need to know about Apple’s new Managed Media Source appeared first on Bitmovin.

]]>
https://bitmovin.com/blog/managed-media-source/feed/ 0
How live streaming operators can meet the demand for the best viewing experiences with the Bitmovin and Videon solution https://bitmovin.com/blog/live-streaming-operators-meet-the-demand-for-the-best-viewing-experiences/ Mon, 28 Nov 2022 14:20:06 +0000 https://bitmovin.com/?p=245849 The growth of live streaming has seen a major uptick in content and viewer numbers, and it’s not slowing down anytime soon. The rise clearly extends to the types of live streaming experiences that viewers can access, which led us to ask ourselves three key questions: These questions are why we partnered with Videon; our...

The post How live streaming operators can meet the demand for the best viewing experiences with the Bitmovin and Videon solution appeared first on Bitmovin.

]]>

The growth of live streaming has seen a major uptick in content and viewer numbers, and it’s not slowing down anytime soon. The rise clearly extends to the types of live streaming experiences that viewers can access, which led us to ask ourselves three key questions:

  • What do live streaming operators need?
  • What can make live streaming for the operator easier or better?
  • How can we improve costs, workflows and reliability?

These questions are why we partnered with Videon; our combined expertise in video streaming and hybrid:cloud workflows, utilizing edge computing at the point-of-production,has fuelled an ambition to deliver live streaming experiences that offer a new standard of reliability, quality, ease of use and cost-effectiveness to operators. The result? An easy-to-use hybrid:cloud solution, deploying a Videon Compute Platform on premises that can be quickly configured to send content to the Bitmovin Live Event Encoder for distribution to digital platforms using HLS and DASH.

- Bitmovin

We’re excited, and you should be too! Keep reading to find out everything you need to know about what we’ve built with Videon. You can also watch a webinar recording hosted by Videon that features our very own Paul Macklin, Senior Product Manager for our Live Encoding Solution.

The challenges that live streaming operators face right now

When it comes to live streaming, the immediate challenges include:   

  • Limited reliability due to running live streams on a single laptop and using open-source tools 
  • Using a basic encoder for an advanced use case, requiring a complicated chain of equipment, which increases the risk of downtime through multiple single points of failure (branding, content protection, video and audio filters, etc.)
  • Having a physical setup which is a challenge to fire up quickly and pack down efficiently.

Operators are facing the challenge of questionable levels of reliability, complex workflows, processes that do not scale and lack of flexibility not only with the workflow but with the actual physical setup.

How to make live streaming (and your life) easier

To put it simply, our partnership with Videon makes things easier for you. Our collaboration makes it possible for an end-to-end solution that supports single input or highly resilient dual input and 1+1 architectures for live streaming video operators of almost all levels of experience.  You will find our partnership useful if:

  • You are running OBS on a laptop with complex workflows that cannot easily scale and you have felt the need to upgrade to using a single-purpose device that is pre-configured and ready to use out of the box
  • You are currently unable to get your signal to the cloud and need an on-premise solution that is built for purpose
  • You want an end-to-end solution that gets your signal into the cloud and provides additional tools for stream Playback and performance tracking (The Bitmovin Player and Analytics solutions)

It is abundantly clear to us that there are a variety of use cases and types of companies that can benefit from our joint solution with Videon.  For example, suppose you’re working for a large-scale broadcaster/media outlet and companies with 24/7 live distribution of video content, you will see the need for a bank of on-premise devices that bring redundancy options and allow for dual inputs. Using our joint solution with Videon can provide all of that in a cost-effective way. The additional use case is anchored to the type of business that needs a simple, trustworthy, small form factor solution that can be set up and packed down quickly, in addition to being cost-effective. 

Why our joint solution is perfect for you

So if you’ve made it this far, the chances are that our joint solution is the right one for you, but just in case you need any further convincing, let me reiterate how you will benefit:

  1. You can easily deliver live content at the highest quality with an easy-to-use pre-configured solution
  2. We will ensure your streams are underpinned by reliable technology
  3. It’s a complete end-to-end solution! You get an on-prem solution with our cloud-based Live Event Encoder, plus our industry-leading video Player and Analytics! 

How to get started

If you would like to connect with a live video expert and learn more about the end-to-end solution, email sales@bitmovin.com. To read more about the partnership, check out the announcement and to find more about Videon, go here

The post How live streaming operators can meet the demand for the best viewing experiences with the Bitmovin and Videon solution appeared first on Bitmovin.

]]>
Apple HTTP Live Streaming https://bitmovin.com/blog/apple-http-live-streaming-hls/ Thu, 02 Jul 2015 11:23:23 +0000 http://bitmovin.com/?p=7358 Apple HTTP Live Streaming (Apple HLS) is a widely used adaptive HTTP streaming protocol available as IETF Internet Draft. It is mainly targeted towards mobile devices based on iOS such as iPhone, iPad or AppleTV, as well as at OS X desktop computers. Apple’s Internet browser Safari also accepts HLS streams as the source of the HTML5 <Video> tag,...

The post Apple HTTP Live Streaming appeared first on Bitmovin.

]]>
Apple HTTP Live Streaming (Apple HLS) is a widely used adaptive HTTP streaming protocol available as IETF Internet Draft. It is mainly targeted towards mobile devices based on iOS such as iPhone, iPad or AppleTV, as well as at OS X desktop computers. Apple’s Internet browser Safari also accepts HLS streams as the source of the HTML5 <Video> tag, unfortunately this only works on Apple systems as well. The lack of broad native platform support is one of the main disadvantages of Apple HLS nowadays, but there are many companies working hard on implementing clients as well as integrating HLS into other platforms and streaming servers. In contrast to the other (MPEG-DASH , Smooth Streaming), Apple HLS was especially designed for mobile environments and can request several segments together to make effective use of the Internet connection. This means that it could request more than one media segment by one HTTP 1.1 GET request, which is comparable to the pipelining feature of HTTP 1.1 and therefore eliminates unnecessary RTTs of several segment requests. These features definitely lead to a more efficient use of the connection.

Bitmovin now Supports Apple HTTP Live Streaming (HLS)

Apple HLS File Formats

Apple HTTP Live Streaming (Apple HLS) uses M3U8 playlists as a manifest file for their content files, which is an extension of the M3U format used for MP3 playlists. HLS is the only system that uses MPEG-2 Transport Stream (MP2TS) which adds a significant overhead in relation to the audio/video data, instead of MP4 or another ISO Base Media File Format based container. MPEG-2 TS consists of packets with 188 bytes in size, where each packet has headers with a varying size of 4 to 12 bytes. Therefore, the overhead caused by these headers increases proportionally with the segment size, which means that relative overhead does not tend to zero with increasing bitrates. Moreover, each MPEG-2 TS stream consists of several other data beside audio and video, such as Program Association Tables that introduce additional overhead. Additionally, audio and video streams are encapsulated in Packetized Elementary Streams (PES) which introduces an extra overhead per audio sample or video frame.

Manifest – M3U8

Apple HTTP Live Streaming (HLS) uses an M3U8 playlist as its manifest, which is a little bit different to the other approaches, e.g., MPEG-DASH or Microsoft Smooth Streaming that use an XML based manifest. VOD content with one quality can be described through the basic playlist feature, which means that the individual segments URLs are available in the main M3U8. If you want to offer multiple qualities as intended with adaptive multimedia streaming, you will have to use the variant playlist. Typically, a variant of a stream is the quality of the stream in a specific bitrate and/or resolution. Variant playlists are structured in the following in that there is one root M3U8 that references other M3U8s that describe the individual variants (qualities). The root M3U8 will then contain several EXT-X-STREAM-INF tags that indicate that the following URL is referencing another M3U8 playlist. Additionally, the EXT-X-STREAM-INF tag could contain several attributes such as bandwidth, codec, etc. Advertisements are supported in HLS through the EXT-X-DISCONTINUITY tag. This tag indicates a discontinuity in the media stream between the actual media segment and the one that follows. Furthermore, a basic encryption method is also available that allows AES-128 encryption of the media segments. The key server can be signaled in the M3U8 with the EXT-X-KEY tag and the URI attribute.

Generate your own Apple HTTP Live Streaming (Apple HLS) Content

The get started link below offers you a free trial with Bitmovin. With our Cloud Encoding Service and HTML5 Adaptive Streaming Player, you can get up and running with your first Apple HLS in a matter of minutes. Try it now!
Further Readings:

The post Apple HTTP Live Streaming appeared first on Bitmovin.

]]>