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))
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());
}
}
}
}