# Live Streaming, Loop Clip until Live

**URL:** <https://community.wowza.com/t/live-streaming-loop-clip-until-live/44313>\
**Category:** Wowza Streaming Engine\
**Created:** [November 26, 2014, 8:33am UTC](https://community.wowza.com/t/live-streaming-loop-clip-until-live/44313 "2014-11-26T08:33:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron\_Rapp](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@Aaron\_Rapp](https://community.wowza.com/u/Aaron_Rapp)\
**Post date:** [November 26, 2014, 8:33am UTC](https://community.wowza.com/t/live-streaming-loop-clip-until-live/44313/1 "2014-11-26T08:33:34Z")

</div>

Hi All,

I’m a server admin at CSN in Las Vegas, and I inherited the Wowza project from a previous admin who left. Unfortunately, I am not versed in Java and I have light HTML skills.

Luckily, I’ve been able to get the system to work…kinda, but not the likings of the higher-ups. There are a couple things they’re still looking for and, for two weeks, I haven’t been able to get them to work.

1. Loop until Live - Right now, the live stream will play when there is one. When there isn’t, it shows an error for not being able to load the m3u8. I’m pretty positive I have all the playback loop stuff setup correctly. I see my “csnloop” showing up in my content folder (which is a problem because I think my automatic live recording is also recording the “loop”), but it’s not showing up on the site. Here is the code.

```auto
<center>
<div id="player"><a href="rtsp://streaming.csn.edu:1935/live/csn">View RTSP stream</a></div>
<script type='text/javascript'>
                  jwplayer('player').setup({ 
						autostart: 'true',
						file: 'http://streaming.csn.edu:1935/live/smil:csn.smil/playlist.m3u8',
                                                height: 600, 
                                                width: '100%',
						title: 'CSN Live Streaming',
                                                fallback: 'false'
					});
                </script>
</center> 

```

Does anyone know why I wouldn’t see the loop playing when there isn’t anything streaming to the http smil file? Also…anyone know how to tell this to not record the loop stream?

1. Is my div id correct for android streaming? I can’t seem to get android to work on JWPlayer, so I’ve reverted to just using the fallback. I’ve taken the fallback out of my code for the time being because the code is failing on the loop.

I appreciate any help. Our Regents meeting is coming up next week so there will be a lot of eyes on it.

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [November 26, 2014, 11:25am UTC](https://community.wowza.com/t/live-streaming-loop-clip-until-live/44313/2 "2014-11-26T11:25:16Z")

</div>

Hello there and welcome to the Wowza support forum.

Assuming you have everything configured correctly and using the default settings shown in the guide, the SMIL file is used by the Stream Publisher to create a single output stream called **Stream1**. It will play sample.mp4 in a loop. When a live source stream ( **myStream** ) is published, the output stream will switch to the live source.

So you should use the following URL if using default settings:

```auto
http://streaming.csn.edu:1935/live/Stream1/playlist.m3u8

```

If you have “record all incoming streams” checked, then the looping file will be recorded. The only way to avoid that would be to manually start the recording. (Or through custom Java code)

And yes, the fallback code looks to be correct.

You can look over the guide and double check that everything is configured correctly. Or you may enjoy the process of starting a new Application and configuring it from scratch:

[How to loop a pre-roll until a live stream starts (ModuleLoopUntilLive)](https://www.wowza.com/docs/how-to-loop-a-pre-roll-until-a-live-stream-starts-loopuntillive)

Guide for recording Live streams (2 options):

[How to record live streams (Wowza Streaming Engine)](https://www.wowza.com/docs/how-to-record-live-streams-wowza-streaming-engine%28Wowza-Streaming-Engine%29)

[How to record live streams (HTTPLiveStreamRecord)](https://www.wowza.com/docs/how-to-record-live-streams-httplivestreamrecord%28HTTPLiveStreamRecord%29)

I hope this helps you along your way.

Kind regards,

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [November 26, 2014, 12:04pm UTC](https://community.wowza.com/t/live-streaming-loop-clip-until-live/44313/3 "2014-11-26T12:04:06Z")

</div>

Okay, so you will leave the .smil file as is.

The property **loopUntilLiveSourceStreams** by default is set to **myStream**. Double check your Application settings to make sure this is set to “ **CNS** ” if that is what the name of the Live stream is going to be.

Then the property **loopUntilLiveOutputStreams** which by default is set to **Stream1**. Again, double check that you have this set to “ **csnloop** ”

With these settings in place, your URL should be:

```auto
http://streaming.csn.edu:1935/live/csnloop/playlist.m3u8

```

Kind regards,

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [November 26, 2014, 1:13pm UTC](https://community.wowza.com/t/live-streaming-loop-clip-until-live/44313/4 "2014-11-26T13:13:44Z")

</div>

Thank you Aaron. I am glad we were able to get this working for you.

Adaptive (dynamic) bitrate streaming is not supported when using loop until live. Out of the box at least. It will take quite a bit of custom work.

You can get a sense of whats involved by taking a look at the conversation in the comments of the article (page 4):

[See roger\_l’s comments here](https://www.wowza.com/docs/how-to-loop-a-pre-roll-until-a-live-stream-starts-loopuntillive&page=4)

You may decide to hire this step out. In which case you can post a request to the [find a consultant forum](http://community.wowza.com/c/-/7).

Thanks again.

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [November 26, 2014, 1:32pm UTC](https://community.wowza.com/t/live-streaming-loop-clip-until-live/44313/5 "2014-11-26T13:32:51Z")

</div>

You are most welcome Aaron. Let us know if you need anything else. Maybe start a new thread if the topic changes to drastically.

Best,

Salvadore

---

<div class="post-metadata">

**Author:** ![Aaron\_Rapp](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@Aaron\_Rapp](https://community.wowza.com/u/Aaron_Rapp)\
**Post date:** [November 26, 2014, 9:52am UTC](https://community.wowza.com/t/live-streaming-loop-clip-until-live/44313/6 "2014-11-26T09:52:14Z")

</div>

Ok…I understand most of what you’re saying. I’m only confused as to where to put that code you’re talking about.

My streaming site is using the default stream name for our purpose which is “CSN”, as seen in the code above.

Are you saying I need to put “csnloop” in there instead of CSN?

Also…here is a copy of the loop smil file.

```auto
<smil>
    <head>
    </head>
    <body>
        <stream name="csnloop"></stream>
        
        <playlist name="pl1" playOnStream="csnloop" repeat="true" scheduled="2014-11-21 11:00:00">
            <video src="mp4:csn_720p_20.mp4" start="0" length="200000"/>
        </playlist>
    </body>
</smil>

```

---

<div class="post-metadata">

**Author:** ![Aaron\_Rapp](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@Aaron\_Rapp](https://community.wowza.com/u/Aaron_Rapp)\
**Post date:** [November 26, 2014, 10:40am UTC](https://community.wowza.com/t/live-streaming-loop-clip-until-live/44313/7 "2014-11-26T10:40:05Z")

</div>

You are a genius! It works great.

Now…one last question. The live feed comes through, but does not come up with the dynamic bitrate stream anymore. Is there anyway to bring that back?

Aaron

---

<div class="post-metadata">

**Author:** ![Aaron\_Rapp](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@Aaron\_Rapp](https://community.wowza.com/u/Aaron_Rapp)\
**Post date:** [November 26, 2014, 11:21am UTC](https://community.wowza.com/t/live-streaming-loop-clip-until-live/44313/8 "2014-11-26T11:21:26Z")

</div>

Hi Salvadore,

Thanks for the reply.

I think we’ll stick with what we have now. I suddenly have no desire to have the dynamic bit rate streaming working again…lol.

I appreciate all your help. I’m just working on Android streaming right now. I’m seeing if I can get that link working.

Thanks for all your help!

Aaron

---

<div class="post-metadata">

**Author:** ![J.C\_Utter](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@J.C\_Utter](https://community.wowza.com/u/J.C_Utter)\
**Post date:** [August 30, 2017, 1:11pm UTC](https://community.wowza.com/t/live-streaming-loop-clip-until-live/44313/9 "2017-08-30T13:11:21Z")

</div>

Wow…I just spent a lot of time trying to get this to work only to find out that adaptive bit rate streaming won’t work and my filler loop will be recorded not only when I am recording the live stream, but also by the nDVR. I wonder why these limitations aren’t noted in the setup examples…such limitations should be explained before customers have wasted days to find out.
