Lets say i have Stream ABC and I start/Stop stream so many times in a day. I want to get the duration of stream between each Start/Stop event. I have the logs in the Database.
You could call the REST API at any time and get the stream “uptime” which tells you for how long a stream has been published. The API edge for this request would be:
/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/appName/instances/_definst_/incomingstreams/streamName/monitoring/current
If you can’t predict when the stream might start/stop then you should be able to utilize the IMediaStreamActionNotify interface to update/insert to your database during onPublish and onUnpublish events.
https://www.wowza.com/resources/serverapi/com/wowza/wms/stream/IMediaStreamActionNotify.html
Currently in my database the Publish and Stop events are being inserted, can i get the duration directly from the database?