I am working with an API at apiexamplecom/get-links that returns a list of HLS links, each valid for 12 hours. These links serve as our Electronic Program Guide (EPG) for scheduled content. My goal is to achieve the following workflow entirely within Wowza Streaming Engine:
Playlist Creation
Dynamically create a playlist based on the EPG links for the current 12-hour window.
Automatic Transition
Once the 12-hour period ends, automatically fetch the next set of EPG links for the subsequent 12-hour window.
Continuous Playback
Seamlessly transition to the new playlist so that programs continue playing without interruption.
Currently, I run a cron job on a separate server every 12 hours to fetch and update the playlist, then use FFmpeg to push the stream to Wowza via an RTMP link. I want to eliminate the external server and cron job so that Wowza handles everything on its own—sending requests to the API, updating the playlist automatically, and maintaining the live stream.
Below is an example of the JSON response from the API, which provides the HLS links to be played:
[
link * m3u8,
link2 * m3u8,
link3 * m3u8,
]
Requirements:
- The playlist must be updated every 12 hours based on the API data.
- Smooth playback transitions are required so that viewers do not experience any downtime between playlist updates.
- All fetching, scheduling, and streaming processes should be handled directly by Wowza, without an external cron job or additional server-side scripts.