https://github.com/livepeer/livepeer-wowza
Livepeer + Wowza Integration Plugin
https://github.com/livepeer/livepeer-wowza
Last synced: 4 months ago
JSON representation
Livepeer + Wowza Integration Plugin
- Host: GitHub
- URL: https://github.com/livepeer/livepeer-wowza
- Owner: livepeer
- License: mit
- Created: 2019-06-25T04:43:45.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T09:58:43.000Z (almost 5 years ago)
- Last Synced: 2026-01-29T20:20:52.953Z (5 months ago)
- Language: Java
- Size: 1.05 MB
- Stars: 5
- Watchers: 0
- Forks: 4
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Livepeer Wowza Module
## How it works
### Start
* Input stream to be transcoded arrives in Wowza.
* LivepeerWowza creates a stream, sending a request to the API containing its bitrate ladder and transcoding configuration: `POST https://livepeer.live/api/stream`. Recieves back a Stream ID, e.g. `7abb1446-aca2-4220-b9f0-c7ac35cdcbee`.
### Wowza --> Livepeer loop
* LivepeerWowza requests a broadcaster from `https://livepeer.live/api/broadcaster`. This endpoint and others are running on Cloudflare Workers with geolocation logic to send them to the nearest Livepeer production cluster. It recieves back a broadcaster address, e.g. `https://aks-default-16253462-vmss000002.livepeer.live`.
* LivepeerWowza starts segmenting the input stream into MPEG-TS segments and uploading them to the broadcaster, e.g. `PUT https://aks-default-16253462-vmss000002.livepeer.live/live/7abb1446-aca2-4220-b9f0-c7ac35cdcbee/1.ts`.
* If there is a problem with the upload, LivepeerWowza requests another stream from `https://livepeer.live/api/broadcaster` and retries.
### Livepeer --> Wowza loop
* Based on the transcoding configuration, LivepeerWowza determines the URL of the HLS playlist for each transcoded rendition. Stream Files are created for each one, at URLs like `https://livepeer.live/stream/7abb1446-aca2-4220-b9f0-c7ac35cdcbee/P144p30fps16x9.m3u8`.
* These playlists are running on Cloudlfare Workers that are aware of all the broadcasters and amalgamate the `m3u8` playlists to include all available segments. It then serves out media playlists that include the full broadcaster URLs of the segments,such as:
```m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:232212
#EXT-X-TARGETDURATION:2
#EXTINF:1.667,
https://aks-default-16253462-vmss000002.livepeer.live/live/7abb1446-aca2-4220-b9f0-c7ac35cdcbee/1.ts
#EXTINF:1.666,
https://aks-default-16253462-vmss000001.livepeer.live/live/7abb1446-aca2-4220-b9f0-c7ac35cdcbee/2.ts
#EXTINF:2.000,
https://aks-default-16253462-vmss000000.livepeer.live/live/7abb1446-aca2-4220-b9f0-c7ac35cdcbee/3.ts
```
* (Note that the broadcaster servers can change from segment to segment, providing one coherent stream even if LivepeerWowza switches broadcasters.)
* These HLS streams are stitched back together and are accessible for any functions of Wowza.