# How To create rtsp relay

**URL:** <https://community.wowza.com/t/how-to-create-rtsp-relay/36171>\
**Category:** Wowza Streaming Engine\
**Created:** [March 11, 2011, 9:19pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171 "2011-03-11T21:19:06Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravi\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/e56c9b/32.png) [@Ravi\_Gupta](https://community.wowza.com/u/Ravi_Gupta)\
**Post date:** [March 11, 2011, 9:19pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/1 "2011-03-11T21:19:06Z")

</div>

Respected Member,

I am new in wowza media server ,may i know how to create “RTSP RELAY”

Give me right direction

---

<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:** [March 11, 2011, 4:03pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/2 "2011-03-11T16:03:54Z")

</div>

Here it is:

[https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming](https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming))

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:** [March 11, 2011, 5:18pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/3 "2011-03-11T17:18:19Z")

</div>

Use MediaCache for vod.

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:** [March 16, 2011, 12:05pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/4 "2011-03-16T12:05:18Z")

</div>

There is a guide with the package. Also, the MediaCache.xml is already configured to stream from any http resource. You can provide rtsp out as usual.

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:** [March 17, 2011, 12:47pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/5 "2011-03-17T12:47:53Z")

</div>

You are still trying to re-stream vod rtsp. Take this one step at a time. Install MediaCache as-is, don’t make any changes to /conf/MediaCache.html. Make sure you copied the jar file and have restarted Wowza.

Put a video on a web server:

```auto
http://[your-webserver]/sample.mp4

```

Create an application named “mediacache”, add the property to Application.xml /MediaReader (as per instructions in the MediaCache guide):

```auto
<MediaReader>
<!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->
<Properties>
<Property>
<Name>randomAccessReaderClass</Name>
<Value>com.wowza.wms.plugin.mediacache.impl.MediaCacheRandomAccessReader</Value>
</Property>
</Properties>
</MediaReader>

```

Test using SimpleVideoStreaming player:

Server: rtmp://[wowza-address]:1935/mediacache

Stream: mp4:http/[your-webserver]/sample.mp4

If that works, first make sure that your /conf/mediacache/Application.xml /RTP /Authentication /PlayMethod is “none”, then play in RTSP client like this:

```auto
rtsp://[wowza-address]:1935/mediacache/_definst_/mp4:http/[your-webserver]/sample.mp4

```

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:** [March 17, 2011, 12:52pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/6 "2011-03-17T12:52:59Z")

</div>

Correction:

Server: rtmp://[wowza-address]:1935/mediacache

Stream: mp4:http/[your-webserver-address]/sample.mp4

```auto
rtsp://[wowza-address]:1935/mediacache/_definst_/mp4:http/[your-webserver]/sample.mp4

```

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:** [March 17, 2011, 1:53pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/7 "2011-03-17T13:53:37Z")

</div>

No difference

Richard

---

<div class="post-metadata">

**Author:** ![Andrew\_Kennedy](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@Andrew\_Kennedy](https://community.wowza.com/u/Andrew_Kennedy)\
**Post date:** [March 16, 2011, 1:18am UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/8 "2011-03-16T01:18:49Z")

</div>

Provide a litrle more detail on what you are trying to achieve, RTSP RELAY, is not very descriptive.

Shamrock

---

<div class="post-metadata">

**Author:** ![Andrew\_Kennedy](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@Andrew\_Kennedy](https://community.wowza.com/u/Andrew_Kennedy)\
**Post date:** [March 17, 2011, 2:15am UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/9 "2011-03-17T02:15:06Z")

</div>

> Respected Shamrock sir,
> 
> Firstly i need is following in case of RTSP (Video ON Demand)
> 
> There are two wowza server…
> 
> First wowza server establish a connection with user (Means user hit to First wowza server ) or first wowza server establish a connection with second wowza server and get content from here means (from Second wowza server)
> 
> over all second wowza server is used only for give content to first wowza server.
> 
> For this i needed relay so i used this link…
> 
> [https://www.wowza.com/forums/con…P-re-streaming](https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming%28RTSP-RTP-re-streaming))
> 
> and created file second.stream file there i wrote rtsp://[secondwowza-address]/vod/mp4:sample.mp4
> 
> and hit to first wowza server used this link rtsp://[firstwowza-address]/rtplive/second.stream
> 
> it’s played fine but problem is that
> 
> when i play this link firstly vlc it play and try to this link to play to another vlc in case of firstly vlc is running condition then on second vlc stream is not start from starting rather it start from where there first stream is currently running…
> 
> so how can solve that problem . and i got mediacache package ???
> 
> hence i could not understand how solve out this problem???
> 
> help me

If you look through the media cache package set up you will see you do not need the second.stream configuration which is why you are having the issue.

Follow the instructions for the media cache installation and it should work as you need.

Shamrock

---

<div class="post-metadata">

**Author:** ![Ravi\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/e56c9b/32.png) [@Ravi\_Gupta](https://community.wowza.com/u/Ravi_Gupta)\
**Post date:** [March 11, 2011, 10:08pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/10 "2011-03-11T22:08:13Z")

</div>

can it’s possible ,in case of vod

---

<div class="post-metadata">

**Author:** ![Ravi\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/e56c9b/32.png) [@Ravi\_Gupta](https://community.wowza.com/u/Ravi_Gupta)\
**Post date:** [March 16, 2011, 11:06am UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/11 "2011-03-16T11:06:05Z")

</div>

Sir Previously u say ,

> Use MediaCache for vod.
> 
> Richard

Now I have got MediaCache Package .

so now i , how to configure MediaCache.xml for vod relay and re-streamming , in both case RTMP or RSTP

I asked this question previously , but didn’t got , sufficient answer …

Definitely i am new in wowza … plz give me right way to solve that problem

---

<div class="post-metadata">

**Author:** ![Ravi\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/e56c9b/32.png) [@Ravi\_Gupta](https://community.wowza.com/u/Ravi_Gupta)\
**Post date:** [March 17, 2011, 2:02pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/12 "2011-03-17T14:02:10Z")

</div>

Respected Shamrock sir,

Firstly i need is following in case of RTSP (Video ON Demand)

There are two wowza server…

First wowza server establish a connection with user (Means user hit to First wowza server ) or first wowza server establish a connection with second wowza server and get content from here means (from Second wowza server)

over all second wowza server is used only for give content to first wowza server.

For this i needed relay so i used this link…

[https://www.wowza.com/forums/con…P-re-streaming](https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming%28RTSP-RTP-re-streaming))

and created file second.stream file there i wrote rtsp://[secondwowza-address]/vod/mp4:sample.mp4

and hit to first wowza server used this link rtsp://[firstwowza-address]/rtplive/second.stream

it’s played fine but problem is that

when i play this link firstly vlc it play and try to this link to play to another vlc in case of firstly vlc is running condition then on second vlc stream is not start from starting rather it start from where there first stream is currently running…

hence i need that if first vlc play video then other vlc play video from starting , just like that vod in case /

so how can solve that problem . and i got mediacache package ???

hence i could not understand how solve out this problem???

help me

---

<div class="post-metadata">

**Author:** ![Ravi\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/e56c9b/32.png) [@Ravi\_Gupta](https://community.wowza.com/u/Ravi_Gupta)\
**Post date:** [March 17, 2011, 7:22pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/13 "2011-03-17T19:22:32Z")

</div>

sir this configuration is same as window and linux

I am using fedora 14 …

---

<div class="post-metadata">

**Author:** ![Ravi\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/e56c9b/32.png) [@Ravi\_Gupta](https://community.wowza.com/u/Ravi_Gupta)\
**Post date:** [March 18, 2011, 3:47pm UTC](https://community.wowza.com/t/how-to-create-rtsp-relay/36171/14 "2011-03-18T15:47:55Z")

</div>

thanx to support
