Wowza Community

StreamNameAlias: Simple & powerful stream name alias module

Hi Richard,

You are try to use StreamNameAlias + StreamController, you know if this two module can be work together?

I’m trying to use StreamController, and use the Rules in StreamNameAlias, for validate and fix the Stream Name.

Example:

I call in StreamController the file Extremists.m4v and if forget add the mp4: with the mapping for StreamNameAllias I’m try to fix the correct name adding mp4:Extremists.m4v

I’m using this rules in VOD application but I’m try to combine in LIVE application this two modules and don’t mach any rules, but the module is loading ok.

mp4:*=${Stream.Name}
mp3:*=${Stream.Name}
*.mp4=mp4:${Stream.Name}
*.mov=mp4:${Stream.Name}
*.m4v=mp4:${Stream.Name}
*.m4a=mp4:${Stream.Name}
*.f4v=mp4:${Stream.Name}
*.3gp=mp4:${Stream.Name}
*.3g2=mp4:${Stream.Name}
*.mp3=mp3:${Stream.Name}
*=${Stream.Name}

Thanks in advance for any tip or advice.

Alejandro

Richards,

Thanks, I’m try with the Playlist item :frowning:

I’ll try to do this the other way…

Ale

Remove the first line from your alias file, or put it in the end. The wildcard picks up any request and it never gets to your specific rtsp aliases.

Hi.

I meant, is there a way to use the SimpleAlias with a custom HTTP provider. without creating a dedicated application or module?

Regards.

Hi.

The goal is to support RTP-live sources, which can change the IP arbitrary and need to update the SDP.

AFAIK, Wowza caches the SDP’s, and won’t notice the changes immediately.

So the idea is to create an alias, and create new SDP’s as needed, and re-point this alias to these new SDP’s.

I don’t want to develop a custom module for this (as I only using custom provider today for creating/erasing the SDP’s remotely), hence I’m looking to extend the custom HTTP provider for this.

Thanks again.

P.S.:

About the aliasmap.stream.txt format:

*=${Stream.Name}

It means the alias for streaming is on the left side, and the SDP name is on the right side, correct?

Hi.

But if some users are connected all the time?

If RTP source changes, and no longer available, Wowza will disconnect all viewers, and re-read the SDP (which will contain the new source address)?

Thanks.

Hi.

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

So the only reliable way to handle RTP source IP change in SDP, is to set the SDP refresh parameter in the config file?

If yes, can you please remind me what the parameter is, and if it present in Wowza 1.7?

Thanks.

Hi,

I am pushing a rtsp/rtp live stream using Vbrick’s encoder to ec2/wowza…

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

I am able to see the stream. I am trying to do a rtmp pull of this stream on highwinds cdn…

I learnt from cdn support taht adobe server by default adds as a prefix to the stream making it something like flv:rtmp://…

I updated the aliasmap.play.txt and updated aliasmap.stream.txt with following line :

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

But no go,I am sure something is still missing…

Can you help me to setup the right alias…

I would really appreciate,

Thanks,

Nirav.

Thanks Richard,

I did the way you informed…

I am able to see the stream on the player when edge app is created and I insert the stream in the player as

Server: rtmp://c2-174-129-106-19.compute-1.amazonaws.com/edge

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

I added alias as

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

I am trying to play in the player as

server : rtmp://ec2-174-129-106-19.compute-1.amazonaws.com/edge

stream : mystream

It doesn’t work…

In highwinds cdn, I inserted pull server url as

rtmp://ec2-174-129-106-19.compute-1.amazonaws.com/edge/mystream

which doesn’t help too…

If I try to insert in highwinds like this rtmp://c2-174-129-106-19.compute-.amazonaws.com/edge/rtmp://ec2-174-129-106-19.compute-.amazonaws.com/vbrick/myStream.sdp, it throws up the following errors

WARN server comment 2010-04-30 15:57:13 - - - - - 3044.752 - - - - - - - - LiveMediaStreamHandler.connect: failure

ERROR server comment 2010-04-30 16:01:08 - - - - - 3280.584 - - - - - - - - onApplicationInstanceCreate: javax.management.MalformedObjectNameException: Invalid character ‘:’ in value part of property

Thanks for the pointers,

I guess I am missing the basics :(,

Richard,

Can you please help me on the previous msg…

Thanks again,

I want build a module for makeing a system similar to livestream where users can register and automatically lunch their channel. I wonder how can I map their desired channels with streams application. I should make for everyone a separate application or unique streams? How can I map on the fly their channels from database? I also use multiple servers and a loadbalancer. Infrastructure that I use is this. From the load balancer [channelname] I redirect to [channelname-source] and for vod channels I use only a single server with channels named [channelname-vod].

Thanks,

Cristian

The registration and administration is made as a web pages but I don’t know how I can to map an alias channel created in database. For example if the user wants to make a channel bcb then should be able to access as rtmp://infoo.ro/bcb/bcb.f4v and not rtmp://infoo.ro/live/definst/bcb.f4v

for the moment I’ve created separate applications for each channel. eg

rtmp://ip/client1 rtmp://ip/client2.

Should I manage all users and streams in the same application?For the moment I thing I go in a wrong way with manual adding applications folders.

I am trying to setup Wowza to pick up a multicast stream from our encoders and pass that stream along to a flash player. I am at the step of create aliases. I set up the app.xml file as instructed but now when I start Wowza it does not pick up the stream.

My Application.xml

<Root>
	<Application>
		<!-- Uncomment to set application level timeout values
		<ApplicationTimeout>60000</ApplicationTimeout>
		<PingTimeout>12000</PingTimeout>
		<ValidationFrequency>8000</ValidationFrequency>
		<MaximumPendingWriteBytes>0</MaximumPendingWriteBytes>
		<MaximumSetBufferTime>60000</MaximumSetBufferTime>
		<MaximumStorageDirDepth>25</MaximumStorageDirDepth>
		-->
		<Connections>
			<AutoAccept>true</AutoAccept>
			<AllowDomains></AllowDomains>
		</Connections>
		<!--
			StorageDir path variables
			
			${com.wowza.wms.AppHome} - Application home directory
			${com.wowza.wms.ConfigHome} - Configuration home directory
			${com.wowza.wms.context.VHost} - Virtual host name
			${com.wowza.wms.context.VHostConfigHome} - Virtual host config directory
			${com.wowza.wms.context.Application} - Application name
			${com.wowza.wms.context.ApplicationInstance} - Application instance name
			
		-->
		<Streams>
			<StreamType>live</StreamType>
			<StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
			<KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
			<!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater -->
			<LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer</LiveStreamPacketizers>			
			<!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
			<Properties>
			</Properties>
		</Streams>
		<!-- HTTPStreamers (separate with commas): cupertinostreaming, smoothstreaming -->
		<HTTPStreamers>cupertinostreaming,smoothstreaming</HTTPStreamers>			
		<SharedObjects>
			<StorageDir></StorageDir>
		</SharedObjects>
		<Client>
			<IdleFrequency>-1</IdleFrequency>
			<Access>
				<StreamReadAccess>*</StreamReadAccess>
				<StreamWriteAccess>*</StreamWriteAccess>
				<StreamAudioSampleAccess></StreamAudioSampleAccess>
				<StreamVideoSampleAccess></StreamVideoSampleAccess>
				<SharedObjectReadAccess>*</SharedObjectReadAccess>
				<SharedObjectWriteAccess>*</SharedObjectWriteAccess>
			</Access>
		</Client>
		<RTP>
			<!-- RTP/Authentication/[type]Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
			<Authentication>
				<PublishMethod>digest</PublishMethod>
				<PlayMethod>none</PlayMethod>
			</Authentication>
			<!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
			<AVSyncMethod>senderreport</AVSyncMethod>
			<MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
			<IncomingDatagramPortRanges>*</IncomingDatagramPortRanges>
			<!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->
			<Properties>
			</Properties>
		</RTP>
		<MediaCaster>
			<!-- Properties defined here will override any properties defined in conf/MediaCasters.xml for any MediaCasters loaded by this applications -->
			<Properties>
			</Properties>
		</MediaCaster>
		<MediaReader>
			<!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->
			<Properties>
			</Properties>
		</MediaReader>
		<LiveStreamPacketizer>
			<!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->
			<Properties>
			</Properties>
		</LiveStreamPacketizer>
		<HTTPStreamer>
			<!-- Properties defined here will override any properties defined in conf/HTTPStreamers.xml for any HTTPStreamer loaded by this applications -->
			<Properties>
			</Properties>
		</HTTPStreamer>
		<Repeater>
			<OriginURL></OriginURL>
			<QueryString><![CDATA[]]></QueryString>
		</Repeater> 
		<Modules>
			<Module>
				<Name>base</Name>
				<Description>Base</Description>
				<Class>com.wowza.wms.module.ModuleCore</Class>
			</Module>
			<Module>
				<Name>properties</Name>
				<Description>Properties</Description>
				<Class>com.wowza.wms.module.ModuleProperties</Class>
			</Module>
			<Module>
				<Name>logging</Name>
				<Description>Client Logging</Description>
				<Class>com.wowza.wms.module.ModuleClientLogging</Class>
			</Module>
			<Module>
				<Name>flvplayback</Name>
				<Description>FLVPlayback</Description>
				<Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
			</Module> 
			<Module>
				<Name>ModuleStreamNameAlias</Name>
				<Description>ModuleStreamNameAlias</Description>
				<Class>com.wowza.wms.plugin.streamnamealias.ModuleStreamNameAlias</Class>
			</Module>
		</Modules>
		<!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
		<Properties>
			<Property>
    				<Name>smoothStreamingMediaMajorVersion</Name>
    				<Value>2</Value>
    				<Type>Integer</Type>		
			</Property>
			<Property>
				<Name>aliasMapFileStream</Name>
				<Value>${com.wowza.wms.context.VHostConfigHome}/conf/aliasmap.stream.txt</Value>
			</Property>
			<Property>
				<Name>aliasMapFilePlay</Name>
				<Value>${com.wowza.wms.context.VHostConfigHome}/conf/aliasmap.play.txt</Value>
			</Property>
			<Property>
				<Name>aliasMapPathDelimiter</Name>
				<Value>/</Value>
			</Property>
			<Property>
				<Name>aliasMapNameDelimiter</Name>
				<Value>=</Value>
			</Property>
			<Property>
				<Name>aliasMapDebug</Name>
				<Value>true</Value>
				<Type>Boolean</Type>
			</Property>	
		</Properties>	
	</Application>
</Root>

The output of server

Configure logging: file:///usr/local/WowzaMediaServer/conf/log4j.properties
INFO server server-start Wowza Media Server 2 Developer 2.0.0 build22912 -
INFO server comment - Serial number: XXXXX-XXXXX-XXXXX-XXXXX-XFDCJ
INFO server comment - Maximum connections: 10
INFO server comment - Hardware Available Processors: 2
INFO server comment - Hardware Physical Memory: 1849MB/1996MB
INFO server comment - Hardware Swap Space: 5843MB/5843MB
INFO server comment - Max File Descriptor Count: 1024
INFO server comment - Open File Descriptor Count: 37
INFO server comment - OS Name: Linux
INFO server comment - OS Version: 2.6.31-14-generic-pae
INFO server comment - OS Architecture: i386
INFO server comment - Java Name: Java HotSpot(TM) Server VM
INFO server comment - Java Vendor: Sun Microsystems Inc.
INFO server comment - Java Version: 1.6.0_15
INFO server comment - Java VM Version: 14.1-b02
INFO server comment - Java Spec Version: 1.6
INFO server comment - Java Home: /usr/lib/jvm/java-6-sun-1.6.0.15/jre
INFO server comment - Java Max Heap Size: 739MB
INFO server comment - Java Architecture: 32
INFO server comment - CMDInterface now listening: [any]:8083
INFO server comment - _defaultVHost_ home directory: /usr/local/WowzaMediaServer
INFO vhost vhost-start _defaultVHost_ -
INFO vhost comment _defaultVHost_ Bind attempt ([any]:1935)
INFO vhost comment _defaultVHost_ Bind successful ([any]:1935)
INFO vhost comment _defaultVHost_ Bind attempt ([any]:8086)
INFO vhost comment _defaultVHost_ Bind successful ([any]:8086)
INFO server comment - ModuleStreamNameAlias.onAppStart: aliasMapFileStream: /usr/local/WowzaMediaServer/conf/aliasmap.stream.txt
INFO server comment - ModuleStreamNameAlias.onAppStart: aliasMapFilePlay: /usr/local/WowzaMediaServer/conf/aliasmap.play.txt
INFO application app-start _definst_ rtplive/_definst_
INFO server comment - ModuleStreamNameAlias.nameToAlias[play]: streamName:ch7.stream alias:{pattern: "*" alias:"${Stream.Name}" wildcardMatches:{[0]: "ch7.stream"}} result:ch7.stream
INFO server comment - RTPMediaCaster.create
INFO server comment - RTPMediaCaster.init
INFO server comment - RTPMediaCaster.Reconnector: start
INFO server comment - ModuleStreamNameAlias.nameToAlias[stream]: streamName:ch7.stream alias:{pattern: "*" alias:"${Stream.Name}" wildcardMatches:{[0]: "ch7.stream"}} result:ch7.stream
INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: /usr/local/WowzaMediaServer/content/ch7.stream
INFO stream create - -
INFO server comment - HTTPStreamManager.onHTTPRequest: Publish stream successfully started [rtplive/_definst_]: ch7.stream
INFO stream publish ch7.stream -
INFO server comment - RTPMediaCaster.Reconnector: stop
INFO server comment - RTPMediaCaster.resetConnection: 
INFO stream unpublish ch7.stream -
INFO stream destroy ch7.stream -
INFO server comment - RTPMediaCaster.Reconnector: start
INFO server comment - ModuleStreamNameAlias.nameToAlias[stream]: streamName:ch7.stream alias:{pattern: "*" alias:"${Stream.Name}" wildcardMatches:{[0]: "ch7.stream"}} result:ch7.stream
INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: /usr/local/WowzaMediaServer/content/ch7.stream
INFO stream create - -
INFO stream publish ch7.stream -
INFO server comment - RTPMediaCaster.Reconnector: stop

and my alias.stream file

*=${Stream.Name}
ch1=rtsp://x.x.x.x:1935/rtplive/ch1.stream
ch2=rtsp://x.x.x.x:1935/rtplive/ch2.stream
ch3=rtsp://x.x.x.x:1935/rtplive/ch3.stream
ch7=rtsp://x.x.x.x:1935/rtplive/ch7.stream

I know the alias file isn’t right but after re-going over the readme I am not sure what I am doing wrong.

Im currently using the alias file to do some fancy foldering, i’ve currently got it setup like this

:=${Wildcard.Match1}:${VHost.Name}/${Wildcard.Match2}

*=${VHost.Name}/${Wildcard.Match1}

Which works for almost everything other then adaptive streaming.

The problem I have is as follows.

I query the smil file -> smil:bigbuckbunny.smil

alias changes it to

smil:/test.com/bigbunny.smil

This works, the problem is that it then calls

mp4:/test.com/test.com/bigbunny-300kb.mp4

instead of

mp4:/test.com/bigbunny-300kb.mp4

anyone got any suggestions on how I could work around this (or could it be a bug?).

it is using