# Customize m3u8 playlist contents

**URL:** <https://community.wowza.com/t/customize-m3u8-playlist-contents/37219>\
**Category:** Wowza Streaming Engine\
**Created:** [September 1, 2011, 8:51am UTC](https://community.wowza.com/t/customize-m3u8-playlist-contents/37219 "2011-09-01T08:51:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tome\_N](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@Tome\_N](https://community.wowza.com/u/Tome_N)\
**Post date:** [September 1, 2011, 8:51am UTC](https://community.wowza.com/t/customize-m3u8-playlist-contents/37219/1 "2011-09-01T08:51:56Z")

</div>

Hi,

I have few questions about the m3u8 playlist.

1. When/Where does wowza generates the contents of this file, for example is it happening on onHTTPCupertinoStreamingSessionCreate or…?

I have been trying to redirect the mobile devices with modyfication of this playlist. The contents of the files are this:

```auto
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=250000
[origin-server-ip]/DemoFMLE/myStream.sdp/playlist.m3u8?wowzasessionid=276697519

```

I modyfy it manualy like this:

```auto
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=250000
[edge-server-ip]/DemoFMLE/myStream.sdp/playlist.m3u8?wowzasessionid=276697519

```

and this way the client can connect to the edge server.

1. Is there a way (method) to edit the contents while it’s been generated?

Any idea how can I achive this.

Regards,

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [September 1, 2011, 3:44am UTC](https://community.wowza.com/t/customize-m3u8-playlist-contents/37219/2 "2011-09-01T03:44:56Z")

</div>

There is no way to modify this in Wowza Server 2. In Wowza Server 3 there will be support for redirecting a HTTP session.

Charlie

---

<div class="post-metadata">

**Author:** ![Jay\_Charles](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@Jay\_Charles](https://community.wowza.com/u/Jay_Charles)\
**Post date:** [September 1, 2011, 11:21am UTC](https://community.wowza.com/t/customize-m3u8-playlist-contents/37219/3 "2011-09-01T11:21:11Z")

</div>

What I do:

1. Remove all of the request filters from the cupertinoStreaming HTTPStreamer in conf/httpstreamers.xml

2. Create an HTTP provider and configure it to respond to any request with the filters previously used for the cupertinoStreaming HTTPStreamer.

3. Have the new HTTP Provider issue a 302 redirect to the target host/resource.

YMMV. Keep in mind that this method prevents the origin server from serving m3u8 resources on it’s own… this is only meant to be used when the origin Vhost is only acting as origin and not edge.

---

<div class="post-metadata">

**Author:** ![Tome\_N](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@Tome\_N](https://community.wowza.com/u/Tome_N)\
**Post date:** [September 1, 2011, 2:04pm UTC](https://community.wowza.com/t/customize-m3u8-playlist-contents/37219/4 "2011-09-01T14:04:35Z")

</div>

Thank you Charlie.

---

<div class="post-metadata">

**Author:** ![Tome\_N](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@Tome\_N](https://community.wowza.com/u/Tome_N)\
**Post date:** [September 8, 2011, 11:39pm UTC](https://community.wowza.com/t/customize-m3u8-playlist-contents/37219/5 "2011-09-08T23:39:47Z")

</div>

Thank you jay\_charles, this was exactly what I was looking for. 😃

I have previously created HTTP Provider but I was trying to generate the playlist files on my own (wowzasessionid gave me a problems).

I also tried to use response.sendRedirect, have been using with a servlets in Java but I could not get it to work here.

If someone uses this method use this for redirection:

```auto
resp.setResponseCode(301);
resp.setHeader( "Location", "[playlist_url]" );
resp.setHeader( "Connection", "close" );

```

Thanks again Jay.
