Experimental
@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
HlsOutputGroupProps Struct
Properties for an HLS output group.
Example
declare const stack: Stack;
declare const input: medialive.IInput;
declare const bucket: s3.IBucket;
declare const video: medialive.EncodeConfiguration;
new medialive.Channel(stack, 'Channel', {
inputs: [{ input }],
availBlanking: {
state: medialive.AvailBlankingState.ENABLED,
image: medialive.FileLocation.fromBucket(bucket, 'slates/avail.png'),
},
blackoutSlate: {
state: medialive.BlackoutSlateState.ENABLED,
image: medialive.FileLocation.fromBucket(bucket, 'slates/blackout.png'),
},
outputGroups: [
medialive.OutputGroupConfiguration.hls({
name: 'hls',
destinations: [medialive.OutputDestination.toBucket(bucket, 'live/stream')],
outputs: [{ encodes: [video], outputName: 'hls_out' }],
}),
],
});
# stack: Stack
# input: medialive.IInput
# bucket: s3.IBucket
# video: medialive.EncodeConfiguration
medialive.Channel(stack, "Channel",
inputs=[medialive.InputAttachment(input=input)],
avail_blanking=medialive.AvailBlanking(
state=medialive.AvailBlankingState.ENABLED,
image=medialive.FileLocation.from_bucket(bucket, "slates/avail.png")
),
blackout_slate=medialive.BlackoutSlate(
state=medialive.BlackoutSlateState.ENABLED,
image=medialive.FileLocation.from_bucket(bucket, "slates/blackout.png")
),
output_groups=[
medialive.OutputGroupConfiguration.hls(
name="hls",
destinations=[medialive.OutputDestination.to_bucket(bucket, "live/stream")],
outputs=[medialive.HlsOutputDefinition(encodes=[video], output_name="hls_out")]
)
]
)
Stack stack;
IInput input;
IBucket bucket;
EncodeConfiguration video;
Channel.Builder.create(stack, "Channel")
.inputs(List.of(InputAttachment.builder().input(input).build()))
.availBlanking(AvailBlanking.builder()
.state(AvailBlankingState.ENABLED)
.image(FileLocation.fromBucket(bucket, "slates/avail.png"))
.build())
.blackoutSlate(BlackoutSlate.builder()
.state(BlackoutSlateState.ENABLED)
.image(FileLocation.fromBucket(bucket, "slates/blackout.png"))
.build())
.outputGroups(List.of(OutputGroupConfiguration.hls(HlsOutputGroupProps.builder()
.name("hls")
.destinations(List.of(OutputDestination.toBucket(bucket, "live/stream")))
.outputs(List.of(HlsOutputDefinition.builder().encodes(List.of(video)).outputName("hls_out").build()))
.build())))
.build();
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
Stack stack;
IInput input;
IBucket bucket;
EncodeConfiguration video;
new Channel(stack, "Channel", new ChannelProps {
Inputs = new [] { new InputAttachment { Input = input } },
AvailBlanking = new AvailBlanking {
State = AvailBlankingState.ENABLED,
Image = FileLocation.FromBucket(bucket, "slates/avail.png")
},
BlackoutSlate = new BlackoutSlate {
State = BlackoutSlateState.ENABLED,
Image = FileLocation.FromBucket(bucket, "slates/blackout.png")
},
OutputGroups = new [] { OutputGroupConfiguration.Hls(new HlsOutputGroupProps {
Name = "hls",
Destinations = new [] { OutputDestination.ToBucket(bucket, "live/stream") },
Outputs = new [] { new HlsOutputDefinition { Encodes = new [] { video }, OutputName = "hls_out" } }
}) }
});
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
var stack Stack
var input IInput
var bucket IBucket
var video EncodeConfiguration
medialive.NewChannel(stack, jsii.String("Channel"), &ChannelProps{
Inputs: []InputAttachment{
&InputAttachment{
Input: *Input,
},
},
AvailBlanking: &AvailBlanking{
State: medialive.AvailBlankingState_ENABLED(),
Image: medialive.FileLocation_FromBucket(bucket, jsii.String("slates/avail.png")),
},
BlackoutSlate: &BlackoutSlate{
State: medialive.BlackoutSlateState_ENABLED(),
Image: medialive.FileLocation_*FromBucket(bucket, jsii.String("slates/blackout.png")),
},
OutputGroups: []OutputGroupConfiguration{
medialive.OutputGroupConfiguration_Hls(&HlsOutputGroupProps{
Name: jsii.String("hls"),
Destinations: []OutputDestination{
medialive.OutputDestination_ToBucket(bucket, jsii.String("live/stream")),
},
Outputs: []HlsOutputDefinition{
&HlsOutputDefinition{
Encodes: []EncodeConfiguration{
video,
},
OutputName: jsii.String("hls_out"),
},
},
}),
},
})
Properties
adMarkersoptionalHlsAdMarkers[]ad_markersoptionaltyping.List[HlsAdMarkers]adMarkersoptionalList<HlsAdMarkers>AdMarkersoptionalHlsAdMarkers[]AdMarkersoptional*[]HlsAdMarkers#Default: no ad markers
baseUrlContentoptionalstringbase_url_contentoptionalstrbaseUrlContentoptionalStringBaseUrlContentoptionalstringBaseUrlContentoptional*string#Default: no base URL content prefix
baseUrlContent1optionalstringbase_url_content1optionalstrbaseUrlContent1optionalStringBaseUrlContent1optionalstringBaseUrlContent1optional*string#Default: no base URL content 1
baseUrlManifestoptionalstringbase_url_manifestoptionalstrbaseUrlManifestoptionalStringBaseUrlManifestoptionalstringBaseUrlManifestoptional*string#Default: no base URL manifest prefix
baseUrlManifest1optionalstringbase_url_manifest1optionalstrbaseUrlManifest1optionalStringBaseUrlManifest1optionalstringBaseUrlManifest1optional*string#Default: no base URL manifest 1
captionLanguageMappingsoptionalCaptionLanguageMapping[]caption_language_mappingsoptionaltyping.List[CaptionLanguageMapping]captionLanguageMappingsoptionalList<CaptionLanguageMapping>CaptionLanguageMappingsoptionalCaptionLanguageMapping[]CaptionLanguageMappingsoptional*[]CaptionLanguageMapping#Default: no caption language mappings
Meaningful only if captionLanguageSetting is set to INSERT.
captionLanguageSettingoptionalHlsCaptionLanguageSettingcaption_language_settingoptionalHlsCaptionLanguageSettingcaptionLanguageSettingoptionalHlsCaptionLanguageSettingCaptionLanguageSettingoptionalHlsCaptionLanguageSettingCaptionLanguageSettingoptionalHlsCaptionLanguageSetting#Default: service default
clientCacheoptionalHlsClientCacheclient_cacheoptionalHlsClientCacheclientCacheoptionalHlsClientCacheClientCacheoptionalHlsClientCacheClientCacheoptionalHlsClientCache= HlsClientCache.ENABLED#codecSpecificationoptionalHlsCodecSpecificationcodec_specificationoptionalHlsCodecSpecificationcodecSpecificationoptionalHlsCodecSpecificationCodecSpecificationoptionalHlsCodecSpecificationCodecSpecificationoptionalHlsCodecSpecification= HlsCodecSpecification.RFC_4281#constantIvoptionalstringconstant_ivoptionalstrconstantIvoptionalStringConstantIvoptionalstringConstantIvoptional*string#Default: no constant IV
Used with encryptionType when ivSource is set to EXPLICIT.
destinationsOutputDestination[]destinationstyping.List[OutputDestination]destinationsList<OutputDestination>DestinationsOutputDestination[]Destinations*[]OutputDestinationrequired#notes
Array position determines the pipeline mapping:
destinations[0]→ Pipeline 0destinations[1]→ Pipeline 1 (STANDARD channels only)
For a SINGLE_PIPELINE channel, provide exactly 1 destination. For a STANDARD channel, provide exactly 2 destinations.
directoryStructureoptionalHlsDirectoryStructuredirectory_structureoptionalHlsDirectoryStructuredirectoryStructureoptionalHlsDirectoryStructureDirectoryStructureoptionalHlsDirectoryStructureDirectoryStructureoptionalHlsDirectoryStructure#Default: HlsDirectoryStructure.SINGLE_DIRECTORY
discontinuityTagsoptionalHlsDiscontinuityTagsdiscontinuity_tagsoptionalHlsDiscontinuityTagsdiscontinuityTagsoptionalHlsDiscontinuityTagsDiscontinuityTagsoptionalHlsDiscontinuityTagsDiscontinuityTagsoptionalHlsDiscontinuityTags= HlsDiscontinuityTags.INSERT#encryptionTypeoptionalHlsEncryptionTypeencryption_typeoptionalHlsEncryptionTypeencryptionTypeoptionalHlsEncryptionTypeEncryptionTypeoptionalHlsEncryptionTypeEncryptionTypeoptionalHlsEncryptionType#Default: no encryption
hlsCdnSettingsoptionalHlsCdnSettingshls_cdn_settingsoptionalHlsCdnSettingshlsCdnSettingsoptionalHlsCdnSettingsHlsCdnSettingsoptionalHlsCdnSettingsHlsCdnSettingsoptionalHlsCdnSettings#Default: service default
hlsId3SegmentTaggingoptionalHlsId3SegmentTaggingStatehls_id3_segment_taggingoptionalHlsId3SegmentTaggingStatehlsId3SegmentTaggingoptionalHlsId3SegmentTaggingStateHlsId3SegmentTaggingoptionalHlsId3SegmentTaggingStateHlsId3SegmentTaggingoptionalHlsId3SegmentTaggingState#Default: HlsId3SegmentTaggingState.DISABLED
iFrameOnlyPlaylistsoptionalHlsIFrameOnlyPlaylistsi_frame_only_playlistsoptionalHlsIFrameOnlyPlaylistsiFrameOnlyPlaylistsoptionalHlsIFrameOnlyPlaylistsIFrameOnlyPlaylistsoptionalHlsIFrameOnlyPlaylistsIFrameOnlyPlaylistsoptionalHlsIFrameOnlyPlaylists= HlsIFrameOnlyPlaylists.DISABLED#incompleteSegmentBehavioroptionalHlsIncompleteSegmentBehaviorincomplete_segment_behavioroptionalHlsIncompleteSegmentBehaviorincompleteSegmentBehavioroptionalHlsIncompleteSegmentBehaviorIncompleteSegmentBehavioroptionalHlsIncompleteSegmentBehaviorIncompleteSegmentBehavioroptionalHlsIncompleteSegmentBehavior#Default: HlsIncompleteSegmentBehavior.AUTO
indexNSegmentsoptionalnumberindex_n_segmentsoptionalint | floatindexNSegmentsoptionalNumberIndexNSegmentsoptionaldoubleIndexNSegmentsoptional*float64= 10#inputLossActionoptionalHlsInputLossActioninput_loss_actionoptionalHlsInputLossActioninputLossActionoptionalHlsInputLossActionInputLossActionoptionalHlsInputLossActionInputLossActionoptionalHlsInputLossAction= HlsInputLossAction.EMIT_OUTPUT#ivInManifestoptionalHlsIvInManifestiv_in_manifestoptionalHlsIvInManifestivInManifestoptionalHlsIvInManifestIvInManifestoptionalHlsIvInManifestIvInManifestoptionalHlsIvInManifest#Default: service default
ivSourceoptionalHlsIvSourceiv_sourceoptionalHlsIvSourceivSourceoptionalHlsIvSourceIvSourceoptionalHlsIvSourceIvSourceoptionalHlsIvSource#Default: service default
keepSegmentsoptionalnumberkeep_segmentsoptionalint | floatkeepSegmentsoptionalNumberKeepSegmentsoptionaldoubleKeepSegmentsoptional*float64= 21#keyFormatoptionalstringkey_formatoptionalstrkeyFormatoptionalStringKeyFormatoptionalstringKeyFormatoptional*string#Default: service default
keyFormatVersionsoptionalstringkey_format_versionsoptionalstrkeyFormatVersionsoptionalStringKeyFormatVersionsoptionalstringKeyFormatVersionsoptional*string#Default: service default
keyProviderSettingsoptionalHlsKeyProviderSettingskey_provider_settingsoptionalHlsKeyProviderSettingskeyProviderSettingsoptionalHlsKeyProviderSettingsKeyProviderSettingsoptionalHlsKeyProviderSettingsKeyProviderSettingsoptionalHlsKeyProviderSettings#Default: no key provider settings
manifestCompressionoptionalHlsManifestCompressionmanifest_compressionoptionalHlsManifestCompressionmanifestCompressionoptionalHlsManifestCompressionManifestCompressionoptionalHlsManifestCompressionManifestCompressionoptionalHlsManifestCompression= HlsManifestCompression.NONE#manifestDurationFormatoptionalHlsManifestDurationFormatmanifest_duration_formatoptionalHlsManifestDurationFormatmanifestDurationFormatoptionalHlsManifestDurationFormatManifestDurationFormatoptionalHlsManifestDurationFormatManifestDurationFormatoptionalHlsManifestDurationFormat#Default: HlsManifestDurationFormat.FLOATING_POINT
minSegmentoptionalSegmentmin_segmentoptionalSegmentminSegmentoptionalSegmentMinSegmentoptionalSegmentMinSegmentoptionalSegment#Default: service default
HLS supports whole-second segments only.
modeoptionalHlsModemodeoptionalHlsModemodeoptionalHlsModeModeoptionalHlsModeModeoptionalHlsMode= HlsMode.LIVE#Used as the destination reference ID. Underscores are normalised to hyphens internally.
outputsoptionalHlsOutputDefinition[]outputsoptionaltyping.List[HlsOutputDefinition]outputsoptionalList<HlsOutputDefinition>OutputsoptionalHlsOutputDefinition[]Outputsoptional*[]HlsOutputDefinition#Default: no initial outputs
outputSelectionoptionalHlsOutputSelectionoutput_selectionoptionalHlsOutputSelectionoutputSelectionoptionalHlsOutputSelectionOutputSelectionoptionalHlsOutputSelectionOutputSelectionoptionalHlsOutputSelection#Default: HlsOutputSelection.MANIFESTS_AND_SEGMENTS
programDateTimeoptionalHlsProgramDateTimeprogram_date_timeoptionalHlsProgramDateTimeprogramDateTimeoptionalHlsProgramDateTimeProgramDateTimeoptionalHlsProgramDateTimeProgramDateTimeoptionalHlsProgramDateTime= HlsProgramDateTime.INCLUDE#programDateTimeClockoptionalHlsProgramDateTimeClockprogram_date_time_clockoptionalHlsProgramDateTimeClockprogramDateTimeClockoptionalHlsProgramDateTimeClockProgramDateTimeClockoptionalHlsProgramDateTimeClockProgramDateTimeClockoptionalHlsProgramDateTimeClock#Default: HlsProgramDateTimeClock.SYSTEM_CLOCK, or INITIALIZE_FROM_OUTPUT_TIMECODE with epoch locking
programDateTimePeriodoptionalDurationprogram_date_time_periodoptionalDurationprogramDateTimePeriodoptionalDurationProgramDateTimePeriodoptionalDurationProgramDateTimePeriodoptionalDuration= Duration.minutes(10)#redundantManifestoptionalHlsRedundantManifestredundant_manifestoptionalHlsRedundantManifestredundantManifestoptionalHlsRedundantManifestRedundantManifestoptionalHlsRedundantManifestRedundantManifestoptionalHlsRedundantManifest= HlsRedundantManifest.DISABLED#segmentoptionalSegmentsegmentoptionalSegmentsegmentoptionalSegmentSegmentoptionalSegmentSegmentoptionalSegment= Segment.seconds(2)#HLS supports whole-second segments only.
segmentationModeoptionalHlsSegmentationModesegmentation_modeoptionalHlsSegmentationModesegmentationModeoptionalHlsSegmentationModeSegmentationModeoptionalHlsSegmentationModeSegmentationModeoptionalHlsSegmentationMode#Default: HlsSegmentationMode.USE_SEGMENT_DURATION
segmentsPerSubdirectoryoptionalnumbersegments_per_subdirectoryoptionalint | floatsegmentsPerSubdirectoryoptionalNumberSegmentsPerSubdirectoryoptionaldoubleSegmentsPerSubdirectoryoptional*float64= 10000#streamInfResolutionoptionalHlsStreamInfResolutionstream_inf_resolutionoptionalHlsStreamInfResolutionstreamInfResolutionoptionalHlsStreamInfResolutionStreamInfResolutionoptionalHlsStreamInfResolutionStreamInfResolutionoptionalHlsStreamInfResolution= HlsStreamInfResolution.INCLUDE#timedMetadataId3FrameoptionalHlsTimedMetadataId3Frametimed_metadata_id3_frameoptionalHlsTimedMetadataId3FrametimedMetadataId3FrameoptionalHlsTimedMetadataId3FrameTimedMetadataId3FrameoptionalHlsTimedMetadataId3FrameTimedMetadataId3FrameoptionalHlsTimedMetadataId3Frame= HlsTimedMetadataId3Frame.PRIV#timedMetadataId3PeriodoptionalDurationtimed_metadata_id3_periodoptionalDurationtimedMetadataId3PeriodoptionalDurationTimedMetadataId3PeriodoptionalDurationTimedMetadataId3PeriodoptionalDuration= Duration.seconds(10)#timestampDeltaoptionalDurationtimestamp_deltaoptionalDurationtimestampDeltaoptionalDurationTimestampDeltaoptionalDurationTimestampDeltaoptionalDuration#Default: service default
tsFileModeoptionalHlsTsFileModets_file_modeoptionalHlsTsFileModetsFileModeoptionalHlsTsFileModeTsFileModeoptionalHlsTsFileModeTsFileModeoptionalHlsTsFileMode= HlsTsFileMode.SEGMENTED_FILES#