Loop a Pre-Roll Until a Live Stream Starts


After weeks of preparation, it’s finally time to live stream your event. You have triple-checked all of the cameras, successfully staged a rehearsal, and feel confident that everything is in place and ready to go. The live stream begins, and you feel exhilarated to see nearly 5,000 viewers connected — with more joining each minute. Suddenly, there’s an unexpected fluctuation in the network and your stream disconnects. Your viewers see nothing but an empty, black screen.

What could you have done differently to maintain a connection with all those viewers until resuming the live stream? Looping pre-roll content is a great way to keep viewers engaged in case of any hiccups. 

Wowza’s Loop Until Live module (the ModuleLoopUntilLive application) allows you to stream any mp4 as a filler video in a constant loop until an encoder connects to Wowza Streaming Engine and a live stream begins.  Once the live stream connects, the mp4 video will stop and seamlessly switch to the live video source. If for some reason your live stream should disconnect during a broadcast, the Loop Until Live module will switch viewers back to the looping mp4 video. This functionality prevents viewers from staring at a black screen should something go wrong and keeps them connected until the encoder reconnects and the live stream resumes.

It is also possible to use this module to endlessly loop one or more mp4 files as “live” in a playlist — without ever actually connecting an encoder to a live video source. In fact, the Loop Until Live module is used by many of our customers for a wide variety of reasons and use cases. It can be a tremendous resource in your streaming application.

Let’s explore a few examples of how the Loop Until Live module can be used.


Build Anticipation for Your Live Event

Because your looping mp4 file will appear as live, you will draw more attention than an on-demand stream. In fact, videos with that little red circle showing it as “live” tend to receive 10 times better engagement than pre-recorded video. It’s well known that sites like Facebook Live and You Tube Live have algorithms in place that favor live video over VOD. Since your looping mp4 will appear live, you can leverage the Loop Until Live module to promote your upcoming event with some pre-roll video that serves as an exciting countdown to your live event. This helps create greater interest.


Insert a Video Advertisement

If you are going to be selling a product or service during your scheduled live event, you can insert a filler mp4 file as a video advertisement and begin promoting for any amount of time before your live event. You can get as creative as you want with your video to capture interest in what you’re going to be offering and even have links in the pre-roll with pre-purchase options. The length and style of this looping video is completely up to you. Keep in mind that once the live stream begins, it will switch from the mp4 over to the live source. It’s equally important to remember that when the live stream disconnects, it will return to the beginning of the that same mp4 — so calculate the length accordingly. Because viewers scrolling social media sites will be drawn to a live advertisement that is actually pre-recorded, you’ll generate more ad revenue. Studies consistently show that a live video advertisement creates a stronger emotional reaction in viewers resulting in a greater feeling of trust in making a purchase.


Keep an MP4 Stream Running Indefinitely as Live

The Loop Until Live module is part of Wowza’s StreamPublisher, which allows you to create a scheduled playlist. This means that you have the option to loop your mp4 playlist without ever actually connecting an encoder to Wowza Streaming Engine. This will essentially keep your mp4 playing indefinitely as a live stream and will continuously loop back to the beginning when it’s complete. It’s possible to have more than one mp4 asset in your playlist so that the Stream Publisher begins playing the next mp4 once the previous one ends.  For example, if you have four videos in the playlist, you can keep that entire pre-recorded playlist looping as live over and over — with no need for you to manually restart it. There are use cases where this is implemented in a 24 hour “live streaming channel,” which, in fact, is simply looping pre-recorded videos in a playlist. 

While there are a variety of ways you can use the Loop Until Live module, the most common reason for using it is to insert pre-roll leading up to the event and to keep the server connected to the clients should an encoder disconnect, maintaining the connection with your viewers. Because is falls back to the mp4 stream until the encoder reconnects, you won’t need to manually restart the application and reconnect to the clients. The connection remains constant until the live stream resumes.  

In the video tutorial above, Tim Dougherty and Justin Miller walk through how to set up the Loop Until Live module in Wowza Streaming Engine.


Search Wowza Resources



Follow Us


About Rose Power

Rose Power is the developer community manager for Wowza Media Systems. Passionate about building relationships with the dev community, Rose strives to deliver quality resources for a positive user experience built on trust. When not working, she can be found playing the ukulele around a fire or hiking the mountains of Colorado with her pup.