# Publish and Unpublish a Live Stream

**URL:** <https://community.wowza.com/t/publish-and-unpublish-a-live-stream/38260>\
**Category:** Wowza Streaming Engine\
**Created:** [May 25, 2012, 2:08pm UTC](https://community.wowza.com/t/publish-and-unpublish-a-live-stream/38260 "2012-05-25T14:08:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipe\_Ardila](https://avatars.discourse-cdn.com/v4/letter/f/3be4f8/32.png) [@Felipe\_Ardila](https://community.wowza.com/u/Felipe_Ardila)\
**Post date:** [May 25, 2012, 2:08pm UTC](https://community.wowza.com/t/publish-and-unpublish-a-live-stream/38260/1 "2012-05-25T14:08:45Z")

</div>

Hello,

I am using FMLE to send a stream to wowza and I would like to publish and unpublish a live stream automatically. For example, I want to stream from 4:00 pm to 7:00 pm, but I have FMLE sending the stream all the time, so I want Wowza to stop publishing the stream at 7:01 and publish it again the next day at 4:00 pm.

How can I do this with Wowza?

---

<div class="post-metadata">

**Author:** ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)\
**Post date:** [May 27, 2012, 1:05pm UTC](https://community.wowza.com/t/publish-and-unpublish-a-live-stream/38260/2 "2012-05-27T13:05:02Z")

</div>

Hi Ardilom,

There are several ways. Here’s an easy way that has some added benefits:

Use the [streamschedule.smil example](https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher). With the following .smil:

```auto
<smil>
    <head>
    </head>
    <body>
        <stream name="Stream1"></stream>      
        <playlist name="pl1" playOnStream="Stream1" repeat="false" scheduled="2012-05-27 16:00:00">
            <video src="myStream" start="-2" length="-1"/>
        </playlist>
        <playlist name="pl2" playOnStream="Stream1" repeat="true" scheduled="2012-05-27 19:00:00">
            <video src="mp4:sample.mp4" start="0" length="-1"/>
        </playlist>
    </body>
</smil>

```

Analysis:

1. First you need to publish an FMLE RTMP stream to Wowza called myStream.

2. The stream class scheduler will start a stream called “Stream1” using “myStream” as the source at 4PM today.

3. At 7PM the stream will switch over to a VOD file on repeat.

Note, any subsequent connections to “Stream1” will play the VOD video loop. So, your short vod file could show a message like “Come back tomorrow at 4PM”. You’ll want to pick a different name for the FMLE stream and rely on no one knowing it. You can extend the .smil to do the same thing for a whole week/month etc…
