# Live Stream Repeat from different Applications

**URL:** https://community.wowza.com/t/live-stream-repeat-from-different-applications/35622
**Category:** Wowza Streaming Engine
**Created:** [January 31, 2013, 5:55pm UTC](https://community.wowza.com/t/live-stream-repeat-from-different-applications/35622 "2013-01-31T17:55:30Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Tom\_Tom](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Tom\_Tom](https://community.wowza.com/u/Tom_Tom)
#### Post date: [January 31, 2013, 5:55pm UTC](https://community.wowza.com/t/live-stream-repeat-from-different-applications/35622/1 "2013-01-31T17:55:30Z")

</div>

Hi!

I’ve the following setup

On my Origin exists 3 applications

**application one**

just contains 2 .stream files containing in it accessible content folder :

First .streamFile : rtmp://sameorigin:1935/two/_definst_/stream100

Second .streamFile : rtmp://sameorigin:1935/three/_definst_/stream200

**application two**

gets its own livestream from the Adobe FME pointed to the stream /stream100

**application three**

gets its own livestream from the Adobe FME, too. Pointed to the stream /stream200

I’ve written a module for Application “one” which creates on onAppStart() 2 Playlists. One to the .streamFile “stream100”, one for .streamFile “stream200”. So per Application two|three an own playlist which item points relativ to the streamfile (regarding the content folder), contains the flag -2 for Livestream and -1 for length.

During the play()-call of the module, depending on some decisions which the plugin takes, it will start playlist for “stream100” or playlist for “stream200”. So far so good. Decisions works great.

But I don’t get any video in my Flashplayer after I start the playlist for a given stream. I’ve called already the .streamFile directly from application “one”, but this will even also present no video.

The Application “one” is configured as (currently I’m just testing with one server, when this works, I will try a orgin - edge,edge,edge Setup)

```auto
<StreamType>liverepeater-edge</StreamType>

```

and Storage is

```auto
<StorageDir>/usr/local/WowzaMediaServer/content/one/live</StorageDir>

```

In this directory stays the 2 .stream files.

I’ve called _rtmp://originserver/one/first.stream_ without success.

The only one I get is

```auto
WARN server comment - LiveMediaStreamReceiver.connect: failure

```

But the original stream from app two or app three works well.

My Playlist created like this (in onAppStart() ):

```auto
final Playlist playlistf = new Playlist("stream_first");
playlistf.setRepeat(true);
playlistf.addItem("/first.stream", -2, -1);
final Playlist playlist2 = new Playlist("stream_second");
playlist2.setRepeat(true);
playlist2.addItem("/sec.stream", -2, -1);

```

during play() I do the following :

```auto
Playlist pl = isGood ? playlistf : playlist2;
final Stream stream = Stream.createInstance(client.getVHost(), currentApplication.getName(), streamName);
stream.setSendOnMetadata(true);
pl.open(stream);
// this.invokePrevious(client, function, params);
return;

```

Both application _two_ and _three_ are configured as

```auto
<StreamType>liverepeater-origin</StreamType>

```

Is it not possible to stream-repeat application wide?

Can the .stream Files just contain relative streams from the same application?

EDIT :

Ok, I’ve tried something with a diffent flashplayer. If I use

```auto
rtmp://myServer/one/

```

as Server and

```auto
rtmp://myServer/two/stream200

```

as Stream Name, it works. But why do it not work if I write the same URL from the streamName to the .stream File ?

Thanks for reply

Tom

---

<div class="post-metadata">

### Author: ![Tom\_Tom](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Tom\_Tom](https://community.wowza.com/u/Tom_Tom)
#### Post date: [February 1, 2013, 3:36pm UTC](https://community.wowza.com/t/live-stream-repeat-from-different-applications/35622/2 "2013-02-01T15:36:36Z")

</div>

Ok, simplify it…

I’ve 2 Applications

Application “one” configured as liverepeater-origin. To this application I send a stream via FMEncoder.

If I call the stream directly under

rtmp://wowzaserver/one/livestream

I can see a stream.

And I have another application “two”. This is a liverepeater-edge. In this case on the same host.

If I call via **[install-dir]/examples/LiveVideoStreaming/client/live.html**

```auto
Server : rtmp://wowzaserver/two/
Streamname : rtmp://wowzaserver/one/livestream

```

everything looks fine, too.

But when I create a

```auto
[contentfolder]/mystream.stream

```

(with vi on console, so there are no .txt)

which contains _rtmp://wowzaserver/one/livestream_ in it as a single line, for application “two”, and call this

via

```auto
Server : rtmp://wowzaserver/two/
Streamname : mystream.stream

```

Nothing goes on. Just the described **WARN server comment - LiveMediaStreamReceiver.connect: failure**

I think there is something missing in my configuration… But I don’t know. So far as I’ve read in the forum, this type

of streaming just with .stream Files is one of the simple things…

Have some solutions to me?`

regards,

Tom

---

<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 1, 2013, 5:33pm UTC](https://community.wowza.com/t/live-stream-repeat-from-different-applications/35622/3 "2013-02-01T17:33:57Z")

</div>

If /conf/two/Application.xml /StreamType is “liverepeater-edge”, that should work as you described. Since the first test, using full rtmp origin url as stream name, there must be problem with the .stream file. Make sure you are using same case. Go over everything, try it again.

[https://www.wowza.com/docs/how-to-configure-a-live-stream-repeater](https://www.wowza.com/docs/how-to-configure-a-live-stream-repeater)

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: [February 4, 2013, 3:24pm UTC](https://community.wowza.com/t/live-stream-repeat-from-different-applications/35622/4 "2013-02-04T15:24:14Z")

</div>

You cannot the StreamNameAlias addon with .stream files, which is a light-weight aliasing method. You can’t alias an alias.

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: [February 5, 2013, 12:55pm UTC](https://community.wowza.com/t/live-stream-repeat-from-different-applications/35622/5 "2013-02-05T12:55:31Z")

</div>

You’re welcome. Thanks for the update

Richard

---

<div class="post-metadata">

### Author: ![Tom\_Tom](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Tom\_Tom](https://community.wowza.com/u/Tom_Tom)
#### Post date: [February 4, 2013, 9:42am UTC](https://community.wowza.com/t/live-stream-repeat-from-different-applications/35622/6 "2013-02-04T09:42:32Z")

</div>

Hi Richard,

I found out that this thing with the streamfile does not work if I use the ModuleStreamName Alias

```auto
            <Module>
                <Name>ModuleStreamNameAlias</Name>
                <Description>ModuleStreamNameAlias</Description>
                <Class>com.wowza.wms.plugin.streamnamealias.ModuleStreamNameAlias</Class>
            </Module>

```

It was just configured default. There were no alias configured, just _\*=${Stream.Name}_

If I comment it out, it runs very very fine! Aliasing should be a next step in my setup. So this was

the reason why it was configured.

Is it a known problem? Or just my problem?

regards,

Tom

---

<div class="post-metadata">

### Author: ![Tom\_Tom](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Tom\_Tom](https://community.wowza.com/u/Tom_Tom)
#### Post date: [February 4, 2013, 12:31pm UTC](https://community.wowza.com/t/live-stream-repeat-from-different-applications/35622/7 "2013-02-04T12:31:11Z")

</div>

Ok, on one side I’ve the problem with the streamNameAlias Module to work correctly with my .stream File scenario.

On more important question is : Is it possible for iOS Streaming (http, rtsp…) to “rewrite” the stream?

Like my way with 2 playlists.

Client comes with streamName “/ultimatestream/playlist.m3u8” and internaly I change it to what ever I want as

origin source?

As far as I know my only point to interact is onXYZSessionCreate(). During rtmp I can do this during .play()

regards,

Tom

---

<div class="post-metadata">

### Author: ![Tom\_Tom](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Tom\_Tom](https://community.wowza.com/u/Tom_Tom)
#### Post date: [February 5, 2013, 9:36am UTC](https://community.wowza.com/t/live-stream-repeat-from-different-applications/35622/8 "2013-02-05T09:36:16Z")

</div>

> You cannot the StreamNameAlias addon with .stream files, which is a light-weight aliasing method. You can’t alias an alias.
> 
> Richard

Found a solution with IMediaStreamNameAliasProvider for HTTP\*Session Connections and Playlist Switch for RTMP! Works great. Thanks for hints which push me to the right directon! 🙂
