Wowza Custom IMediaWriterActionNotify

Hi,

Please help me, I have been trying to write a custom module for Wowza to send file directly to s3 after the stream file is recorded. But there is some problem. No matter how I try wowza doesn’t seem to pick up any module or print out any log relevant to the module even when I intentionally use the wrong module name. There is still no error print out. I really don’t know how to fix it.

this is the module I have been writing

package abc.def.efg;
import java.io.*; 
import java.util.*;
import com.wowza.wms.application.*;
import com.wowza.wms.module.*;
import com.wowza.wms.stream.*;
public class LiveStreamRecordListener extends ModuleBase
{
	class WriteListener implements IMediaWriterActionNotify
	{
		public void onFLVAddMetadata(IMediaStream stream, Map<String, Object> extraMetadata)
		{
			getLogger().info("ModuleWriteListener.onFLVAddMetadata["+stream.getContextStr()+"]");
		}
		public void onWriteComplete(IMediaStream stream, File file)
		{
			getLogger().info("ModuleWriteListener.onWriteComplete["+stream.getContextStr()+"]: "+file);
		}
	}
	
	public void onAppStart(IApplicationInstance appInstance)
	{
		getLogger().info("Run here");
		appInstance.addMediaWriterListener(new WriteListener());
		getLogger().info("Run here");
	}
}

Developing custom module for Wowza is seriously painful. Work in Eclipse with no maven can’t integrate the module into your existing project. I hope we can change this in near future…

Thanks

Tai Khuu

Did you restart the Wowza Streaming Engine service after you moved your generated jar to the %WOWZA_HOME_DIR%/lib folder?

On Windows:

  1. Press WIN key + R, type services.msc in the Run dialog box, and then click OK.

  2. In the Services window, right-click Wowza Streaming Engine 4.6.0 and then click restart.

On Linux:

sudo service WowzaStreamingEngine restart

I did, I event try to put random text to the qualified class name and restart app and server. still nothing happen. It should say that the class is incorrect or something. there is no error. no log. no thing. I checked the log in /var/log and log in Wowza home folder.