# Streampublisher and M3U8s

**URL:** <https://community.wowza.com/t/streampublisher-and-m3u8s/94245>\
**Category:** Wowza Streaming Engine\
**Created:** [November 30, 2021, 9:17pm UTC](https://community.wowza.com/t/streampublisher-and-m3u8s/94245 "2021-11-30T21:17:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_Hudgins1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/stephen_hudgins1/32/982_2.png) [@Stephen\_Hudgins1](https://community.wowza.com/u/Stephen_Hudgins1)\
**Post date:** [November 30, 2021, 9:17pm UTC](https://community.wowza.com/t/streampublisher-and-m3u8s/94245/1 "2021-11-30T21:17:08Z")

</div>

Hello!

I’m trying to create a 24/7 livestream where Wowza can passthrough a livestream from another source on a schedule, and loop an mp4 while the show is “offline”.

This is pretty easy just dealing with .mp4 files, but I’m trying to get a livestream shoved in the middle.

---

<div class="post-metadata">

**Author:** ![Connessione](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Connessione](https://community.wowza.com/u/Connessione)\
**Post date:** [December 1, 2021, 6:11pm UTC](https://community.wowza.com/t/streampublisher-and-m3u8s/94245/2 "2021-12-01T18:11:35Z")

</div>

What you are trying can be achieved in two or more ways.

1. You can publish static content as live stream. So basically whenever you stop the live stream you switch to publishing the static content as live stream with same stream name.

2. You can use a player that can detect end of the live stream and show a mp4 to the client till it gets notified of stream publish again. Even if the stream does not unpublish you can still make the player show other content on demand or at a certain time.

I believe what you are trying to do is like putting ad rolls in between of a live program or like a video roll when the stream is not available.

---

<div class="post-metadata">

**Author:** ![Stephen\_Hudgins1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/stephen_hudgins1/32/982_2.png) [@Stephen\_Hudgins1](https://community.wowza.com/u/Stephen_Hudgins1)\
**Post date:** [December 7, 2021, 9:38pm UTC](https://community.wowza.com/t/streampublisher-and-m3u8s/94245/3 "2021-12-07T21:38:16Z")

</div>

Would that be as easy as adding a video source to a playlist in the SMIL file? Something like:

```
 <video src="mp4:video1.mp4" start="0" length="-1"/>
 <video src="m3u8:video2.m3u8" start="0" length="-1"/>
```

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [December 7, 2021, 10:10pm UTC](https://community.wowza.com/t/streampublisher-and-m3u8s/94245/4 "2021-12-07T22:10:06Z")

</div>

Yes, that’s exactly how it works with our StreamPublisher Module that includes Loop Until Live. You add a SMIL file and when an encoder disconnects, it automatically switches to the mp4 and will loop until a live encoder connects. Some people just use it to play one mp4 as live over and over, others have it switch from mp4 to mp4 based on the order in the SMIL file. Point being you can use it with live and mp4s or all mp4s.

Here is the doc for you:

> **[Loop a pre-roll until a live stream starts](https://www.wowza.com/docs/how-to-loop-a-pre-roll-until-a-live-stream-starts-loopuntillive)**
>
> Use the LoopUntilLive Wowza Streaming Engine Java module to configure a pre-roll video to play before a live stream starts and after it ends.

And also I made a complete tutorial on how to set up stream publisher and the SMIL file:

[![](https://us1.discourse-cdn.com/flex002/uploads/wowza1/original/1X/017205c19b562d80df01f2516fac2f65f1ca19b7.jpeg "Live, But Not Live: How to Publish a Pre-Recorded Video as a Live Stream") ](https://www.youtube.com/watch?v=8MjcdtnMuo8&t=4s)
  
Here is another tutorial that show you how to use to build an mp4 tv station on a schedule!
[![](https://us1.discourse-cdn.com/flex002/uploads/wowza1/original/1X/eeaaea30c166486ffca7fbfffa92db5b44c59b60.jpeg "How to Loop a Video Playlist Until Your Live Stream Starts") ](https://www.youtube.com/watch?v=b_sdgZ1gUQ0)
