VideoEncodeProps

class aws_cdk.aws_medialive_alpha.VideoEncodeProps(*, codec, height, name, width, respond_to_afd=None, scaling_behavior=None, sharpness=None)

Bases: object

(experimental) Properties for a video encode configuration.

Parameters:
  • codec (VideoCodecSettings) – (experimental) The codec for the video encode. Choose the codec explicitly (e.g. VideoCodecSettings.h264(...))

  • height (Union[int, float]) – (experimental) The height of the output video in pixels. Must be an even number.

  • name (str) – (experimental) A unique name for this video encode.

  • width (Union[int, float]) – (experimental) The width of the output video in pixels. Must be an even number.

  • respond_to_afd (Optional[RespondToAfd]) – (experimental) How to respond to AFD values in the input stream. Default: RespondToAfd.NONE

  • scaling_behavior (Optional[ScalingBehavior]) – (experimental) The video scaling behavior. Default: ScalingBehavior.DEFAULT

  • sharpness (Union[int, float, None]) – (experimental) The anti-alias filter strength (0-100). 0 is softest, 100 is sharpest. Default: 50

Stability:

experimental

ExampleMetadata:

infused

Example:

# stack: Stack
# input: medialive.IInput
# bucket: s3.IBucket


video = medialive.EncodeConfiguration.video(
    name="video_720p",
    codec=medialive.VideoCodecSettings.h264(
        rate_control=medialive.H264RateControl.cbr(bitrate=Bitrate.mbps(3)),
        framerate=medialive.Framerate.FPS_30
    ),
    width=1280,
    height=720
)

audio = medialive.EncodeConfiguration.audio(
    name="audio_aac",
    codec=medialive.AudioCodecSettings.aac(bitrate=Bitrate.kbps(192))
)

medialive.Channel(stack, "Channel",
    inputs=[medialive.InputAttachment(input=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

codec

(experimental) The codec for the video encode.

Choose the codec explicitly (e.g. VideoCodecSettings.h264(...))

Stability:

experimental

height

(experimental) The height of the output video in pixels.

Must be an even number.

Stability:

experimental

name

(experimental) A unique name for this video encode.

Stability:

experimental

respond_to_afd

(experimental) How to respond to AFD values in the input stream.

Default:

RespondToAfd.NONE

Stability:

experimental

scaling_behavior

(experimental) The video scaling behavior.

Default:

ScalingBehavior.DEFAULT

Stability:

experimental

sharpness

(experimental) The anti-alias filter strength (0-100).

0 is softest, 100 is sharpest.

Default:

50

Stability:

experimental

width

(experimental) The width of the output video in pixels.

Must be an even number.

Stability:

experimental