Detect if the stream being published to Wowza is an SRT stream or not.

The latest version of Wowza adeptly supports SRT ingest. Here is an article from Wowza that explains how to publish an SRT stream from Wirecast and get it into Wowza through Mediacaster. It is a fairly simple step by step to getting started with SRT. But now we are left with the dilemma of how to detect this on the server-side within a module. In other words how to know in a module if the publishing stream is an SRT stream or not. Here is a code snippet from the onPublish method of an IMediaStreamActionNotify implementation that demonstrates how to check if the stream is an SRT stream.


@Override
public void onPublish(IMediaStream stream, String arg1, boolean arg2, boolean arg3) {
   
    getLogger().info(".onPublish => stream " + arg1);
   
    RTPStream rtpStream = stream.getRTPStream();
    if (rtpStream != null)
    {      
        if(rtpStream.isSRT())
        {
            getLogger().info("SRT stream detected => stream name : " + arg1);
        }
    }
}

If you have trouble getting emails from this domain, please check your email spam & mark messages from flashvisions.com as 'Not Spam'

Comments are closed