Control which streams get transcoded with the Wowza Streaming Engine Java API

You can use the Wowza Streaming Engine™ Java API to control which streams get transcoded.

Below is a simple module that uses the ILiveStreamTranscoderControl interface to control which streams get transcoded:

package com.wowza.wms.plugin.test.module;

import com.wowza.wms.stream.*;
import com.wowza.wms.stream.livetranscoder.*;
import com.wowza.wms.module.*;
import com.wowza.wms.application.*;

public class ModuleTranscoderControlByStream extends ModuleBase
{
	class TranscoderControl implements ILiveStreamTranscoderControl
	{
		public boolean isLiveStreamTranscode(String transcoder, IMediaStream stream)
		{
			// here is there you return true or false if you want stream transcoded
			if ( stream.isTranscodeResult() )
			{
				return false;
			} else {
				return true;
			}
			
		}
	}
	
	public void onAppStart(IApplicationInstance appInstance)
	{
		appInstance.setLiveStreamTranscoderControl(new TranscoderControl());
	}
}

To add this module to your application, edit [install-dir]/conf/[application]/Application.xml and add this module entry as the last <Module> entry in the <Modules> list:

<Module>
	<Name>ModuleTranscoderControlByStream</Name>
	<Description>ModuleTranscoderControlByStream</Description>
	<Class>com.wowza.wms.plugin.test.module.ModuleTranscoderControlByStream</Class>
</Module>