Wowza Community

StreamNameAlias: Simple & powerful stream name alias module

https://www.wowza.com/docs/how-to-get-the-streamnamealias-addon

No, the old system will not completely work on the new software. If you were using the 1.7.2 system you should able able to just copy all your aliases from the alias map in 1.7.2 to the “play” map in 2.0 and it will all work the same way.

Charlie

You must have something setup wrong. I double checked this and using a stream alias worked for me. Try these exact steps:

  • Install the latest patch:

    WowzaMediaServer2.0.0-patch10.zip

  • Install the stream alias package as prescribed in the Stream Alias AddOn package. You may want to re-download and install from scratch to be sure you have the latest.

  • Set contents of the alias files like this:

    aliasmap.play.txt

    *=${Stream.Name}
    
    

    aliasmap.stream.txt

    shoutcast=http://91.121.157.213:8054
    *=${Stream.Name}
    
    

    Note, remove any other alias. Be sure to do this. Use these exact values for this test.

  • Use the stream manager to start the stream.

    Charlie

Hi.

Any way to use the SimpleAliases via Wowza API?

Thanks?

We read the SDP file everytime a stream is started on the publish side. The first time a user connects to a stream the SDP file is loaded for that stream. As user connects to the stream to view it the SDP is not re-read. If no one is watching the stream we will drop the stream on the publishing side. The next time someone wants to watch the stream we will re-load the SDP file from disk.

Charlie

No, only when the last user stops viewing the stream and 10 seconds goes by and no one views the stream, then Wowza Server will stop publishing the stream. The next time a viewer connects to view the stream the .sdp file will be re-read.

Charlie

Hi,

Could somebody tell what I am doing wrong? The module is installed, I publish a stream and try to subscribe to it.

The StreamNameAliasMap.txt looks like this:

stream_undefined=stream_1

The published stream name is “stream_undefined”. I am subscribing to the same stream name but this is what I get:

nsPlay: NetStream.Play.StreamNotFound (Failed to play stream_1; stream not found.)

If I subscribe to stream_1, I get:

nsPlay: NetStream.Play.Failed (ModuleStreamNameAlias: No match for stream name stream_1.)

Any help appreciated, thank you!

P.

Thank you Richard, that seems to work!

Can you explain what the goal is?

Richard

Yes, on the last question: alias on the left, stream name on the right.

But I don’t think Wowza caches sdp files.

Richard

It’s a very broad a question, but I think you would start with a system for registration and other business logic using web pages and a datatbase.

Then use connection time authentication in Wowza module that connects to database, and or NetStream authentication, override play command and pass user token to Wowza as querystring.

Or your web pages do most of the heavy lifting of authentication and forming appropriate rtmp connection URLs and stream names.

Richard

This is a little beyond forum. Lots of development work to do. But as mentioned there are ways to authenticate, for example:

http://www.wowza.com/community/t/-/111

Richard

I have not seen an “sdp refresh” parameter. Do you have a reference for that?

Richard

What version of Wowza are you using? If it is Wowza Server 2, you are using the StreamNameAlias package for Wowza 1.7x

If you have correct package, for that rule to work, you have to be publishing a live stream named “stream_1” to that application

You can add the wildcard at the end to let actual stream names through, good for testing.

*=${Stream.Name}

Richard

Yes, they do work together, I tested, but you don’t need to add a prefix to a live stream.

The Alias system does not work with playlist items, the static or live streams that are the source of a Stream class stream. But it does work with the resultant stream.

Richard

There are code changes in patches.

Richard

The CDN should be able to re-stream this:

rtmp://ec2-174-129-106-19.compute-1.amazonaws.com/vbrick/myStream.sdp

I just did it from here. I created an Application on my Wowzer server running locally named “edge”, with Application.xml /StreamType “liverepeater-edge”. Then I opened LiveVideoStreaming player and entered:

Server: rtmp://localhost/edge

Stream: rtmp://ec2-174-129-106-19.compute-1.amazonaws.com/vbrick/myStream.sdp

Try that first. Then try getting an alias working. An alias could be:

mystream=rtmp://ec2-174-129-106-19.compute-1.amazonaws.com/vbrick/myStream.sdp

Richard

Is there a path or absolute url in the smil’s video src attribute? If so, try putting the smil file in the same folder as the content and using relative link with no path

<video src="mp4:sample.mp4" system-bitrate="450000"/>

Richard

Hi,

I got the following situation:

I have in the file: alias.stream.txt the following two lines:

axis!rtsp://[user]:[pass]@[server]:554/axis-media/media.amp?streamprofile=JS
shoutcast!http://[server]:8000/[shoutcaststream]

I removed some server names and user logins for security.

To start those two streams, I enter the webmanager en start both stream with the following actions:

Start a new stream with the option rtplive and fill the name ‘axis’ in it.

Click on submit, and the stream is started and chunked.

In the webinterface I see the name ‘axis’ and can use that in the player urls to watch it back.

But when I start the second stream. I use the option shoutcast in stead of rtplive.

After that I see that the stream is started and chunked…

But now the big issue:

The name of the shoutcast stream is not shoutcast. It is the complete source url… And that is a complex url and cannot be used with the flash client.

To fix that I have to add a line to the alias.play.txt file with the following url:

shoutcast!http://[server]:8000/[shoutcaststream]

But this is not done for the axis stream which has a rtplive type.

Is this default behavior? Because than I need to known when this occurs?

Cause we need to automate those aliases.

Does the shoutcast type always use the stream url for it’s naming? Or will that be changed to the same behavior als the rtplive way? That would be nice.

PS, we use the ‘!’ as seperator.

Regards,

Joshua

Charlie,

hmmm a bit strange but it works now… I updated with patch 10 and reinstalled the stream name alias module. And it is working…

There was no change in the code between patch 9 and 10? Than it is even more strange…

But ok, i got it working.

Thanks for the info

Regards,

Joshua