interface VideoBlackFailoverProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaLive.Alpha.VideoBlackFailoverProps |
Go | github.com/aws/aws-cdk-go/awsmedialivealpha/v2#VideoBlackFailoverProps |
Java | software.amazon.awscdk.services.medialive.alpha.VideoBlackFailoverProps |
Python | aws_cdk.aws_medialive_alpha.VideoBlackFailoverProps |
TypeScript (source) | @aws-cdk/aws-medialive-alpha ยป VideoBlackFailoverProps |
Properties for a video-black failover condition.
Example
declare const stack: Stack;
declare const primaryInput: medialive.IInput;
declare const secondaryInput: medialive.IInput;
declare const audioSelector: medialive.AudioSelector;
declare const video: medialive.EncodeConfiguration;
declare const audio: medialive.EncodeConfiguration;
declare const bucket: s3.IBucket;
new medialive.Channel(stack, 'Channel', {
inputs: [{
input: primaryInput,
automaticInputFailover: {
secondaryInput,
inputPreference: medialive.InputPreference.PRIMARY_INPUT_PREFERRED,
errorClearTime: Duration.seconds(3),
failoverConditions: [
medialive.FailoverCondition.inputLoss({ threshold: Duration.millis(1500) }),
medialive.FailoverCondition.audioSilence({ audioSelector, threshold: Duration.seconds(2) }),
medialive.FailoverCondition.videoBlack({ blackDetectThreshold: 0.1, threshold: Duration.seconds(1) }),
],
},
}, {
// The secondary input must also be attached to the channel as its own input.
input: secondaryInput,
}],
outputGroups: [
medialive.OutputGroupConfiguration.hls({
name: 'hls',
destinations: [medialive.OutputDestination.toBucket(bucket, 'live/stream')],
outputs: [{ encodes: [video, audio], outputName: 'hls_out' }],
}),
],
});
Properties
| Name | Type | Description |
|---|---|---|
| black | number | The fraction of white (0.0โ1.0) below which a pixel is considered black. Every pixel in a frame must be below this threshold for the frame to count as black. For example, 0.1 means 10% white (90% black). |
| threshold? | Duration | How long the content must be black before failover occurs. |
blackDetectThreshold?
Type:
number
(optional, default: MediaLive service default)
The fraction of white (0.0โ1.0) below which a pixel is considered black. Every pixel in a frame must be below this threshold for the frame to count as black. For example, 0.1 means 10% white (90% black).
threshold?
Type:
Duration
(optional, default: MediaLive service default)
How long the content must be black before failover occurs.

.NET
Go
Java
Python
TypeScript (