Modules

  • How to receive SAP packets and process them

    We were asked to look at SAP (Session Announcement Protocol) and how we could make it work with Wowza Streaming Engine. It turns out it is a relatively simple protocol but there are few gotchas which did trip us up however we have come up with an application module that should meet most needs along with a server listener to start applications when the server starts (so applications can listen for SAP packets). If you are not completely familiar with SAP, do have a Google, however it is possible that multiple addresses can be announced to, thus the simplest method was to provide properties at the application level so each application can listen for different addresses if needed. The SAP protocol also does not provide a ‘stream name’ so this presented a challenge, as in order for Wowza Streaming Engine to take in a stream it does need to have a name/filename. To ...

  • How To – Do Stream Motion Detection

    We have been asked to look at several features relating to the transcoder, one being motion detection. We did a little digging and it appears Wowza Streaming Engine provides access to frames after they have been decoded. There are several posts such as Stack OverFlow and a somewhat more complete example Wowza Code Example This module demonstrates how to perform motion detection on an incoming stream. It does require the use of the Wowza Streaming Engine transcoder as it does require access to the decoded frames. It is only a proof of concept module so there is no doubt room for improvement. You will need to configure the module in the Application.xml, as the last module in the Modules section as follows Module setup: <Module> <Name>MotionDetection</Name> <Description>MotionDetection</Description> <Class>guru.thewowza.example.transcoder.MotionDetect</Class> </Module> You do also need to configure the Application.xml to use the transcoder as follows Set the the LiveStreamTranscoder so have ‘transcoder’ set, this can also be done in the Wowza Streaming Engine Manager <LiveStreamTranscoder>transcoder</LiveStreamTranscoder> You ...

  • HTTP Provider to serve up VOD assets

    This module allows you to pass in a path to a file name and it’ll serve it up for download. You essentially define a default content path/directory or the content/ folder is the default. Then any file that exists within it, is game for download. 1. Place the following provider under you 8086 HostPort within your VHost.xml: <HTTPProvider> <BaseClass>com.example.videolist.DirectFileDownload</BaseClass> <RequestFilters>download*</RequestFilters> <AuthenticationMethod>none</AuthenticationMethod> </HTTPProvider> 2. Optionally define the fileDownloadContentPath property that will act as your root directory (in your VHost.xml general properties section): <Property> <Name>fileDownloadContentPath</Name> <Type>String</Type> </Property> 3. Put the jar file below into your /lib directory. 4. Restart Wowza and go to the http provider: localhost:8086/download?filename=sample.mp4 Direct Download

  • Set up access times for streams per application

    This module will allow you to specify times or date/time combinations that will define when streams that use a specific application are allowed to be viewed. You can specify multiple date ranges or just times that will be used daily.

  • Verify a VOD asset exists via HTTP Provider

    We’ve had recent requests for an http provider that will verify existence of a particular VOD asset.

  • Quick way to return JSON from your HTTP Provider

    This is a convenient built-in way to return json from your HTTP Provider

  • Start stream on demand through medicaster

    This module will look for rtmp/http playback requests for .stream or .sdp files and initiate medicaster for the stream if not already started.

  • Module to allow specific playback protocols and reject others

    This module will allow you to specify which playback protocols you’d like to allow and reject any others.

  • How to add a HTTP Provider programmatically when a VHost starts

    It is possible to add a HTTP Provider when a VHost starts running. This method potentially removes any mistakes and also means only a small amount of configuration is needed in the Server.xml. In order to add a HTTP Provider you need to write a VHost listener and also have a HTTP Class available, both are shown below VHost Listener Class package guru.thewowza.example.autoaddHTTPProvider; import java.util.List; import com.wowza.wms.amf.AMFDataList; import com.wowza.wms.client.IClient; import com.wowza.wms.http.IHTTPProvider; import com.wowza.wms.http.IHTTPProvider2; import com.wowza.wms.request.RequestFunction; import com.wowza.wms.vhost.HostPort; import com.wowza.wms.vhost.HostPortList; import com.wowza.wms.vhost.IVHost; import com.wowza.wms.vhost.IVHostNotify; public class VHost implements IVHostNotify { public void onVHostClientConnect(IVHost vhost, IClient inClient,RequestFunction function, AMFDataList params) {} public void onVHostCreate(IVHost vhost) {} public void onVHostInit(IVHost vhost) { // We check if the VHost is _defaultVHost_ as we do not initialise // You could make it add to any VHost if you wish. if ( vhost.getName().equals("_defaultVHost_") ) { HostPortList PortList = vhost.getHostPortsList(); for (int ports=0;ports<PortList.size(); ports++ ) { HostPort ThisPort = PortList.get(ports); ...

  • Auto record specific streams

    This module allows you to specify a comma delimited list of streams (as a property) and it will auto record them when published.