> **Experimental**
>
> `@aws-cdk/aws-medialive-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# HlsOutputGroupProps

Properties for an HLS output group.

Used as argument in: [OutputGroupConfiguration.hls](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.OutputGroupConfiguration.html#hls)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/output-group.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-medialive-alpha/lib/output-group.ts#L526)

## Example

TypeScript:

```ts
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' }],
    }),
  ],
});
```

Python:

```python
# 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")]
        )
    ]
)
```

Java:

```java
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();
```

C# / .NET:

```csharp
// 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" } }
    }) }
});
```

Golang:

```go
// 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

- `adMarkers`: [HlsAdMarkers](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsAdMarkers.html)[] — Chooses one or more ad marker types to pass SCTE35 signals through to this group of Apple HLS outputs.

  **Default:** no ad markers

- `baseUrlContent`: string — A partial URI prefix that will be prepended to each output in the media .m3u8 file.

  **Default:** no base URL content prefix

- `baseUrlContent1`: string — Optional base URL content for pipeline 1 if different from pipeline 0.

  **Default:** no base URL content 1

- `baseUrlManifest`: string — A partial URI prefix that will be prepended to each output in the media .m3u8 file for the manifest.

  **Default:** no base URL manifest prefix

- `baseUrlManifest1`: string — Optional base URL manifest for pipeline 1 if different from pipeline 0.

  **Default:** no base URL manifest 1

- `captionLanguageMappings`: [CaptionLanguageMapping](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.CaptionLanguageMapping.html)[] — A mapping of up to 4 captions channels to captions languages.

  **Default:** no caption language mappings

  Meaningful only if captionLanguageSetting is set to INSERT.

- `captionLanguageSetting`: [HlsCaptionLanguageSetting](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsCaptionLanguageSetting.html) — Applies only to 608 embedded output captions.

  **Default:** service default

- `clientCache`: [HlsClientCache](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsClientCache.html) = HlsClientCache.ENABLED — When set to DISABLED, sets the #EXT-X-ALLOW-CACHE:no tag in the manifest.

- `codecSpecification`: [HlsCodecSpecification](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsCodecSpecification.html) = HlsCodecSpecification.RFC_4281 — The specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist generation.

- `constantIv`: string — A 128-bit, 16-byte hex value represented by a 32-character text string used as the IV for encryption.

  **Default:** no constant IV

  Used with encryptionType when ivSource is set to EXPLICIT.

- `destinations`: [OutputDestination](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.OutputDestination.html)[] (required) — The destinations for this output group — one per pipeline.

  Array position determines the pipeline mapping:
  - `destinations[0]` → Pipeline 0
  - `destinations[1]` → Pipeline 1 (STANDARD channels only)

  For a SINGLE_PIPELINE channel, provide exactly 1 destination.
  For a STANDARD channel, provide exactly 2 destinations.

- `directoryStructure`: [HlsDirectoryStructure](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsDirectoryStructure.html) — Places segments in subdirectories.

  **Default:** HlsDirectoryStructure.SINGLE_DIRECTORY

- `discontinuityTags`: [HlsDiscontinuityTags](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsDiscontinuityTags.html) = HlsDiscontinuityTags.INSERT — Specifies whether to insert EXT-X-DISCONTINUITY tags in the HLS child manifests.

- `encryptionType`: [HlsEncryptionType](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsEncryptionType.html) — Encrypts the segments with the specified encryption scheme.

  **Default:** no encryption

- `hlsCdnSettings`: [HlsCdnSettings](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsCdnSettings.html) — Settings to configure the CDN for the HLS output.

  **Default:** service default

- `hlsId3SegmentTagging`: [HlsId3SegmentTaggingState](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsId3SegmentTaggingState.html) — State of HLS ID3 Segment Tagging.

  **Default:** HlsId3SegmentTaggingState.DISABLED

- `iFrameOnlyPlaylists`: [HlsIFrameOnlyPlaylists](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsIFrameOnlyPlaylists.html) = HlsIFrameOnlyPlaylists.DISABLED — Whether to create an I-frame-only manifest.

- `incompleteSegmentBehavior`: [HlsIncompleteSegmentBehavior](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsIncompleteSegmentBehavior.html) — Specifies whether to include the final (incomplete) segment in the media output.

  **Default:** HlsIncompleteSegmentBehavior.AUTO

- `indexNSegments`: number = 10 — The maximum number of segments in the media manifest (LIVE mode only).

- `inputLossAction`: [HlsInputLossAction](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsInputLossAction.html) = HlsInputLossAction.EMIT_OUTPUT — Action to take when the input is lost.

- `ivInManifest`: [HlsIvInManifest](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsIvInManifest.html) — Whether the IV is listed in the manifest.

  **Default:** service default

- `ivSource`: [HlsIvSource](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsIvSource.html) — Whether the IV follows the segment number or is explicit.

  **Default:** service default

- `keepSegments`: number = 21 — The number of segments to retain in the destination directory (LIVE mode only).

- `keyFormat`: string — Specifies how the key is represented in the resource identified by the URI.

  **Default:** service default

- `keyFormatVersions`: string — Either a single positive integer version value or a slash-delimited list of version values (1/2/3).

  **Default:** service default

- `keyProviderSettings`: [HlsKeyProviderSettings](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsKeyProviderSettings.html) — The key provider settings for HLS encryption.

  **Default:** no key provider settings

- `manifestCompression`: [HlsManifestCompression](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsManifestCompression.html) = HlsManifestCompression.NONE — When set to GZIP, compresses HLS playlist.

- `manifestDurationFormat`: [HlsManifestDurationFormat](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsManifestDurationFormat.html) — Indicates whether the output manifest should use floating point or integer values for segment duration.

  **Default:** HlsManifestDurationFormat.FLOATING_POINT

- `minSegment`: [Segment](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.Segment.html) — The minimum segment length.

  **Default:** service default

  HLS supports whole-second segments only.

- `mode`: [HlsMode](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsMode.html) = HlsMode.LIVE — The output mode — LIVE or VOD.

- `name`: string (required) — The name of this output group.

  Used as the destination reference ID. Underscores are normalised to hyphens internally.

- `outputs`: [HlsOutputDefinition](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsOutputDefinition.html)[] — The outputs for this HLS output group.

  **Default:** no initial outputs

- `outputSelection`: [HlsOutputSelection](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsOutputSelection.html) — Controls which manifests and segments are generated.

  **Default:** HlsOutputSelection.MANIFESTS_AND_SEGMENTS

- `programDateTime`: [HlsProgramDateTime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsProgramDateTime.html) = HlsProgramDateTime.INCLUDE — Includes or excludes the EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files.

- `programDateTimeClock`: [HlsProgramDateTimeClock](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsProgramDateTimeClock.html) — Specifies the algorithm used to drive the HLS EXT-X-PROGRAM-DATE-TIME clock.

  **Default:** HlsProgramDateTimeClock.SYSTEM_CLOCK, or INITIALIZE_FROM_OUTPUT_TIMECODE with epoch locking

- `programDateTimePeriod`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.minutes(10) — The period of insertion of the EXT-X-PROGRAM-DATE-TIME entry.

- `redundantManifest`: [HlsRedundantManifest](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsRedundantManifest.html) = HlsRedundantManifest.DISABLED — Whether the master manifest includes information about both pipelines.

- `segment`: [Segment](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.Segment.html) = Segment.seconds(2) — The length of each media segment.

  HLS supports whole-second segments only.

- `segmentationMode`: [HlsSegmentationMode](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsSegmentationMode.html) — The segmentation mode.

  **Default:** HlsSegmentationMode.USE_SEGMENT_DURATION

- `segmentsPerSubdirectory`: number = 10000 — The number of segments to write to a subdirectory before starting a new one.

- `streamInfResolution`: [HlsStreamInfResolution](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsStreamInfResolution.html) = HlsStreamInfResolution.INCLUDE — Whether to include or exclude the RESOLUTION attribute for a video in the EXT-X-STREAM-INF tag.

- `timedMetadataId3Frame`: [HlsTimedMetadataId3Frame](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsTimedMetadataId3Frame.html) = HlsTimedMetadataId3Frame.PRIV — Indicates the ID3 frame that has the timecode.

- `timedMetadataId3Period`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.seconds(10) — The timed metadata interval.

- `timestampDelta`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — Provides an extra delta offset to fine tune the timestamps.

  **Default:** service default

- `tsFileMode`: [HlsTsFileMode](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.HlsTsFileMode.html) = HlsTsFileMode.SEGMENTED_FILES — Whether to emit segmented files or a single file.
