Glossary

Full glossary

Manifest file

What is a video manifest file?

A video manifest gets its name from one of the definitions of a manifest. According to the Merriam-Webster dictionary:

a list of passengers or an invoice of cargo for a vehicle (such as a ship or plane)

In the context of video, a manifest file is a text-based document that includes details about the media stream. It serves as a guide for the media player, storing information on how to fetch and play the video or audio content.

In HTTP Live Streaming (HLS) video streaming, manifest files have the extension m3u8.

HLS streaming

A video stream can have multiple manifest files: a single primary playlist, which is historically called a 'master' playlist, and multiple media playlists.

Primary manifest

The primary manifest is the first file that a player requests when video playback begins. This file lists all of the available streaming versions of the video that are available. There are 2 lines per version, and they typically look like this:

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=4400000,RESOLUTION=3840x2160, CODECS="avc1.42e030,mp4a.40.2"
/processing_video/2160/manifest.m3u8

The first line of this example manifest stores information about the media stream:

  • requires a bandwidth of 4.4 MBPS,
  • has 4k video resolution (3840x2160),
  • requires codecs describes the codecs avc1.42e030 or mp4a.40.2, so the player can find a compatible version for a web browser.

The second line is a path to where this specific version of the video can be found. Notice that this path points to another m3u8 manifest file, which is the media manifest file. The primary manifest has links that point to each streaming version’s media manifest.

Media manifest

This file lists all of the video segments available for the video stream. Media manifests generally have this structure:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-KEY:METHOD=AES-128,URI="aes.key",IV=0x07B1D7401B75CA2937353EC4550FEE5D
#EXTINF:4.000000,
0000.ts
#EXTINF:4.000000,
0001.ts
#EXTINF:4.000000,
0002.ts
#EXTINF:4.000000,
0003.ts
#EXTINF:4.000000,
0004.ts
#EXTINF:0.120000,
0005.ts
#EXT-X-ENDLIST

In this example, each segment is 4 seconds long (EXTINF), and there is a link to the file.

Usage in players

The video player uses the primary mainfest to decide which quality version of the video should be played. The player makes this decision based on these factors:

  • the available network speed
  • the size of the playback window

If any of these parameters change, the player can adjust the stream to a different quality version. In this case the player requests the media manifest of that version and immediately switches to the media files at a given time in the video playback to ensure uninterrupted playback.

How api.video uses manifest files

At api.video, every video you upload is encoded as an HLS video stream, with up to 6 different qualities / bitrates. For every upload, the API responds with 3 links:

  • the primary manifest
  • the player URL
  • an iframe that you can use for embedding

The video player and the iframe embed links use the primary manifest to begin playback. With just a simple upload, all your HLS streaming and manifest needs are taken care of!