HTTP ingest requirements
To use MSL HTTP ingest, ensure that your encoder meets these requirements.
Bitrate and playlist
- Confirm that the first line of the bitrate playlist files is
#EXTM3U
. - Check that the bitrate playlist files contain the
#EXT-X-TARGETDURATION
and#EXT-X-MEDIA-SEQUENCE
tags. - Ensure that the tag
EXT_X_MEDIA_SEQUENCE
is consistent across playlists.
DNS lookups, upload retries, and timeouts
Encoders must perform DNS lookups
whenever an error occurs. Any time there is an
upload error, server abort, connection timeout, or
HTTP timeout, encoders should perform a DNS lookup
to ensure that they continue to be connected with
the appropriate server. If the entry point sends a
Connection=close
header in the response,
then the encoder needs to re-resolve the domain
(for all formats including RTMP).
This table summarizes how the failure conditions are handled.
Error condition | Object type | Handling |
---|---|---|
-TCP connection
attempt timeout -Abort midstream -TCP send or receive timeout |
Manifest | Re-resolve DNS on each retry and retry indefinitely. |
-TCP connection
attempt timeout -Abort midstream -Response timeout -TCP send or receive timeout |
Data (media, timed text) | Re-resolve DNS
on each retry and continue uploading until n seconds, where n is the value of segment duration.
After it reaches the segment duration value, drop
the current data and continue with the next
segment data.If segment duration is low (such as 2s or 1s), uploading might exceed the segment duration time and the encoder will back up. |
HTTP 403, 400 | Any | Do not retry - display error reason. |
HTTP 5xx | Data (media, timed text) | Re-resolve DNS
on each retry and continue uploading until n
seconds, where n
is the value of segment duration. After
it reaches the segment duration value, drop the
current data and continue with the next segment
data. To maintain continuity of the DVR time-line, continue to upload the missing segment as a lower priority. If segment duration is low (such as 2s or 1s), uploading might exceed the segment duration time and the encoder will back up. |
HTTP 5xx | Manifest | Re-resolve DNS on each retry and retry indefinitely. |
Extensions and mime types
This table provides mime type requirements for supported extensions.
Extension | Mime type |
---|---|
.f4m | application/f4m |
Content (fragment) files and .bootstrap file | video/f4f |
IDR frame alignment
Stream encoders should produce IDR frame alignment across bitrates for the duration of the targeted segment. For example, if an encoder is generating maximum supported 10-second segments, then every 10 seconds there must be timestamp-aligned IDR frames across streams. There must be an IDR frame at the beginning of the segment; otherwise, the audio and video might deviate and drop out of synchronization. IDR frames must be at the very beginning of the segment, not in the middle or end of the segment.
Industry compliance
If you are using | Your encoder must be compliant with |
---|---|
HLS | HTTP Live Streaming specification |
HDS | Adobe HTTP Dynamic Streaming specification |
DASH | DASH Industry Forum guidelines |
CMAF | HTTP Live Streaming specification and DASH Industry Forum guidelines |
Marking playlists complete
At the end of a list stream,
encoders should mark the stream (for HLS format)
as complete by inserting the EXT-X-ENDLIST
tag into the .m3u8
playlist file. This ensures that the device
behaves appropriately when it comes to the end of
the stream. The EXT-X-ENDLIST
tag prevents unexpected
playback issues when the device comes to the end
of the stream. This tag ensures that viewers have
a consistent and high-quality playback experience.
It is also required for Live-to-VoD
generation.
Publishing URL format
Encoders should be capable of using a POST URL with the entrypoint hostnames and pathnames in the format described in this table.
Stream Type | Hostname |
---|---|
Primary | p-ep{stream_id}.i.akamaientrypoint.net |
Backup | b-ep{stream_id}.i.akamaientrypoint.net |
URL path for HLS: https://p-ep{stream_id}.i.akamaientrypoint.net/<stream_id>/<uniquesourcename>/<sessionID>/<bitrateID>/<OPTIONAL_PATH>/<somename>_<sequence#>.extension
https://p-ep{stream_id}.i.akamaientrypoint.net/<stream_id>/<uniquesourcename>/<sessionID>/<bitrateID>/<OPTIONAL_PATH>/segment_0001.ts
https://p-ep{stream_id}.i.akamaientrypoint.net/<stream_id>/<uniquesourcename>/<sessionID>/<bitrateID>/<OPTIONAL_PATH>/segment_0002.ts
https://p-ep{stream_id}.i.akamaientrypoint.net/<stream_id>/<uniquesourcename>/<sessionID>/<bitrateID>/<OPTIONAL_PATH>/segment_0003.ts
URL path for HDS, DASH, or CMAF: https://p-ep{stream_id}.i.akamaientrypoint.net/<format>/<stream_id>/<uniquesourcename> /<sessionID>/<bitrateID>/<OPTIONAL_PATH>/ <somename>_<sequence#>.extension
URL Path Element | Description |
---|---|
format | The ingest format HDS, DASH, or CMAF. You need not specify the format for HLS. |
stream_id | Unique identifier for the stream provided by Akamai. |
uniquesourcename | This is a nomenclature change of the current event name. This is the first URL path component following the stream_id. Customers will use this name to identify the current media source from a set of sources ingesting into Akamai. |
sessionID | This helps to distinguish different encoder restart points and ensure
that path duplications do not overwrite the media objects across the restart points.
For example: for a 24x7 source, a good recommendation is to use a string with the date time string at the time of connection. <stream_id>/<uniquesourcename>/20160628T18h22m10s/* or <stream_id>/<uniquesourcename>/T1467082295/* |
bitrateID | A unique path element to distinguish
media segments specific to a bitrate. It is
mandatory to have this path element. Bitrate in
kilo bits of the corresponding media object should
be extractable using a regular expression such as:
*/rend4000K/*, */master_3000K/*,
*/bitrate3000K/*. |
OPTIONAL_PATH | Other fixed pathnames for specific
work flows that are not mandatory. For software
releases prior to Media Services Live 4.0, this is
the directory rollover pathname. Media Services Live 4.0 and above does not require directory rollover. You can upload all of the segment objects for a specific bitrate into the same URL path. However, to ensure compatibility the encoder should continue to support both directory rollover as well as non-rollover options in the short term. |
The playback URL format remains
the same as previous MSL versions. For example, if
the format is HLS it is: https://example-i.akamaized.net/hls/live/[stream_id]/[event_name]/[filename_.m3u8_or_.mpd]
PUT or POST request
Encoders should be capable of uploading generated content, video segments, and playlist/manifest files using multiple PUT or POST requests. Each segment should be uploaded in a separate request. Use a persistent connection for these requests.
Unique segment numbering or session ID
You can use either a unique segment number or a unique session ID.
- Check that the segment numbers are sequentially increasing.
- Verify if response received is 200 by requesting random ts segments (first one, last one, middle one) from the playlist.
- Check that the EXT-X-MEDIA-SEQUENCE corresponds to first segment in the bitrate playlist.
- Verify whether any #EXTINF has negative values in the bitrate m3.u8 files.
Segments generated by the encoder must be created with sequentially increasing segment numbers such as 1, 2, and 3. For example:
https://p-ep{stream_id}.i.akamaientrypoint.net/<stream_id>/<uniquesourcename>/<sessionID>/<bitrateID>/<OPTIONAL_PATH>/<somename>_<sequence#>.ts
https://p-ep{stream_id}.i.akamaientrypoint.net/<stream_id>/<uniquesourcename>/<sessionID>/<bitrateID>/<OPTIONAL_PATH>/segment_0001.ts
https://p-ep{stream_id}.i.akamaientrypoint.net/<stream_id>/<uniquesourcename>/<sessionID>/<bitrateID>/<OPTIONAL_PATH>/segment_0002.ts
https://p-ep{stream_id}.i.akamaientrypoint.net/<stream_id>/<uniquesourcename>/<sessionID>/<bitrateID>/<OPTIONAL_PATH>/segment_0003.ts
The segment number must be extractable from the upload URL using regex. Ensure that you separate the string and the numbers of a segment. Segment names can contain alphanumeric characters and the hyphen (-) as delimiters. Other special characters are not supported. The last item before the prefix must be a unique, sequentially increasing number. You cannot use symbols, special characters, or alphabets. For example:
bitrate1000-00012.ts
<sessionId>/bitrateA_12.ts
<sessionId>/1-123.ts
<sessionId>_1_123.ts
<sessionId>/P2-2-1001.ts
The path and segment number are treated as one entity; therefore, they must not repeat. Archived data gets corrupted when the encoder restarts and attempts to use the previous sequence number and path.
The encoder must not introduce any other changing parameters such as frequently changing time stamps in the URL path. For example, if the URL path format was: eventname/sessionID/bitrateID/post-timestamp_sequence#.ts
Introducing the post-timestamp
parameter
creates another set of directories for each
.ts file — a condition that would
cause excess directories and possible timeouts
over long periods of time.
User-Agent string
Encoders must include a User-Agent
header (which provides information about brand
name, version number, and build number in a
readable format) in all posts. For example,
Vendor Model Version#
URL configurability
Encoders should allow specification of a POST server address, also known as a POST URL, upload URL, or ingress URL. It's also recommended that encoders allow the specification of a playback address, also known as a playback URL or retrieval link. For details, see Playback URLs for HLS.
Use Live-to-VoD
The Live-to-VoD feature enables you to convert live streams to video-on-demand assets.
#EXT-X-PROGRAM-DATE-TIME
tag after a
discontinuity event. For example:
#EXT-X-PROGRAM-DATE-TIME:2017-01-19T08:04:00.624Z
The EXTINF
tag is also mandatory for
Live-to-VOD.
For DASH, Live-to-VoD is supported only for sequential segment indexing and not for time-base indexing.