How can we get all incoming streams with their statistics (like codec, bitrate, total connections, etc) in single API request
Ok great, well your options are to reach out to our Professional Services team here at Wowza or you can post in our Hire a Consultant forum space where we have 3rd party wowza experts willing to help for fees they will discuss with you privately.
We want consolidated information for all the stream files.
-
whether stream file is connected or no.
-
what are the current outbound connection for each stream
-
current bit rate (both in and out) for each stream
we have not found any Rest API which gives this information so far. Could you help
Please use the search bar above for forums and you will see multiple posts on this question already.
You can try typing in “stream statistics API”.
Thanks for your response. We already searched but not found exactly as per requirement.
Currently, For each stream, we need to trigger a request to get statics.
The requirement is:- In single API requests for particular applications get all streams with their respective statics. So no multiple API requests for each stream.
Thank you for explaining in more detail what you are looking for. I can help explain your options.
The information you are looking to capture isn’t all available through a single API endpoint and if using the REST api, some of it isn’t available at all.
What you would need to do is create something using the Java api to capture the information in one place and then use a HTTPProvider as an access point to be able to retrieve the information on demand.
This would require some custom java development work on your part so if this is something that you would want to do then please let me know and I can point you in the right direction.
The following javadocs show the api methods you would need to implement.
From IMediaStream,
getPublishBitrateVideo
getPublishBitrateAudio
getPublishFramerateVideo
getPublishKeyFrameIntervalsVideo
Use the above to get current dynamic values for the stream.
From IMediaStreamActionNotify3
onCodecInfoAudio
onCodecInfoVideo
The codecInfo object for each of these events will contain the static information about the stream. (codec information, profile & level, frame sizes, sample rate & channel count, etc).
Yes, we would like to develop this HTTPProvider as we want dynamic information in a single request. so this seems the only possible way right now.
We have an article on statistics:
https://www.wowza.com/docs/statistics-query-examples
From the article:
Get current statistics for an incoming stream
View current statistics for an incoming stream (myStream in this example):
curl -X GET --header 'Accept:application/json; charset=utf-8' --header 'Content-Type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/incomingstreams/myStream/monitoring/current
The command should return a response that looks something like this (if the application is running, you should see real values, not zeros):
{ "serverName": "_defaultServer_", "uptime": 0, "bytesIn": 0, "bytesOut": 0, "bytesInRate": 0, "bytesOutRate": 0, "totalConnections": 0, "connectionCount": { "RTMP": 0, "MPEGDASH": 0, "CUPERTINO": 0, "SANJOSE": 0, "SMOOTH": 0, "RTP": 0 }, "applicationInstance": "_definst_", "name": "myStream" }