1 | # Video.JS HLS Live
|
2 |
|
3 | ## Brightcove Service Differences:
|
4 | - Brightcove uses the Zencoder HLS Live API.
|
5 | - Once ingest begins, approximately 50 seconds later the original manifest is available.
|
6 | - I have not seen any ability to enforce a sliding window, so I believe Brightcove Live HLS serves all available segments on a continuously growing manifest.
|
7 | - One minute after last disconnect from the ingest stream, the event is considered complete and the final manifest delivered.
|
8 | - The final manifest will be different in two distinct ways, it will include the `EXT-X-ENDLIST` tag notifying all connected clients that the live stream has concluded and is now VOD. It will also contain a custom `ZEN-TOTAL-DURATION`: tag with representing the total amount of recorded time in seconds.
|
9 |
|
10 | ## Akamai Service Differences:
|
11 | - Akamai only serves HLS Live off of Akamai HD2 endpoints.
|
12 | - These vary from their HDS counterparts by url syntax.
|
13 | - ```<host> /i/``` vs.``` <host> /z/``` for HDS
|
14 | - `master.m3u8` vs.`manifest.f4m` for HDS
|
15 | - Their endpoints are difficult to arrange CORS configurations on.
|
16 | - Akamai manifests span the gamut of known HLS tags, both supported and unsupported by our plugin.
|
17 |
|
18 | ## Once Service Differences:
|
19 | - Once manifests tend to include the use of `EXT-X-DISCONTINUITY` tags which are unsupported to date.
|
20 | - Once streams so far tend to use a different encoding algorithm on their segments which sometime result in a range error during transmuxing.
|
21 |
|
22 |
|
23 | # Live HLS Research
|
24 | This document is a collection of notes on Live HLS implementations in the wild.
|
25 |
|
26 | There are two varieties of Live HLS. In the first, playlists are
|
27 | persistent and strictly appended to. In the alternative form, the
|
28 | maximum number of segments in a playlist is relatively stable and an
|
29 | old segment is removed every time a new segment becomes available.
|
30 |
|
31 | On iOS devices, both stream types report a duration of `Infinity`. The
|
32 | `currentTime` is equal to the amount of the stream that has been
|
33 | played back on the device.
|
34 |
|
35 | ## Akamai HD2
|
36 |
|
37 | ## OnceLIVE
|
38 | "Sliding window" live streams.
|
39 |
|
40 | ### Variant Playlists
|
41 | Once variant playlists look like standard HLS variant playlists.
|
42 |
|
43 | ### Media Playlists
|
44 | OnceLIVE uses "sliding window" manifests for live playback. The media
|
45 | playlists do not have an `EXT-X-ENDLIST` and don't declare a
|
46 | `EXT-X-PLAYLIST-TYPE`. On first request, the stream media playlist
|
47 | returned four segment URLs with a starting media sequence of one,
|
48 | preceded by a `EXT-X-DISCONTINUITY` tag. As playback progressed, that
|
49 | number grew to 13 segment URLs, at which point it stabilized. That
|
50 | would equate to a steady-state 65 second window at 5 seconds per
|
51 | segment.
|
52 |
|
53 | OnceLive documentation is [available on the Unicorn Media
|
54 | website](http://www.unicornmedia.com/documents/2013/02/oncelive_implementationguide.pdf).
|
55 |
|
56 | Here's a script to quickly parse out segment URLs:
|
57 |
|
58 | ```shell
|
59 | curl $ONCE_MEDIA_PLAYLIST | grep '^http'
|
60 | ```
|
61 |
|
62 | An example media playlist might look something like this:
|
63 | ```m3u8
|
64 | #EXTM3U
|
65 | #EXT-X-TARGETDURATION:5
|
66 | #EXT-X-MEDIA-SEQUENCE:3
|
67 | #EXTINF:5,3
|
68 | http://example.com/0/1/content.ts?visitguid=uuid&asseturl=http://once.example.com/asset.lrm&failoverurl=http://example.com/blank.jpg
|
69 | #EXTINF:5,4
|
70 | http://example.com/1/2/content.ts?visitguid=uuid&asseturl=http://once.example.com/asset.lrm&failoverurl=http://example.com/blank.jpg
|
71 | #EXTINF:5,5
|
72 | http://example.com/2/3/content.ts?visitguid=uuid&asseturl=http://once.example.com/asset.lrm&failoverurl=http://example.com/blank.jpg
|
73 | #EXTINF:5,6
|
74 | http://example.com/3/4/content.ts?visitguid=uuid&asseturl=http://once.example.com/asset.lrm&failoverurl=http://example.com/blank.jpg
|
75 | ```
|
76 |
|
77 | ## Zencoder Live
|