You can use the HTTPStreamControl module for Wowza Streaming Engine™ media server software to control Stream class streams and playlists through HTTP requests. Use it to dynamically create, set up, and start new live Stream class streams from static and live sources, and to add sources to existing Stream class streams. For extra control, use this HTTP provider with the StreamPublisher module.
- Be careful when using HTTPStreamControl with the StreamPublisher module. Changes made to one module may not be picked up in the other module.
- HTTPStreamControl uses internal ApplicationInstance properties to store references to streams and playlists. Do not use the same name for a stream and a playlist. Using the same name for both will have unexpected results because the last object defined (either the stream or the playlist) will be stored in the properties and will overwrite what's already there.
Wowza Streaming Engine 4.0.0 or later is required.
- Download wse-plugin-httpstreamcontrol.zip.
- Extract the contents from the downloaded (zipped) package, and then copy the lib/wse-plugin-httpstreamcontrol.jar file from the package to the lib folder in your Wowza Streaming Engine installation ([install-dir]/lib).
- Restart Wowza Streaming Engine.
- Navigate to [install-dir]/conf and open VHost.xml in a text editor.
- Locate the section <HostPortList>/<HostPort>/<Name>Default Streaming</Name>.
- Add the following HTTP provider definition to the <HTTPProviders> section:
<HTTPProvider> <BaseClass>com.wowza.wms.plugin.HTTPStreamControl</BaseClass> <RequestFilters>streamcontrol*</RequestFilters> <AuthenticationMethod>none</AuthenticationMethod> </HTTPProvider>
Important: The new HTTP provider must be above the last HTTP provider that's used to resolve all requests that aren't handled by other providers. RequestFilters identifies the last part of the URL that's checked to see if the HTTP provider can handle the request. It isn't the name of a custom image.
To make it harder for someone to detect that this is a referer check, change the request filter to your own value, but note that stream extensions that aren't currently used elsewhere in the server won't work.
Save and close VHost.xml, and then restart Wowza Streaming Engine.
Control the playlist through an HTTP request, passing the required variables as query string parameters.
Add a new stream:
Add a new playlist:
Add a playlist item:
Open the playlist on a stream. By default, start is 0 and length is -1. For live streams, use -2 for start. Any positive integer for length plays the source for that number of seconds:
Play the next item on the playlist:
Remove an item from a playlist:
Stop a stream:
- Get the source code on GitHub