- Newest
- Most votes
- Most comments
Broadly the thing to consider is when the source stops the encode stops. I've set mine up to grab last frame when there is no input and it sounds like your too. In Output Group try changing your input loss action from Emit Output to Pause Output.
You may want to try using the Pause with the AWS MediaLive Schedule function. This should be done with the MediaLive channel running. Choose the pipeline(s) you want to pause. Schedule events can be create using the MediaLive console or through API request.
- ML Channel -> Schedule tab -> Create -> Action Type = Pause, Pause Pipeline
- ML Channel -> Schedule tab -> Create -> Action Type = Pause, Unpause Pipeline
Thank you for the suggestion.
Assuming that you want to end the archive to end after the input source stops, you could adapt this recently published Lambda function for MediaLive.
The Lambda is written to MediaLive alerts in CloudWatch (by default, 'Video Not Detected' events ) and send an input switch command to the MediaLive Channel. You could easily alter that code to send a Channel Stop command instead of an input switch. I suggest waiting 30s then probing the Channel logs to confirm the Alert has not cleared, then stop the channel.
Link: https://github.com/aws-samples/aws-medialive-fallback-switcher-lambda
Thank you so much for the suggestion. Good idea. I found sending an HLS output directly to the S3 bucket as the easiest option. Then I have the Input Loss action and there is no need for transcoding.
I see that now. Wow.
Maybe. There has to be a way to end the encode when the source stops.
Was there a resolution to this post? We are facing a similar issue where by MediaLive continues to archives blank 15 mins video chunks to S3 even after the input stream is stopped.
Not really. You may use "HLS output group to S3" to be able to assign a "Imput Loss Action".
re: 'Was there a resolution to this post? We are facing a similar issue where by MediaLive continues to archives blank 15 mins video chunks to S3 even after the input stream is stopped."
Yes. You have at least two options per the answers above: alter input loss behavior to not emit black; and/or send and automated stop command to the channel.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a month ago
Thank you Bruce. Unfortunately the Archive Output Group doesn't have an Input Loss Action...?