# How to start or stop wowza transcoder throguth HTTP Provider

**URL:** <https://community.wowza.com/t/how-to-start-or-stop-wowza-transcoder-throguth-http-provider/47400>\
**Category:** Wowza Developer Dojo\
**Created:** [September 23, 2016, 12:51pm UTC](https://community.wowza.com/t/how-to-start-or-stop-wowza-transcoder-throguth-http-provider/47400 "2016-09-23T12:51:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruno\_Silva](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@Bruno\_Silva](https://community.wowza.com/u/Bruno_Silva)\
**Post date:** [September 23, 2016, 12:51pm UTC](https://community.wowza.com/t/how-to-start-or-stop-wowza-transcoder-throguth-http-provider/47400/1 "2016-09-23T12:51:38Z")

</div>

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?

```auto
public class MYHTTPProvider extends HTTProvider2Base {
		 
	public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp) 
	{		
		if (!doHTTPAuthentication(vhost, req, resp)) 
			return;	
		
		Map<String, List<String>> query_map = req.getParameterMap();
		if query_map.containsKey("mediainstance"))
		{
			try
			{				
				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();
				appInstance.setLiveStreamTranscoderControl(transcoder_control);							
			}
			catch(Exception e)
			{
				system.out.println("HTTPListener: " + e.toString());					
			}
		}				
		
	}	
}

```

---

<div class="post-metadata">

**Author:** ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)\
**Post date:** [October 28, 2016, 2:23pm UTC](https://community.wowza.com/t/how-to-start-or-stop-wowza-transcoder-throguth-http-provider/47400/2 "2016-10-28T14:23:11Z")

</div>

Hi,

There is a module that allows you to [control which streams are transcoded](https://www.wowza.com/docs/how-to-control-which-streams-get-transcoded-moduletranscodercontrol%28ModuleTranscoderControl%29). This is a configured module and not an HTTPProvider, but it may suffice for your workflow.

Michelle

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [November 3, 2016, 2:43pm UTC](https://community.wowza.com/t/how-to-start-or-stop-wowza-transcoder-throguth-http-provider/47400/3 "2016-11-03T14:43:40Z")

</div>

Hi,

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](https://www.wowza.com/docs/how-to-duplicate-streams-to-another-application-instance-moduleduplicatestreams%28ModuleDuplicateStreams%29).

Regards,

Jason

---

<div class="post-metadata">

**Author:** ![Bruno\_Silva](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@Bruno\_Silva](https://community.wowza.com/u/Bruno_Silva)\
**Post date:** [October 31, 2016, 12:12pm UTC](https://community.wowza.com/t/how-to-start-or-stop-wowza-transcoder-throguth-http-provider/47400/4 "2016-10-31T12:12:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bruno\_Silva](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@Bruno\_Silva](https://community.wowza.com/u/Bruno_Silva)\
**Post date:** [November 11, 2016, 12:28pm UTC](https://community.wowza.com/t/how-to-start-or-stop-wowza-transcoder-throguth-http-provider/47400/5 "2016-11-11T12:28:29Z")

</div>

Hi

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
