# live video in schedule streaming with live source

**URL:** <https://community.wowza.com/t/live-video-in-schedule-streaming-with-live-source/33713>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [March 6, 2015, 9:57am UTC](https://community.wowza.com/t/live-video-in-schedule-streaming-with-live-source/33713 "2015-03-06T09:57:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stuart\_Downton](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@Stuart\_Downton](https://community.wowza.com/u/Stuart_Downton)\
**Post date:** [March 6, 2015, 9:57am UTC](https://community.wowza.com/t/live-video-in-schedule-streaming-with-live-source/33713/1 "2015-03-06T09:57:56Z")

</div>

Hi

I have been working on schedule streaming via this guide:

[https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher](https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher)

I have it working for ondemand files without any issues. I can’t however get it to work with live streams.

How do I format the smil to add a live stream? I have just tried adding the application name and rtmp://localhost/ucbtv1/ucbtv1 but this don’t seem to work.

My smil is currently:

Im assuming the live source needs to be on the same box.

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![Zoran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/zoran/32/385_2.png) [@Zoran](https://community.wowza.com/u/Zoran)\
**Post date:** [March 6, 2015, 12:28pm UTC](https://community.wowza.com/t/live-video-in-schedule-streaming-with-live-source/33713/2 "2015-03-06T12:28:32Z")

</div>

Hi,

You will need to make sure that this particular live stream is already published on this particular application. Assuming that your application is called “ucbtv1” and the live stream published to this application is called “myStream”, then your streamschedule.smil file would look something like this:

```auto
<smil>
<head>
</head>
<body>
<stream name="lftctv"></stream>
<playlist name="pl1" playOnStream="lftctv" repeat="true" scheduled="2011-02-25 09:00:00">
<video src="mp4:MOS_HouseAnthemsv16.mp4" start="0" length="10"/>
<video src="mp4:MoS_VIP_FLAT_Fire_preview.mp4" start="0" length="10"/>
<video src="mp4:MOS_30s_PRORES.mp4" start="0" length="10"/>
</playlist>
<playlist name="pl2" playOnStream="lftctv" repeat="true" scheduled="2011-02-25 09:00:30">
<video src="mp4:myStream" start="-2" length="300"/>
</playlist>
</body>
</smil>

```

Setting the start="-2" parameter would mark this stream as a live stream. Having this in place, at the scheduled time, the live stream will play back for 300 seconds, and then move to the next playlist item.

You can also have this:

```auto
<smil>
<head>
</head>
<body>
<stream name="lftctv"></stream>
<playlist name="pl1" playOnStream="lftctv" repeat="true" scheduled="2011-02-25 09:00:00">
<video src="mp4:MOS_HouseAnthemsv16.mp4" start="0" length="10"/>
<video src="mp4:MoS_VIP_FLAT_Fire_preview.mp4" start="0" length="10"/>
<video src="mp4:MOS_30s_PRORES.mp4" start="0" length="10"/>
<video src="mp4:myStream" start="-2" length="300"/>
</playlist>
</body>
</smil>

```

This would play back the 3 video files for 10 seconds each, and them switch to the live stream for another 300 seconds. Since the playlist is set to “repeat”, after the 300 seconds of live, the playlist will start from the beginning.

Zoran

---

<div class="post-metadata">

**Author:** ![Stuart\_Downton](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@Stuart\_Downton](https://community.wowza.com/u/Stuart_Downton)\
**Post date:** [March 6, 2015, 10:58am UTC](https://community.wowza.com/t/live-video-in-schedule-streaming-with-live-source/33713/3 "2015-03-06T10:58:05Z")

</div>

> Hi,
> 
> You will need to make sure that this particular live stream is already published on this particular application. Assuming that your application is called “ucbtv1” and the live stream published to this application is called “myStream”, then your streamschedule.smil file would look something like this:
> 
> ```auto
> <smil>
> <head>
> </head>
> <body>
> <stream name="lftctv"></stream>
> <playlist name="pl1" playOnStream="lftctv" repeat="true" scheduled="2011-02-25 09:00:00">
> <video src="mp4:MOS_HouseAnthemsv16.mp4" start="0" length="10"/>
> <video src="mp4:MoS_VIP_FLAT_Fire_preview.mp4" start="0" length="10"/>
> <video src="mp4:MOS_30s_PRORES.mp4" start="0" length="10"/>
> </playlist>
> <playlist name="pl2" playOnStream="lftctv" repeat="true" scheduled="2011-02-25 09:00:30">
> <video src="mp4:myStream" start="-2" length="300"/>
> </playlist>
> </body>
> </smil>
> 
> ```
> 
> Setting the start=“-2” parameter would mark this stream as a live stream. Having this in place, at the scheduled time, the live stream will play back for 300 seconds, and then move to the next playlist item.
> 
> You can also have this:
> 
> ```auto
> <smil>
> <head>
> </head>
> <body>
> <stream name="lftctv"></stream>
> <playlist name="pl1" playOnStream="lftctv" repeat="true" scheduled="2011-02-25 09:00:00">
> <video src="mp4:MOS_HouseAnthemsv16.mp4" start="0" length="10"/>
> <video src="mp4:MoS_VIP_FLAT_Fire_preview.mp4" start="0" length="10"/>
> <video src="mp4:MOS_30s_PRORES.mp4" start="0" length="10"/>
> <video src="mp4:myStream" start="-2" length="300"/>
> </playlist>
> </body>
> </smil>
> 
> ```
> 
> This would play back the 3 video files for 10 seconds each, and them switch to the live stream for another 300 seconds. Since the playlist is set to “repeat”, after the 300 seconds of live, the playlist will start from the beginning.
> 
> Zoran

Thank you for the quick response. The ucbtv1 is a seperate application on the server which is a live edge application pulling from our ingest. Does that mean you need to send a feed directly to the application under a different name? For example lftc/mystream instead of pointing to another application?

The application I have the playlist working on is called lftc.

---

<div class="post-metadata">

**Author:** ![Zoran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/zoran/32/385_2.png) [@Zoran](https://community.wowza.com/u/Zoran)\
**Post date:** [March 6, 2015, 7:45pm UTC](https://community.wowza.com/t/live-video-in-schedule-streaming-with-live-source/33713/4 "2015-03-06T19:45:56Z")

</div>

Yes, the stream needs to be published to the application that is running the scheduler.

You can either use the “[ModuleDuplicateStreams](https://www.wowza.com/docs/how-to-duplicate-streams-to-another-application-instance-moduleduplicatestreams%28ModuleDuplicateStreams%29)” to duplicate your stream on the scheduler application, or use a [.stream file](https://www.wowza.com/docs/how-to-create-and-use-stream-files-in-wowza-streaming-engine-manager) to publish the same live stream on the “lftc” application as well.

Zoran
