# Could anyboay know how to mix live and video on demand content by Stream class ?

**URL:** <https://community.wowza.com/t/could-anyboay-know-how-to-mix-live-and-video-on-demand-content-by-stream-class/36313>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [March 17, 2011, 4:27pm UTC](https://community.wowza.com/t/could-anyboay-know-how-to-mix-live-and-video-on-demand-content-by-stream-class/36313 "2011-03-17T16:27:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cool\_wind](https://avatars.discourse-cdn.com/v4/letter/c/eb8c5e/32.png) [@cool\_wind](https://community.wowza.com/u/cool_wind)\
**Post date:** [March 17, 2011, 4:27pm UTC](https://community.wowza.com/t/could-anyboay-know-how-to-mix-live-and-video-on-demand-content-by-stream-class/36313/1 "2011-03-17T16:27:50Z")

</div>

hi!

I want to use Stream class for mixing live and video on demand content ---- follow by [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)

so I created a file [install-dir]/content/streamschedule.smil,

p1 is a file(it worked) but p2(hdtv is a live stream published to the same wowza media server’s application **live** , it is not a file) and p3(same as p2) was not work

> Could anyboay know how to mix live and video on demand content by Stream class ?
> 
> Thanks very much!

---

<div class="post-metadata">

**Author:** ![Andrew\_Kennedy](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@Andrew\_Kennedy](https://community.wowza.com/u/Andrew_Kennedy)\
**Post date:** [March 17, 2011, 2:23am UTC](https://community.wowza.com/t/could-anyboay-know-how-to-mix-live-and-video-on-demand-content-by-stream-class/36313/2 "2011-03-17T02:23:52Z")

</div>

quickly looking at the above you have set each p item to repeat, so even if it starts it will probably just loop and never go to the next item, although given it is a schedule it _should_ move to the next item, so you would need to look deeper.

You should see some output in your access.log file relating to this configuration and it may say which file it is playing and any errors encountered.

Shamrock

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 17, 2011, 11:58am UTC](https://community.wowza.com/t/could-anyboay-know-how-to-mix-live-and-video-on-demand-content-by-stream-class/36313/3 "2011-03-17T11:58:50Z")

</div>

Also, the “start” value for a live stream must be “-2”

```auto
<video src="rtmp://xxx.xxx.xxx.xxx/live/_defins_/hdtv" start="-2" length="-1"/>

```

I took out the “mp4:” prefix, you don’t need it in this case.

I might work better to make on playlist.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 18, 2011, 1:05pm UTC](https://community.wowza.com/t/could-anyboay-know-how-to-mix-live-and-video-on-demand-content-by-stream-class/36313/4 "2011-03-18T13:05:45Z")

</div>

You have a typo. “_defins_” should be “_definst_”

For testing, make sure the schedule is in the past so it starts right away.

Richard

---

<div class="post-metadata">

**Author:** ![cool\_wind](https://avatars.discourse-cdn.com/v4/letter/c/eb8c5e/32.png) [@cool\_wind](https://community.wowza.com/u/cool_wind)\
**Post date:** [March 18, 2011, 10:31am UTC](https://community.wowza.com/t/could-anyboay-know-how-to-mix-live-and-video-on-demand-content-by-stream-class/36313/5 "2011-03-18T10:31:43Z")

</div>

Richard! Thanks for your reply. and thanks Shamrock!

I changed [install-dir]/content/streamschedule.smil as follow and restart wowoza media server, It works!

> 

but with follow config, it is not to work!!

>
