# Playlist stream source spec

**URL:** <https://community.wowza.com/t/playlist-stream-source-spec/36473>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [July 21, 2014, 5:36pm UTC](https://community.wowza.com/t/playlist-stream-source-spec/36473 "2014-07-21T17:36:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Janez\_Makovsek](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Janez\_Makovsek](https://community.wowza.com/u/Janez_Makovsek)\
**Post date:** [July 21, 2014, 5:36pm UTC](https://community.wowza.com/t/playlist-stream-source-spec/36473/1 "2014-07-21T17:36:16Z")

</div>

Hi,

How can I specify a playlist item like this:

playlist1.addItem(“rtmp://myhost:1935/live/myStream”, -2, -1);

??

It does not seem to work as is.

Thanks!

Atmapuri

---

<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:** [July 21, 2014, 6:15pm UTC](https://community.wowza.com/t/playlist-stream-source-spec/36473/2 "2014-07-21T18:15:41Z")

</div>

Use .stream file (or alias using the Alias addon) that contained that URL, then start it in StreamManager or Wowza Manager with MediaCaster type “liverepeater”. For example a file named mystream.stream in /content folder, with contents “rtmp://myhost:1935/live/myStream”

```auto
playlist1.addItem("mystream.stream", -2, -1);

```

mystream.stream has to be started in StreamManager or with the Wowza Manager or the MediaCaster API with MediaCaster type “liverepeater”

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:** [July 21, 2014, 7:33pm UTC](https://community.wowza.com/t/playlist-stream-source-spec/36473/3 "2014-07-21T19:33:14Z")

</div>

Take a look at [this guide](https://www.wowza.com/docs/how-to-use-stream-manager-in-wowza-media-server-3), Atmapuri, to start MediaCaster streams interactively. And you can do it in the Wowza Manager where .stream files are managed.

Or [this guide](https://www.wowza.com/docs/how-to-start-streams-at-server-startup)to start MediaCaster streams when Wowza starts up.

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:** [July 21, 2014, 8:06pm UTC](https://community.wowza.com/t/playlist-stream-source-spec/36473/4 "2014-07-21T20:06:09Z")

</div>

[This article](https://www.wowza.com/docs/how-to-mediacaster-api-to-start-native-rtp-and-mpeg-ts-streams) shows how to use the MediaCaster API

Richard

---

<div class="post-metadata">

**Author:** ![Janez\_Makovsek](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Janez\_Makovsek](https://community.wowza.com/u/Janez_Makovsek)\
**Post date:** [July 21, 2014, 7:33pm UTC](https://community.wowza.com/t/playlist-stream-source-spec/36473/5 "2014-07-21T19:33:49Z")

</div>

Dear Richard,

> mystream.stream has to be started … with the MediaCaster API with MediaCaster type “liverepeater”

How do I that?

What I would like to achieve, is that a restart of the application, will automatically also start the stream. Currently the entire server needs to be restarted to get the stream file going again.

Thanks!

Atmapuri

---

<div class="post-metadata">

**Author:** ![Janez\_Makovsek](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Janez\_Makovsek](https://community.wowza.com/u/Janez_Makovsek)\
**Post date:** [July 21, 2014, 9:02pm UTC](https://community.wowza.com/t/playlist-stream-source-spec/36473/6 "2014-07-21T21:02:00Z")

</div>

Thank you Richard for your assistance, but my question was how to do that in code not via IDE but via MediaCaster API. What code do I need to put in front of:

playlist1.addItem(“mystream.stream”, -2, -1);

??

Atmapuri
