Determine if a stream is available over HTTP

Is there a way to check and see if Wowza has a stream by a given name over HTTP? IE: for a live application, does a live stream exist, for a vod application, does a vod stream exist?

A couple ways - one would be to query the serverinfo HTTPProvider and parse the output - the other would be to build a custom HTTPProvider that does the checking on the backend.

-Ian

You can get path with IApplicationInstance.getStreamStoragePath(), then use Java file API to see if file exists

Richard

What’s the class name of the serverinfo HTTP provider?

Also, could you explain how I could find out if a VOD application has a stream or not? I’m trying to write a HTTPProvider for this purpose.

What’s the logic for finding if an application has a stream? IVHost > IApplication > IApplicationInstance > getStreams > ?

Hi everybody,

Thanks for posting in our forum. An alternative to know whether a stream is connected or not via REST API would be to query

http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/live/instances/definst

or

http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/live/instances/definst/incomingstreams/streamName/monitoring/current

which can be used also for VOD applications and will inform on whether the stream is running/connected or not. Here is a related post: https://stackoverflow.com/questions/38814056/how-to-get-all-active-streams-from-wowza-server

Regarding the serverinfo HTTPProvider option, it comes enabled by default with Wowza Streaming Engine, under VHost.xml:

<HTTPProvider> 

<BaseClass>com.wowza.wms.http.HTTPServerInfoXML</BaseClass>

<RequestFilters>serverinfo*</RequestFilters>

<AuthenticationMethod>admin-digest</AuthenticationMethod> 

</HTTPProvider>

Here you can find more HTTPProvider examples for your reference: https://www.wowza.com/docs/http-provider-code-examples-for-wowza-media-server

Full Java API reference here: https://www.wowza.com/resources/serverapi/

Warm regards,

Alberto Cabaleiro

Wowza Support Engineer