How to fetch all Medialive channels that are receiving video streams?

0

Is there a way to only fetch medialive channels that are currently receiving video streams? I can retrieve my channels fine using the AWS PHP SDK and calling the needed endpoints but there seem to be no indicators in the response whether or not the current channel is receiving video streams. How might one

Edited by: alexyap on Feb 8, 2020 8:46 PM

alexyap
asked 4 years ago326 views
2 Answers
0

alexyap

This will have to be a 2 step process.

  1. Find the channels that are in a Running state, using the list-channel query
  2. For the channels in a running state look in the CloudWatch events to see which ones reported that they are not detecting input anymore.

In CW events you would setup a rule for Service Name "MediaLive", Event Type "MediaLive Channel Alert" and then set a target type you prefer.
There will be an event each time an alert is set, and one when the alert is cleared. In the Event detail, the "alarm_state" field would be set to either SET or CLEARED. You should then use an alert message that is applicable for your input type, e.g. for RTP inputs "Stopped receiving network data on [rtp://localhost:5000]"

The logic you will have to employ would be to look for channels in a RUNNING state, where the SET event for the alarm message you pick was received for X minutes (you decide how long this would be) and where a CLEARED event was not received. A channel that falls in this category would then be a channel that is in a RUNNING state, but not receiving input anymore.

See also https://forums.aws.amazon.com/thread.jspa?threadID=316374&tstart=0

answered 4 years ago
0

thank you so much :)

alexyap
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions