Wowza Community

How to start or stop wowza transcoder throguth HTTP Provider

I have a custom application in my wowza. I need a functionality what I not found yet.

In my application, there are many live streamings, and some need transcoder. Currently all streamings are with transcoder on by default, but is not all clients/viewers needing the transcoded vídeo. We need transcoder to mobile phones get HLS streaming with audio aac, but in fact, we have only 20% or 30% of access to mobile

In this way, my server hardware are very busy, suddenly filling memory RAM, and stucking processors

I need call a url of a HTTP Provider to start or stop the transcoder, just for the streamings that I really need, throught HTTP.

Exist a way to do this?

public class MYHTTPProvider extends HTTProvider2Base {
	public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp) 
		if (!doHTTPAuthentication(vhost, req, resp)) 
		Map<String, List<String>> query_map = req.getParameterMap();
		if query_map.containsKey("mediainstance"))
				String instance = query_map.get("mediainstance").get(0);							
				String app_name = "my_application";				
				IApplicationInstance appInstance = vhost.getApplication(app_name).getAppInstance(instance);
				// until here works as expected
				// how to start or stop transcoder here ?
				ILiveStreamTranscoderControl transcoder_control = appInstance.getLiveStreamTranscoderControl();
			catch(Exception e)
				system.out.println("HTTPListener: " + e.toString());					


There is a module that allows you to control which streams are transcoded. This is a configured module and not an HTTPProvider, but it may suffice for your workflow.



The Wowza transcoder is triggered by the publish event so it’s not currently possible to start/stop the transcoder based on a HTTP Provider.

You may be able to setup a Stream Target using the REST API that pushes the stream to another application (so the publish event is triggered) which is configured to transcode the source and then push it back to the current application. The application configured to transcode the streams that are pushed to it could dynamically copy the streams back to the “live” application using the ModuleDuplicateStreams.



Thanks for the answer, but this does not do what I need.

Using this module, I need to leave in the pre-defined variables (config) a string pattern that tells which streaming use the transcoder.

In my case, I need to set dynamically, on or off the transcoder as a necessity of my system, regardless of the pattern in the name streaming

anyway, thanks for the help


I´m changing the workflow, since I can´t do what I need. I will try to do in other way the publish process of my app.

Thanks for support JasonH