M3u8Settings

class aws_cdk.aws_medialive_alpha.M3u8Settings(*args: Any, **kwargs)

Bases: object

(experimental) M3U8 container settings for a standard HLS output.

Use M3u8Settings.of() to control the transport stream produced by a standard HLS output. Omitting it uses MediaLive’s service defaults.

Stability:

experimental

ExampleMetadata:

infused

Example:

# bucket: s3.IBucket
# video: medialive.EncodeConfiguration
# audio: medialive.EncodeConfiguration


medialive.OutputGroupConfiguration.hls(
    name="hls",
    destinations=[medialive.OutputDestination.to_bucket(bucket, "live/stream")],
    outputs=[medialive.HlsOutputDefinition(
        encodes=[video],
        output_name="video",
        hls_settings=medialive.HlsSettings.standard(
            m3u8_settings=medialive.M3u8Settings.of(
                scte35_behavior=medialive.M3u8Scte35Behavior.PASSTHROUGH,
                program_num=1
            )
        )
    ), medialive.HlsOutputDefinition(
        encodes=[audio],
        output_name="audio",
        hls_settings=medialive.HlsSettings.audio_only(
            audio_group_id="program",
            audio_only_image=medialive.FileLocation.from_bucket(bucket, "art/cover.png")
        )
    )
    ]
)

Static Methods

classmethod of(*, audio_frames_per_pes=None, audio_pids=None, klv_behavior=None, klv_data_pids=None, nielsen_id3_behavior=None, pat_interval=None, pcr_control=None, pcr_period=None, pcr_pid=None, pmt_interval=None, pmt_pid=None, program_num=None, scte35_behavior=None, scte35_pid=None, timed_metadata_behavior=None, timed_metadata_pid=None, transport_stream_id=None, video_pid=None)

(experimental) Create M3U8 container settings.

Parameters:
  • audio_frames_per_pes (Union[int, float, None]) – (experimental) The number of audio frames to insert for each PES packet. Default: - service default

  • audio_pids (Optional[str]) – (experimental) The PID(s) of the elementary audio streams. Accepts ranges and comma separation. Default: - service default

  • klv_behavior (Optional[M3u8KlvBehavior]) – (experimental) KLV data passthrough behavior. Default: - service default

  • klv_data_pids (Optional[str]) – (experimental) The PID(s) of the KLV data streams. Default: - service default

  • nielsen_id3_behavior (Optional[M3u8NielsenId3Behavior]) – (experimental) Nielsen ID3 passthrough behavior. Default: - service default

  • pat_interval (Optional[Duration]) – (experimental) The interval between instances of the PAT in the output. A value of 0 writes the PAT once per segment file. Default: - service default

  • pcr_control (Optional[M3u8PcrControl]) – (experimental) Controls insertion of the Program Clock Reference (PCR). Default: - service default

  • pcr_period (Optional[Duration]) – (experimental) The maximum interval between Program Clock References (PCRs). Default: - service default

  • pcr_pid (Optional[str]) – (experimental) The PID of the Program Clock Reference (PCR). Defaults to the video PID. Default: - same as the video PID

  • pmt_interval (Optional[Duration]) – (experimental) The interval between instances of the PMT in the output. A value of 0 writes the PMT once per segment file. Default: - service default

  • pmt_pid (Optional[str]) – (experimental) The PID of the Program Map Table (PMT). Default: - service default

  • program_num (Union[int, float, None]) – (experimental) The value of the program number field in the PMT. Default: - service default

  • scte35_behavior (Optional[M3u8Scte35Behavior]) – (experimental) SCTE-35 passthrough behavior. Default: - service default

  • scte35_pid (Optional[str]) – (experimental) The PID of the SCTE-35 stream. Default: - service default

  • timed_metadata_behavior (Optional[M3u8TimedMetadataBehavior]) – (experimental) Timed-metadata passthrough behavior. Default: - service default

  • timed_metadata_pid (Optional[str]) – (experimental) The PID of the timed-metadata stream. Valid values are 32 (0x20)..8182 (0x1ff6). Default: - service default

  • transport_stream_id (Union[int, float, None]) – (experimental) The value of the transport stream ID field in the PMT. Default: - service default

  • video_pid (Optional[str]) – (experimental) The PID of the elementary video stream. Default: - service default

Stability:

experimental

Return type:

M3u8Settings