VideoBlackFailoverProps
- class aws_cdk.aws_medialive_alpha.VideoBlackFailoverProps(*, black_detect_threshold=None, threshold=None)
Bases:
object(experimental) Properties for a video-black failover condition.
- Parameters:
black_detect_threshold (
Union[int,float,None]) – (experimental) 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). Default: - MediaLive service defaultthreshold (
Optional[Duration]) – (experimental) How long the content must be black before failover occurs. Default: - MediaLive service default
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# stack: Stack # primary_input: medialive.IInput # secondary_input: medialive.IInput # audio_selector: medialive.AudioSelector # video: medialive.EncodeConfiguration # audio: medialive.EncodeConfiguration # bucket: s3.IBucket medialive.Channel(stack, "Channel", inputs=[medialive.InputAttachment( input=primary_input, automatic_input_failover=medialive.AutomaticInputFailover( secondary_input=secondary_input, input_preference=medialive.InputPreference.PRIMARY_INPUT_PREFERRED, error_clear_time=Duration.seconds(3), failover_conditions=[ medialive.FailoverCondition.input_loss(threshold=Duration.millis(1500)), medialive.FailoverCondition.audio_silence(audio_selector=audio_selector, threshold=Duration.seconds(2)), medialive.FailoverCondition.video_black(black_detect_threshold=0.1, threshold=Duration.seconds(1)) ] ) ), medialive.InputAttachment( # The secondary input must also be attached to the channel as its own input. input=secondary_input )], output_groups=[ medialive.OutputGroupConfiguration.hls( name="hls", destinations=[medialive.OutputDestination.to_bucket(bucket, "live/stream")], outputs=[medialive.HlsOutputDefinition(encodes=[video, audio], output_name="hls_out")] ) ] )
Attributes
- black_detect_threshold
(experimental) 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).
- Default:
MediaLive service default
- Stability:
experimental
- threshold
(experimental) How long the content must be black before failover occurs.
- Default:
MediaLive service default
- Stability:
experimental