# play method not called for RTSP

**URL:** https://community.wowza.com/t/play-method-not-called-for-rtsp/41966
**Category:** Wowza Developer Dojo
**Tags:** wowza-streaming-server-java-api
**Created:** [February 13, 2014, 8:27am UTC](https://community.wowza.com/t/play-method-not-called-for-rtsp/41966 "2014-02-13T08:27:14Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Sebastien\_Paumier](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Sebastien\_Paumier](https://community.wowza.com/u/Sebastien_Paumier)
#### Post date: [February 13, 2014, 8:27am UTC](https://community.wowza.com/t/play-method-not-called-for-rtsp/41966/1 "2014-02-13T08:27:14Z")

</div>

Hi,

I am working with Wowza 3.6.4. I have made a module to intercept the requests like demonstrated in the javadoc of ModuleCore, the intent being to rewrite the URL. It works fine when I do a RTMP query, but when I query the same video with RTSP, the play method is not invoked.

How is it possible to have this behaviour (URL rewriting) for RTSP ?

---

<div class="post-metadata">

### Author: ![Andrew\_Kennedy1](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Andrew\_Kennedy1](https://community.wowza.com/u/Andrew_Kennedy1)
#### Post date: [February 13, 2014, 2:28am UTC](https://community.wowza.com/t/play-method-not-called-for-rtsp/41966/2 "2014-02-13T02:28:08Z")

</div>

Hi,

There are different hooks for rtmp and rtsp

for rtsp you could use

onRTSPSessionCreate

or you could also use the alias notifier of which there is a tutorial here

[https://www.wowza.com/docs/how-to-use-the-imediastreamnamealiasprovider2-interface](https://www.wowza.com/docs/how-to-use-the-imediastreamnamealiasprovider2-interface)

Andrew.

---

<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 13, 2014, 1:07pm UTC](https://community.wowza.com/t/play-method-not-called-for-rtsp/41966/3 "2014-02-13T13:07:47Z")

</div>

[onHTTPSessionCreate](https://www.wowza.com/docs/how-to-control-access-to-http-streams-cupertinostreaming-sanjosestreaming-smoothstreaming-mpegdashstreaming%28cupertinostreaming-smoothstreaming-sanjosestreaming-mpegdashstreaming%29) handles all the HTTP streaming types.

Richard

---

<div class="post-metadata">

### Author: ![Andrew\_Kennedy1](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Andrew\_Kennedy1](https://community.wowza.com/u/Andrew_Kennedy1)
#### Post date: [February 17, 2014, 2:08am UTC](https://community.wowza.com/t/play-method-not-called-for-rtsp/41966/4 "2014-02-17T02:08:32Z")

</div>

Hi,

It is not possible to modify the playlists generated by Wowza at this time. If you can provide the kind of modifications you are looking at these can be passed to our feature request list. This does not mean they will be added, but will considered.

You can intercept the calls for each segment request with

IVHostHTTPStreamerRequestValidator

You will need to dig around on how to implement it. It is a Vhost hook so

vhost.setHTTPStreamerRequestValidator() is required.

Andrew.

---

<div class="post-metadata">

### Author: ![Sebastien\_Paumier](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Sebastien\_Paumier](https://community.wowza.com/u/Sebastien_Paumier)
#### Post date: [February 13, 2014, 12:13pm UTC](https://community.wowza.com/t/play-method-not-called-for-rtsp/41966/5 "2014-02-13T12:13:51Z")

</div>

Thanks! Would the alias notifier also works for other types of streaming (HDS, HLS, smoothstreaming and MPEG-DASH) ?

---

<div class="post-metadata">

### Author: ![Sebastien\_Paumier](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Sebastien\_Paumier](https://community.wowza.com/u/Sebastien_Paumier)
#### Post date: [February 15, 2014, 9:49am UTC](https://community.wowza.com/t/play-method-not-called-for-rtsp/41966/6 "2014-02-15T09:49:05Z")

</div>

Thank you very much.

---

<div class="post-metadata">

### Author: ![Sebastien\_Paumier](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Sebastien\_Paumier](https://community.wowza.com/u/Sebastien_Paumier)
#### Post date: [February 17, 2014, 7:22am UTC](https://community.wowza.com/t/play-method-not-called-for-rtsp/41966/7 "2014-02-17T07:22:47Z")

</div>

For HLS (and more generally for HTTP adaptative streaming), it seems that onHTTPSessionCreate is invoked only when a playlist is queried, but not when a segment is queried. Is it possible to hook those queries as well ? In addition to that, is it possible to modifiy the playlists auto-generated by Wowza to modify them before they are to the end-user ?

---

<div class="post-metadata">

### Author: ![Sebastien\_Paumier](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Sebastien\_Paumier](https://community.wowza.com/u/Sebastien_Paumier)
#### Post date: [February 17, 2014, 3:49pm UTC](https://community.wowza.com/t/play-method-not-called-for-rtsp/41966/8 "2014-02-17T15:49:26Z")

</div>

One of my goals is to keep track of what had been downloaded. For HLS, Wowza seems to generate a new playlist name for every query to the original url like [http://127.0.0.1:1935/vod/_definst_/mp4:foo.mp4/playlist.m3u8](http://127.0.0.1:1935/vod/_definst_/mp4:foo.mp4/playlist.m3u8). The segment names then matches the name of the playlist. So it seems that if I can get the content of the playlist served to the user, I would be able to associate each segment query to the corresponding query to the original url.

Is it possible to access to the playlist content that will be served in onHTTPSessionCreate ?

Is it possible to access to the duration of a segment for its path in IVHostHTTPStreamerRequestValidator.validateHTTPStreamerRequest ?
