Hi Guys,
Is there a special setting we had to make the smoothstreaming session enter the method onHTTPSessionCreate(IHTTPStreamerSession session) of the interface IModuleOnHTTPSession?
We are currently building a module that would redirect connections to a different server using IModuleOnHTTPSession and It works alright with HLS and MPEG DASH but the smoothstreaming session dont even seemed to enter the method onHTTPSessionCreate.
We are using Wowza Streaming Engine 4 Perpetual Edition 4.1.2 build13947 on our production environment and we also tried it with Wowza Streaming Engine 4 Perpetual Edition 4.2.0.01 build15394 but both of them shows the same problem.
Here is the snippet of the code we are using:
public class LoadBalancerMain extends ModuleBase implements IModuleOnHTTPSession, IModuleOnHTTPSmoothStreamingSession {
private static final Class<LoadBalancerMain> CLASS = LoadBalancerMain.class;
private static final String TAG = "LoadBalancerMain";
SVDBConnection SVCon = null;
String methodName = "";
public void onAppStart(IApplicationInstance appInstance) {
SVCon = new SVDBConnection(appInstance);
}
@Override
public void onHTTPSessionCreate(IHTTPStreamerSession session) {
methodName = "onHTTPSessionCreate(IHTTPStreamerSession session)";
//int sessionIP = InetAddresses.coerceToInteger(InetAddresses.forString(session.getIpAddress()));
String sessionIP = session.getIpAddress();
String streamName = session.getStreamName();
String queryParameters = session.getQueryStr();
String appName = session.getAppInstance().getApplication().getName();
WMSLoggerFactory.getLogger(CLASS).info(TAG + ": " + methodName + ": IPADDRESS: " + session.getIpAddress() + ", URL: " + session.getUri());
String urlRedirect = SVCon.getURL(sessionIP, streamName, appName, session.getSessionProtocol(), queryParameters);
if (!urlRedirect.isEmpty()) {
WMSLoggerFactory.getLogger(CLASS).info(TAG + ": " + methodName + ": IPADDRESS: " + session.getIpAddress() + ", URL Redirect: " + urlRedirect);
session.redirectSession(urlRedirect);
}
else {
WMSLoggerFactory.getLogger(CLASS).info(TAG + ": " + methodName + ": IPADDRESS: " + session.getIpAddress() + ", URL Redirect: Unable to find node");
session.rejectSession();
}
}
@Override
public void onHTTPSessionDestroy(IHTTPStreamerSession session) {
// TODO Auto-generated method stub
}
@Override
public void onHTTPSmoothStreamingSessionCreate(HTTPStreamerSessionSmoothStreamer session) {
// TODO Auto-generated method stub
methodName = "onHTTPSmoothStreamingSessionDestroy(HTTPStreamerSessionSmoothStreamer session)";
//int sessionIP = InetAddresses.coerceToInteger(InetAddresses.forString(session.getIpAddress()));
String sessionIP = session.getIpAddress();
String streamName = session.getStreamName();
String queryParameters = session.getQueryStr();
String appName = session.getAppInstance().getApplication().getName();
WMSLoggerFactory.getLogger(CLASS).info(TAG + ": " + methodName + ": IPADDRESS: " + session.getIpAddress() + ", URL: " + session.getUri());
String urlRedirect = SVCon.getURL(sessionIP, streamName, appName, session.getSessionProtocol(), queryParameters);
if (!urlRedirect.isEmpty()) {
WMSLoggerFactory.getLogger(CLASS).info(TAG + ": " + methodName + ": IPADDRESS: " + session.getIpAddress() + ", URL Redirect: " + urlRedirect);
session.redirectSession(urlRedirect);
}
else {
WMSLoggerFactory.getLogger(CLASS).info(TAG + ": " + methodName + ": IPADDRESS: " + session.getIpAddress() + ", URL Redirect: Unable to find node");
session.rejectSession();
}
}
@Override
public void onHTTPSmoothStreamingSessionDestroy(HTTPStreamerSessionSmoothStreamer session) {
// TODO Auto-generated method stub
}
As you can see in the code we even tried to implement IModuleOnHTTPSmoothStreamingSession just to make sure but still to no avail.
When an HLS or MPEg DASH client connects to this module we can see from the logs that they are getting redirected and content plays successfully.
2015-08-28 10:36:49 CEST comment server INFO 200 - LoadBalancerMain: onHTTPSessionCreate(IHTTPStreamerSession session): IPADDRESS: <Intentionally removed>, URL Redirect: http://<Intentionally removed>/SVliveTr1/33.smil/playlist.m3u8?device_id=ccfa00a8f508&user_id=1055&signature=29231ca31126547fb63181f26847937ae7786248&expire=2015-08-28%2011:36:47&id_channel=6033 - - - 61.658 - - - - -- - - - - - - - - - - - - - - - - - - -
But with Smoothstreaming we receive this error and no logs at all from the module:
2015-08-28 10:37:39 CEST comment server WARN 200 - HTTPStreamerAdapterSmoothStreamer.onManifest: LiveStreamPacketizer not found [52_720p]: smoothstreamingpacketizer - - - 111.23 - - - - - - - - - -- - - - - - - - - - - - - - -
2015-08-28 10:37:39 CEST comment server WARN 200 - HTTPStreamerAdapterSmoothStreamer.onManifest: LiveStreamPacketizer not found [52_360p]: smoothstreamingpacketizer - - - 111.231 - - - - - - - - - -- - - - - - - - - - - - - - -
2015-08-28 10:37:39 CEST comment server WARN 200 - HTTPStreamerAdapterSmoothStreamer.onManifest: LiveStreamPacketizer not found [52_240p]: smoothstreamingpacketizer - - - 111.232 - - - - - - - - - -- - - - - - - - - - - - - - -
Seems like Wowza is looking for the streams inside the application and it’s not finding them which is logical since the streams are not in this application.
Is this a bug or we are missing something?
Regards,
Ferdinand