Live Stream Repeat from different Applications

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)

<StreamType>liverepeater-edge</StreamType>

and Storage is

<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

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() ):

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 :

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

<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

rtmp://myServer/one/

as Server and

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

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

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

everything looks fine, too.

But when I create a

[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

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

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

Richard

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

Richard

You’re welcome. Thanks for the update

Richard

Hi Richard,

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

            <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

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

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! :slight_smile: