How to Automate a 12-Hour EPG Workflow with Dynamic HLS Links in Wowza Streaming Engine

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:

  1. The playlist must be updated every 12 hours based on the API data.
  2. Smooth playback transitions are required so that viewers do not experience any downtime between playlist updates.
  3. All fetching, scheduling, and streaming processes should be handled directly by Wowza, without an external cron job or additional server-side scripts.

Hello Abdallah, Thank you for reaching out to Wowza community forum. As we discussed over the support ticket this workflow is possible using a custom configuration/workflow. You could use the Server Side Stream API where you can create a Server Side Stream for each output and append each source stream in turn. You can use multiple mp4 files in a server side stream. You could either do it on your own or our professional services team could help you out to configure the workflow.

If you have other questions or issues that need our attention, you may open a new support request at any time through the Wowza Support portal at https://www.wowza.com/support/open-ticket.

Thank you.

Hi Abdallah; this is definitely doable. I see that you posted a similar question earlier here in the forums and there were a few answers there as well as a link to some sample code.

Out of my head, you can create a Playlist that contains one or more PlaylistItems; and you can load this playlist onto a Stream. You could create a new playlist every 12 hours, or even after every item, and load the new playlist onto the Stream (therewith discarding the old playlist). Alternatively you could maybe (I’d have to check that) create a playlist once and keep adding items to it every 12 hours (or more often)

Ping me if you need further help (I’ve developed with Wowza for almost 20 years and written 100s of plug-ins)