Module Collection

Richards,

has in some place the Source Code for this module: ModuleVideoNameList?

And two questions:

1- this work with S3?

2- If possible call the list from JAVA directly?

Thanks,

Ale

Filip,

Check this post:

https://www.wowza.com/forums/showpost.php?p=33636&postcount=5

Regards,

Ale

Hi,

I’d like to try the ServerListenerStreamPublisher so I followed the readme.

I downloaded the precompiled modules and copied the wms-plugin-collection.jar file under the lib folder.

As written in the readme I created the streamschedle.smil file under the content folder and finally added the directive to the Server.xml file.

When I start the server I got the following java exception.

Pls help.

INFO vhost comment _defaultVHost_ Bind attempt ([any]:8086)
INFO vhost comment _defaultVHost_ Bind successful ([any]:8086)
Error starting: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.wowza.wms.bootstrap.Bootstrap.startServer(Bootstrap.java:248)
        at com.wowza.wms.bootstrap.Bootstrap.main(Bootstrap.java:47)
Caused by: java.lang.NullPointerException
        at com.wowza.wms.plugin.collection.serverlistener.ServerListenerStreamPublisher.onServerInit(ServerListenerStreamPublisher.java:27)
        at com.wowza.wms.server.Server.notifyServerInit(Unknown Source)
        at com.wowza.wms.server.Server.start(Unknown Source)
        ... 6 more

Thank you!

Working as expected…

I’m trying the compiled version of StreamPublisherServerListener, but I have an unexpected error. I have followed all the instructions, but I don’t see anything in the logs.

If I rename the streamscheduler.smil file, I see the “Could not find playlist file”, so the class is loaded. However, if I remove all “stream” and “playlist” sections from the example smil file, i don’t see the “No playlists defined in smil file” error, so I think that there is some exception between lines 38 and 41 of the code.

The problem is that the try-catch block of that code is not logging the exception, so I can’t debug it. Could you put some logging lines in the catch section of the StreamPluisherServerListener.onServerInit ?

I am a new subscriber to your Wowza Server on EC2. I would like to use the SMIL playlist that you so graciously posted. I can understand how to fill in the placeholders, but what do I do with it after it is all ready to be used. If I have to put the file in a folder, how do I actually do this using EC2?

videoeditor

I found the reference in the EC2 guide. Using my favorite ftp client (Filezilla) I entered my public DNS copied to the clipboard from Elastifox, then entered the default username and password, switched to Active mode. I never could log on to the server. Not being able to use ftp will probably limit my usage of this server. I just don’t know how much it will affect our mission yet.

videoeditor

Hi Richard,

Are java sources of serverside modules available to be used as examples and reference?

regards

Haris

I have followed the instructions in the readme.html file, but I’m not able to get the ServerListenerStreamPublisher working. (I’ve uninstalled and reinstalled WMS and was able to play the SimpleVideoStreaming example, so I believe my set up is correct.)

I copied the wms-plugin-collection.jar to /[install-dir]/lib and followed the other instructions in the readme for ServerListenerStreamPublisher. When I restart WMS, I get errors below. I believe it is being caused by adding the ServerListener to /conf/Server.xml.

Here is my Server.xml

<Root>
	<Server>
		<CommandInterface>
			<HostPort>
				<IpAddress>*</IpAddress>
				<Port>8083</Port>
			</HostPort>
		</CommandInterface>
		<AdminInterface>
			<!-- Objects exposed through JMX interface: Server, VHost, VHostItem, Application, ApplicationInstance, MediaCaster, Module, Client, MediaStream, SharedObject, Acceptor, IdleWorker -->
			<ObjectList>Server,VHost,VHostItem,Application,ApplicationInstance,MediaCaster,Module,IdleWorker</ObjectList>
		</AdminInterface>
		<!-- JMXUrl: service:jmx:rmi://localhost:8084/jndi/rmi://localhost:8085/jmxrmi -->
		<JMXRemoteConfiguration>
			<Enable>false</Enable>
			<IpAddress>localhost</IpAddress> <!-- set to localhost or internal ip address if behind NAT -->
			<RMIServerHostName>localhost</RMIServerHostName> <!-- set to external ip address or domain name if behind NAT -->
			<RMIConnectionPort>8084</RMIConnectionPort>
			<RMIRegistryPort>8085</RMIRegistryPort>
			<Authenticate>true</Authenticate>
			<PasswordFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.password</PasswordFile>
			<AccessFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.access</AccessFile>
			<SSLSecure>false</SSLSecure>
		</JMXRemoteConfiguration>
		<UserAgents>Shockwave Flash|CFNetwork|MacNetwork/1.0 (Macintosh)</UserAgents>
		<ServerListeners>
		<ServerListener>        		<BaseClass>com.wowza.wms.plugin.collection.serverlistener.ServerListenerStreamPublisher</BaseClass>
		</ServerListener>
			<!--
			<ServerListener>
				<BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerListener</BaseClass>
			</ServerListener>
			-->
			<!--
			<ServerListener>
				<BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerSender</BaseClass>
			</ServerListener>
			-->
		</ServerListeners>
		<VHostListeners>
			<!--
			<VHostListener>
				<BaseClass></BaseClass>
			</VHostListener>
			-->
		</VHostListeners> 
		<HandlerThreadPool>
			<PoolSize>10</PoolSize>
		</HandlerThreadPool>
		<TransportThreadPool>
			<PoolSize>10</PoolSize>
		</TransportThreadPool>
		<RTP>
			<DatagramStartingPort>6970</DatagramStartingPort>
		</RTP>
		<!-- Properties defined here will be added to the IServer.getProperties() collection -->
		<Properties>
		</Properties>
	</Server>
</Root>

Here is what WMS reports on startup:

Last login: Wed Jun  2 19:12:15 on ttys000
cd /Library/WowzaMediaServer/bin;./startup.sh;exit
craig-rogerss-mac-pro:~ craiger522$ cd /Library/WowzaMediaServer/bin;./startup.sh;exit
./startup.sh: line 20: ulimit: open files: cannot modify limit: Invalid argument
Configure logging: file:///Library/WowzaMediaServer/conf/log4j.properties
Error starting: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at com.wowza.wms.bootstrap.Bootstrap.startServer(Unknown Source)
	at com.wowza.wms.bootstrap.Bootstrap.main(Unknown Source)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:164)
	at com.wowza.wms.util.ServerUtils.loadServerListener(Unknown Source)
	at com.wowza.wms.util.ServerUtils.loadConfigFile(Unknown Source)
	at com.wowza.wms.server.Server.loadConfig(Unknown Source)
	at com.wowza.wms.server.Server.start(Unknown Source)
	... 6 more
logout
[Process completed]

Probably a rookie mistake on my part, but does anyone see where the problem is? Thank you!

Thanks, Richard. Looks like it doesn’t support the Mac platform http://java.sun.com/javase/6/webnotes/install/system-configurations.html

Is that my only option to make ServerListenerStreamPublisher work on a Mac? I also have an XP machine I can dust off…

Thanks, Richard.

I’m not ready to upgrade to Snow Leopard yet, so I’m stuck with the java that’s in OS 10.5.8. But, I switched over to my PC and loaded the newest JDK. I followed the instructions for the ServerListenerStreamPublisher and I get: Failed to play Stream1; stream not found. I simply copied and pasted the info from the readme.html, so I’m not sure what is going wrong. I see in the many forum threads I’ve read that others can get it to work, so I’m sure it’s my fault. Can you see any errors in the code below?

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></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>digest</PlayMethod>
			</Authentication>
			<!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
			<AVSyncMethod>senderreport</AVSyncMethod>
			<MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
			<IdleFrequency>75</IdleFrequency>
			<RTSPSessionTimeout>90000</RTSPSessionTimeout>
			<RTSPMaximumPendingWriteBytes>0</RTSPMaximumPendingWriteBytes>
			<RTSPBindIpAddress></RTSPBindIpAddress>
			<RTSPConnectionIpAddress>0.0.0.0</RTSPConnectionIpAddress>
			<RTSPOriginIpAddress>127.0.0.1</RTSPOriginIpAddress>
			<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>
		<MediaWriter>
			<!-- Properties defined here will override any properties defined in conf/MediaWriter.xml for any MediaWriter loaded by this applications -->
			<Properties>
			</Properties>
		</MediaWriter>
		<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> 
		</Modules>
		<!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
		<Properties>
		</Properties>
	</Application>
</Root>

Server.xml

<Root>
	<Server>
		<CommandInterface>
			<HostPort>
				<IpAddress>*</IpAddress>
				<Port>8083</Port>
			</HostPort>
		</CommandInterface>
		<AdminInterface>
			<!-- Objects exposed through JMX interface: Server, VHost, VHostItem, Application, ApplicationInstance, MediaCaster, Module, Client, MediaStream, SharedObject, Acceptor, IdleWorker -->
			<ObjectList>Server,VHost,VHostItem,Application,ApplicationInstance,MediaCaster,Module,IdleWorker</ObjectList>
		</AdminInterface>
		<!-- JMXUrl: service:jmx:rmi://localhost:8084/jndi/rmi://localhost:8085/jmxrmi -->
		<JMXRemoteConfiguration>
			<Enable>false</Enable>
			<IpAddress>localhost</IpAddress> <!-- set to localhost or internal ip address if behind NAT -->
			<RMIServerHostName>localhost</RMIServerHostName> <!-- set to external ip address or domain name if behind NAT -->
			<RMIConnectionPort>8084</RMIConnectionPort>
			<RMIRegistryPort>8085</RMIRegistryPort>
			<Authenticate>true</Authenticate>
			<PasswordFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.password</PasswordFile>
			<AccessFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.access</AccessFile>
			<SSLSecure>false</SSLSecure>
		</JMXRemoteConfiguration>
		<UserAgents>Shockwave Flash|CFNetwork|MacNetwork/1.0 (Macintosh)</UserAgents>
		<ServerListeners>
		<ServerListener>
        		<BaseClass>com.wowza.wms.plugin.collection.serverlistener.ServerListenerStreamPublisher</BaseClass>
		</ServerListener>
			<!--
			<ServerListener>
				<BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerListener</BaseClass>
			</ServerListener>
			-->
			<!--
			<ServerListener>
				<BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerSender</BaseClass>
			</ServerListener>
			-->
		</ServerListeners>
		<VHostListeners>
			<!--
			<VHostListener>
				<BaseClass></BaseClass>
			</VHostListener>
			-->
		</VHostListeners> 
		<HandlerThreadPool>
			<PoolSize>10</PoolSize>
		</HandlerThreadPool>
		<TransportThreadPool>
			<PoolSize>10</PoolSize>
		</TransportThreadPool>
		<RTP>
			<DatagramStartingPort>6970</DatagramStartingPort>
		</RTP>
		<!-- Properties defined here will be added to the IServer.getProperties() collection -->
		<Properties>
		</Properties>
	</Server>
</Root>

streamschedule.smil

<smil>
<head>
</head>
<body>
<stream name="Stream1"></stream>
<stream name="Stream2"></stream>
<playlist name="pl1" playOnStream="Stream1" repeat="true" scheduled="2009-12-11 16:24:00">
	<video src="mp4:Extremists.m4v" start="5" length="5"/>
	<video src="mp4:Extremists.m4v" start="50" length="5"/>
	<video src="mp4:Extremists.m4v" start="150" length="5"/>
</playlist>
<playlist name="pl1" playOnStream="Stream1" repeat="true" scheduled="2009-12-11 16:25:30">
	<video src="mp4:Extremists.m4v" start="0" length="-1"/>
</playlist>
	
<playlist name="pl1" playOnStream="Stream1" repeat="true" scheduled="2009-12-11 16:26:00">	
	<video src="mp4:Extremists.m4v" start="30" length="5"/>
</playlist>
</body>
</smil>

Well…, that’s embarassing. I goofed and put it in /bin/. Works now.

Thank you for your quick replies!