Live manifest generation and vending are crucial steps in live streaming, ensuring that media players can access and navigate video and audio streams seamlessly. The manifest is a file that organizes and directs the playback of video and audio segments in adaptive bitrate streaming, guiding the player to fetch the appropriate video fragments based on the viewer’s device, bandwidth, and network conditions.
This deep dive will cover the purpose of live manifest generation, how it works, technologies involved, key challenges, and industry products used in this process.
Live manifest generation refers to the creation of a manifest file that serves as an index or playlist for a live video stream. The manifest provides the media player with essential information, such as the available bitrates, codecs, segment durations, encryption keys (if DRM is used), and the location of individual media segments. The media player uses this file to request the appropriate video/audio fragments dynamically during playback.
In adaptive bitrate streaming (ABR), the manifest contains multiple versions of the live stream, each encoded at different quality levels (bitrates and resolutions). This allows the player to switch between versions depending on the viewer’s current bandwidth.
The manifest is typically generated by the media server or packaging tool after the stream has been encoded and packaged into fragments. It evolves dynamically as the live stream progresses, constantly updating to reflect the current segments available for playback.
The key process involves the following steps:
Before manifest generation, the live video stream is encoded at various bitrates and resolutions, then split into fragments using protocols like HLS, DASH, or CMAF.
Once the fragments are created, a manifest (or playlist) file is generated. This file organizes the different versions of the stream and points to each media fragment.
For HLS, the manifest is a .m3u8
file, which lists the different bitrates, segment files, and any encryption keys needed.
For DASH, the manifest is an .mpd
(Media Presentation Description) file, which similarly indexes the available media representations and segments.
The manifest is dynamically updated to include new fragments as they become available during the live stream. The server appends information about the latest segments, allowing the player to continue fetching new data in real time.
The manifest file includes multiple representations of the same video, each at a different resolution and bitrate. This allows the media player to adaptively switch between different versions of the stream based on the user’s internet speed.
Low Bitrate Streams: For viewers with slower or unstable internet connections, the manifest will provide access to lower-quality video (e.g., 480p or 360p).
High Bitrate Streams: For viewers with faster internet speeds, the player can fetch high-quality video streams (e.g., 1080p or 4K).
The media player continually references the manifest during playback, requesting new fragments and switching bitrates as needed.
Manifest vending refers to the process of serving the generated manifest file to end-user devices or media players. This can happen via a media server, CDN (Content Delivery Network), or cloud-based streaming service. The media player requests the manifest from a specific URL, which is typically provided by the streaming platform.
The vending process must ensure that the manifest file is kept up-to-date and available in real-time, as the live stream evolves.
A manifest file contains essential information that enables seamless playback of live video streams. Let’s explore the structure of manifest files for the most common streaming protocols: HLS and DASH.
The HLS manifest is written in a simple, text-based format known as M3U. It contains both metadata and URLs that point to the video/audio segments.
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:6.0,
http://example.com/segment1.ts
#EXTINF:6.0,
http://example.com/segment2.ts
#EXTINF:6.0,
http://example.com/segment3.ts
Key elements:
.ts
files).The DASH manifest is more complex, written in XML format. It defines different representations (e.g., various bitrates) and points to fragmented media files.
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns="urn:mpeg:DASH:schema:MPD:2011" type="dynamic" minimumUpdatePeriod="PT2S">
<Period>
<AdaptationSet mimeType="video/mp4" segmentAlignment="true">
<Representation id="1" bandwidth="500000" codecs="avc1.42c00c" width="640" height="360" frameRate="30">
<SegmentTemplate media="segment$Number$.m4s" startNumber="1" duration="2000"/>
</Representation>
<Representation id="2" bandwidth="1000000" codecs="avc1.42c00c" width="1280" height="720" frameRate="30">
<SegmentTemplate media="segment$Number$.m4s" startNumber="1" duration="2000"/>
</Representation>
</AdaptationSet>
</Period>
</MPD>
Key elements:
Several tools, protocols, and services facilitate live manifest generation and vending. These include streaming protocols, media servers, cloud platforms, and CDNs.
HLS (HTTP Live Streaming): Developed by Apple, HLS is widely used and supported across most devices, especially iOS and macOS devices.
DASH (Dynamic Adaptive Streaming over HTTP): An open-source protocol designed for adaptive streaming and widely supported on Android and web browsers.
CMAF (Common Media Application Format): A relatively new format that unifies the best of HLS and DASH for reduced latency and simpler workflows.
FFmpeg: A widely used open-source tool that can be used for generating HLS and DASH manifests during live streaming. FFmpeg can dynamically update manifests for live streams.
Wowza Streaming Engine: A media server that supports live encoding, packaging, and manifest generation for HLS and DASH. Wowza can create and update manifest files in real-time during live broadcasts.
AWS Elemental MediaPackage: A cloud-based solution that automatically generates and updates manifest files for HLS, DASH, and CMAF streams. It also handles DRM and multi-bitrate streams.
Unified Streaming: A media streaming and packaging tool that supports dynamic manifest generation for both HLS and DASH. It provides tools for live, on-demand, and event-based streaming.
CDNs ensure efficient vending of manifests and media fragments by caching content at multiple locations globally.
In live streaming, minimizing latency is critical, especially for real-time events like sports, news, or gaming. Manifest files must be updated frequently as new segments become available, and the player must be able to fetch these updates in near real-time.
During high-traffic events (e.g., live concerts, sports games), the server needs to generate and vend manifest files to potentially millions of concurrent viewers, which can strain infrastructure.
The player must seamlessly switch between different bitrates and resolutions as network conditions change, without causing buffering or interruptions. The manifest must accurately reflect all available qualities, and fragment URLs must be available when the player requests them.
For premium content, manifests must include information about encryption keys or DRM systems (like Widevine, PlayReady, or FairPlay), which adds complexity to manifest generation and vending.
Several products and platforms are available to facilitate live manifest generation and vending. Below are some popular choices:
Live manifest generation and vending are critical components of modern live streaming workflows, enabling seamless adaptive bitrate streaming and playback on various devices. By dynamically updating manifests and handling ABR streams efficiently, these processes ensure that viewers can experience smooth and high-quality streams regardless of their device or network conditions. Whether using cloud-based services like AWS Elemental or on-premises solutions like Wowza, mastering manifest generation and vending is essential for delivering reliable, scalable live streaming experiences.
Dive deep into the concepts