Wowza Community

Publish and Unpublish a Live Stream

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?

Hi Ardilom,

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

Use the streamschedule.smil example. With the following .smil:

<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…