# Shoutcast stream with pre-roll in a server side playlist

**URL:** <https://community.wowza.com/t/shoutcast-stream-with-pre-roll-in-a-server-side-playlist/35577>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [February 21, 2011, 3:17pm UTC](https://community.wowza.com/t/shoutcast-stream-with-pre-roll-in-a-server-side-playlist/35577 "2011-02-21T15:17:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cady\_Maritz](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Cady\_Maritz](https://community.wowza.com/u/Cady_Maritz)\
**Post date:** [February 21, 2011, 3:17pm UTC](https://community.wowza.com/t/shoutcast-stream-with-pre-roll-in-a-server-side-playlist/35577/1 "2011-02-21T15:17:56Z")

</div>

Hi Guys

I have been scowering the forum and have as yet been unable to actually find a recent answer to the question. Can I implement a server side playlist that will play a pre-roll/once-off ad whenever a client connects and then once the pre-roll has finished playing it will roll over to the Shoutcast stream?

---

<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:** [February 21, 2011, 8:23pm UTC](https://community.wowza.com/t/shoutcast-stream-with-pre-roll-in-a-server-side-playlist/35577/2 "2011-02-21T20:23:23Z")

</div>

With those particular requirements, at present, there is not a way.

If the clients are all Flash, it can be done with cooperation of the Flash client using NetStream.onPlayStatus event handler and “Netstream.Play.Complete” notification to start playing the live stream when the pre-roll stream is done.

If the client is not Flash, there is not a way to do vod pre-roll for live stream at present. There is a work-around for iOS:

[https://www.wowza.com/docs/how-to-do-pre-roll-and-playlist-for-ios-a-client-side-work-around](https://www.wowza.com/docs/how-to-do-pre-roll-and-playlist-for-ios-a-client-side-work-around)

A similar work-around could be done in a Silverlight player. There is not a similar work-around for RTSP devices and players.

You can play intermittent advertising in a live stream using the Stream class. You can use the scheduler example:

[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)

Using this method, the stream can be played on any client and protocol that Wowza supports. But the ad will be intermittent, like tv, not a pre-roll, so it does not meet your requirement.

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:** [September 4, 2012, 11:52am UTC](https://community.wowza.com/t/shoutcast-stream-with-pre-roll-in-a-server-side-playlist/35577/3 "2012-09-04T11:52:07Z")

</div>

Lovato,

No, it’s the same. You could do this with a Flash RTMP client involved, but not server-side that would work across clients.

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:** [August 28, 2013, 5:12pm UTC](https://community.wowza.com/t/shoutcast-stream-with-pre-roll-in-a-server-side-playlist/35577/4 "2013-08-28T17:12:43Z")

</div>

Lovato,

Sorry, I don’t have an update on this. It is still a planned feature, but I don’t have a time frame.

Richard

---

<div class="post-metadata">

**Author:** ![Marco\_Lovato](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@Marco\_Lovato](https://community.wowza.com/u/Marco_Lovato)\
**Post date:** [September 3, 2012, 5:27pm UTC](https://community.wowza.com/t/shoutcast-stream-with-pre-roll-in-a-server-side-playlist/35577/5 "2012-09-03T17:27:51Z")

</div>

Hi Richard,

I would like to know, now 1 year an a half after your post, if there is a way to do that.

We need to pass to Wowza, dynamically, the VOD filename, and we need Wowza to, at server side, deliver first the VOD, and then the live stream, to devices without a richplayer. I understood the apple workaroud, but this needs to be managed server side entirelly.

Is it possible nowadays with Wowza 3.1.2?

Best

Lovato

---

<div class="post-metadata">

**Author:** ![Marco\_Lovato](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@Marco\_Lovato](https://community.wowza.com/u/Marco_Lovato)\
**Post date:** [August 28, 2013, 1:55pm UTC](https://community.wowza.com/t/shoutcast-stream-with-pre-roll-in-a-server-side-playlist/35577/6 "2013-08-28T13:55:38Z")

</div>

Hi Richard.

16 months ahead from last try, do you have any information about this?

Is this in Wowza plans yet? I heard last year that it was, but without deadlines.

We still need that feature 🙂

Best

Lovato

---

<div class="post-metadata">

**Author:** ![Igor\_Bat](https://avatars.discourse-cdn.com/v4/letter/i/59ef9b/32.png) [@Igor\_Bat](https://community.wowza.com/u/Igor_Bat)\
**Post date:** [June 26, 2017, 8:46pm UTC](https://community.wowza.com/t/shoutcast-stream-with-pre-roll-in-a-server-side-playlist/35577/7 "2017-06-26T20:46:00Z")

</div>

Now it’s 2017.  
Already possible pre-roll?

---

<div class="post-metadata">

**Author:** ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)\
**Post date:** [July 1, 2017, 1:28am UTC](https://community.wowza.com/t/shoutcast-stream-with-pre-roll-in-a-server-side-playlist/35577/8 "2017-07-01T01:28:25Z")

</div>

Hi Igor,

Do look into our [LoopUntilLive](https://www.wowza.com/docs/select?_uri=/docs/how-to-loop-a-pre-roll-until-a-live-stream-starts-loopuntillive&__s=a6ed0119ae3be5668a1503c03490d3ec-881)module, which uses the Stream class in order to playback a preroll VOD stream and then switch to the live source once the live source is available.

Michelle
