You can use the HTTPStreamControl plugin 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.
This repo includes a compiled version.
Wowza Streaming Engine™ 4.0.0 or later is required.
Control the playlist through an HTTP request, passing the required variables as query string parameters.
- Add a new stream:
curl "http://localhost:8086/streamcontrol?appName=live&action=addNewStream&streamName=testStream"
- Add a new playlist:
curl "http://localhost:8086/streamcontrol?appName=live&action=addNewPlaylist&playlistName=p1"
- Add a playlist item:
curl "http://localhost:8086/streamcontrol?appName=live&action=addItemToPlaylist&playlistName=p1&streamName=testStream&playlistItemName=sample.mp4"
- 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:
curl "http://localhost:8086/streamcontrol?appName=live&action=openPlaylistOnStream&playlistName=p1&streamName=testStream"
- Play the next item on the playlist:
curl "http://localhost:8086/streamcontrol?appName=live&action=playNextPlaylistItem&streamName=testStream"
- Remove an item from a playlist:
curl "http://localhost:8086/streamcontrol?appName=live&action=removeItemFromPlaylist&playlistItemName=sample.mp4&streamName=testStream"
- Stop a stream:
curl "http://localhost:8086/streamcontrol?appName=live&action=stopStream&streamName=testStream"
To use the compiled version of this module, see Control Stream class streams dynamically with a Wowza Streaming Engine Java module.
Wowza Streaming Engine Server-Side API Reference
How to extend Wowza Streaming Engine using the Wowza IDE
How to use server-side modules and HTTP Providers
Wowza Media Systems™ provides developers with a platform to create streaming applications and solutions. See Wowza Developer Tools to learn more about our APIs and SDKs.
This code is distributed under the Wowza Public License.