# rtsp redirect

**URL:** https://community.wowza.com/t/rtsp-redirect/34910
**Category:** Wowza Streaming Engine
**Created:** [August 5, 2010, 3:51pm UTC](https://community.wowza.com/t/rtsp-redirect/34910 "2010-08-05T15:51:11Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Florian\_Iragne](https://avatars.discourse-cdn.com/v4/letter/f/779978/32.png) [@Florian\_Iragne](https://community.wowza.com/u/Florian_Iragne)
#### Post date: [August 5, 2010, 3:51pm UTC](https://community.wowza.com/t/rtsp-redirect/34910/1 "2010-08-05T15:51:11Z")

</div>

hi,

is there any way, in a custom module to issue the rtsp REDIRECT instruction?

i’ve seen the loadbalancing module, but it works only for rtmp if i understand correctly

thanks

---

<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 5, 2010, 2:56pm UTC](https://community.wowza.com/t/rtsp-redirect/34910/2 "2010-08-05T14:56:08Z")

</div>

I don’t think so. The load balancing redirect method sends instruction to the client which does the actual redirecting, and is always Flash app. With rtsp, there are many possible clients.

Richard

---

<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: [August 6, 2010, 4:39am UTC](https://community.wowza.com/t/rtsp-redirect/34910/3 "2010-08-06T04:39:42Z")

</div>

We have not investigated RTSP load balancing as of yet. The idea of providing RTSP redirects in the current load balancing system is a good idea. We will consider it. It is unclear how many players and which players support RTSP redirection.

Charlie

---

<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: [August 6, 2010, 5:18am UTC](https://community.wowza.com/t/rtsp-redirect/34910/4 "2010-08-06T05:18:06Z")

</div>

What aspects of an RTSP session do you need to control?

I will consider adding hooks to enable RTSP redirection.

Charlie

---

<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: [August 6, 2010, 5:37am UTC](https://community.wowza.com/t/rtsp-redirect/34910/5 "2010-08-06T05:37:33Z")

</div>

OK, let me think about it. I also think you need to be able to stop an RTSP session mid-session.

Charlie

---

<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 3, 2010, 6:46am UTC](https://community.wowza.com/t/rtsp-redirect/34910/6 "2010-09-03T06:46:14Z")

</div>

No, I am not sure when I will get to this. It will most likely not be soon.

Charlie

---

<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: [October 5, 2010, 5:50am UTC](https://community.wowza.com/t/rtsp-redirect/34910/7 "2010-10-05T05:50:00Z")

</div>

Plus, it is not very useful if the players do not support it. It seems that the player support for RTSP redirects is very spotty at best. So we are not motivated to add this feature. I do not know of any other solutions other then to do the redirection outside of RTSP.

Charlie

---

<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 27, 2010, 10:05pm UTC](https://community.wowza.com/t/rtsp-redirect/34910/8 "2010-09-27T22:05:04Z")

</div>

Smil file is not support for rtsp in Wowza.

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: [October 5, 2010, 12:48pm UTC](https://community.wowza.com/t/rtsp-redirect/34910/9 "2010-10-05T12:48:57Z")

</div>

It is not supported at present, but under [consideration](http://community.wowza.com/t/-/34910)

I do not have eta

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 11, 2011, 10:15am UTC](https://community.wowza.com/t/rtsp-redirect/34910/10 "2011-08-11T10:15:10Z")

</div>

For non-Flash client the only option is use the HTTP method of getting least loaded edge.

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 11, 2011, 12:15pm UTC](https://community.wowza.com/t/rtsp-redirect/34910/11 "2011-08-11T12:15:13Z")

</div>

That’s interesting. Are you using IMediaCasterNotify2 ?

[https://www.wowza.com/docs/imediacasternotify2-example](https://www.wowza.com/docs/imediacasternotify2-example)

Can you show how?

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: [April 2, 2012, 7:57pm UTC](https://community.wowza.com/t/rtsp-redirect/34910/12 "2012-04-02T19:57:46Z")

</div>

Jay,

Thanks for the report. I will forward info.

Richard

---

<div class="post-metadata">

### Author: ![Michael\_Barsoumian](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@Michael\_Barsoumian](https://community.wowza.com/u/Michael_Barsoumian)
#### Post date: [September 26, 2010, 10:57am UTC](https://community.wowza.com/t/rtsp-redirect/34910/13 "2010-09-26T10:57:44Z")

</div>

Does anyone happen to know if Android based phones and VLC support a .smil or other playlist for rtsp streams?

Do you think other RTSP clients are more likely to support an RTSP url within a playlist or the RTSP redirect convention?

Just thinking that redirection would be more easily handled via HTTP…

---

<div class="post-metadata">

### Author: ![Roman\_Shmelev](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Roman\_Shmelev](https://community.wowza.com/u/Roman_Shmelev)
#### Post date: [October 5, 2010, 2:42pm UTC](https://community.wowza.com/t/rtsp-redirect/34910/14 "2010-10-05T14:42:44Z")

</div>

Hi all!

Is there any useful info how to make RTSP redirects with Android devices?

I tried to use 302 RTSP code, however android player seemed to not understand it and immediately said that it cannot play video…

(I used perl-based script as redirector service)

---

<div class="post-metadata">

### Author: ![Haakon\_Ranum](https://avatars.discourse-cdn.com/v4/letter/h/ecae2f/32.png) [@Haakon\_Ranum](https://community.wowza.com/u/Haakon_Ranum)
#### Post date: [August 25, 2011, 4:39am UTC](https://community.wowza.com/t/rtsp-redirect/34910/15 "2011-08-25T04:39:57Z")

</div>

```auto
public class RedirectorModule extends ModuleBase {
    
    public void onRTPSessionCreate(RTPSession rtpSession)
    {
        rtpSession.addActionListener(new Redirector());
    }
}

```

```auto
public class Redirector implements IRTSPActionNotify {
    @Override
    public void onDescribe(RTPSession rtps, RTSPRequestMessage rtsprm, RTSPResponseMessages rtsprm1) {
        RTSPResponseMessage resp = new RTSPResponseMessage();
        resp.setResponseCode(302);
        resp.setResponseMessage("REDIRECT");
        resp.setHeader("Location", "rtsp://192.168.0.194:1935/live/kakakak2_1");
        resp.setCSeq(rtsprm.getCSeq());
        rtsprm1.addMessage(resp);
    }

```

Works for me 🙂

Does _resp.setResponseMessage(“REDIRECT”);_ really require the current request uri like illustrated here @ 10.10 : [http://www.ietf.org/rfc/rfc2326.txt](http://www.ietf.org/rfc/rfc2326.txt) ?

```auto
S->C: REDIRECT rtsp://example.com/fizzle/foo RTSP/1.0
           CSeq: 732
           Location: rtsp://bigserver.com:8001
           Range: clock=19960213T143205Z-

```

---

<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: [August 11, 2011, 6:42am UTC](https://community.wowza.com/t/rtsp-redirect/34910/16 "2011-08-11T06:42:57Z")

</div>

I have RTSP redirection working on Android, Blackberry, Quicktime, and VLC by returning the following to the DESCRIBE request:

response message: REDIRECT

response header: Location rtsp://targetdomain/app/instance/stream

response code: 302

CSeq: The CSeq of the request

---

<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: [August 11, 2011, 7:22am UTC](https://community.wowza.com/t/rtsp-redirect/34910/17 "2011-08-11T07:22:56Z")

</div>

I’m using a class that implements IRTSPActionNotify.

In my module, I create an instance of my class, and in the onRTPSessionCreate handler, I use RTPSession.addActionListener() to have my my IRTSPActionNotify implementing class listen for events.

Then, in my class, I use the onDescribe() handler to inspect the request URI, replace the hostname/ip with my target, create a new RTSPResponseMessage with the aforementioned propreties, and then use RTSPResponseMessages.addMessage() to send the response message to the client.

---

<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: [April 2, 2012, 11:38am UTC](https://community.wowza.com/t/rtsp-redirect/34910/18 "2012-04-02T11:38:01Z")

</div>

FWIW, this appears to be broken in Android 4.0 (Ice Cream Sandwich). Redirect no longer works, and the native video player just hangs.

---

<div class="post-metadata">

### Author: ![Florian\_Iragne](https://avatars.discourse-cdn.com/v4/letter/f/779978/32.png) [@Florian\_Iragne](https://community.wowza.com/u/Florian_Iragne)
#### Post date: [August 6, 2010, 1:29pm UTC](https://community.wowza.com/t/rtsp-redirect/34910/19 "2010-08-06T13:29:14Z")

</div>

i know that there is plenty of rtsp clients, but since redirect is in the rfc ([http://tools.ietf.org/html/rfc2326#section-10.10](http://tools.ietf.org/html/rfc2326#section-10.10)), i hope that at least some clients handle it. And since Wowza API mention onRedirect event for RTPModel, i was hopping that a method would allow me to issue the redirect directive.

Actually, thinking of it, since Wowza API does not allow to override or control any aspect of the RTSP (only RTP underlying session), it may be not possible now. would it be possible in the future?

does anybody have any experience on rtsp/RTP load balancing?

---

<div class="post-metadata">

### Author: ![Florian\_Iragne](https://avatars.discourse-cdn.com/v4/letter/f/779978/32.png) [@Florian\_Iragne](https://community.wowza.com/u/Florian_Iragne)
#### Post date: [August 6, 2010, 1:45pm UTC](https://community.wowza.com/t/rtsp-redirect/34910/20 "2010-08-06T13:45:02Z")

</div>

i know that rtsp is the most difficult since many STB are implementing it their own way…

btw, is there any possibility to control RTSP session unsing API? i understand that implementing rtsp redirect directly in Wowza might not be your priority, due to the wide range of possibly different and incompatible clients, but it is going to be very important for us.

thanks for your help

[Next page](https://community.wowza.com/t/rtsp-redirect/34910.md?page=2)
