Experimental
@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
TimecodeSource Class
The source of timecode for the channel outputs.
Example
ts
declare const stack: Stack;
declare const input: medialive.IInput;
declare const bucket: s3.IBucket;
declare const video: medialive.EncodeConfiguration;
declare const audio: medialive.EncodeConfiguration;
new medialive.Channel(stack, 'Channel', {
inputs: [{ input }],
timecodeConfig: {
source: medialive.TimecodeSource.EMBEDDED,
},
globalConfiguration: {
outputLocking: medialive.OutputLocking.epoch(),
outputTimingSource: medialive.OutputTimingSource.INPUT_CLOCK,
},
outputGroups: [
medialive.OutputGroupConfiguration.hls({
name: 'hls',
destinations: [medialive.OutputDestination.toBucket(bucket, 'live/stream')],
outputs: [{ encodes: [video, audio], outputName: 'hls_out' }],
}),
],
});
python
# stack: Stack
# input: medialive.IInput
# bucket: s3.IBucket
# video: medialive.EncodeConfiguration
# audio: medialive.EncodeConfiguration
medialive.Channel(stack, "Channel",
inputs=[medialive.InputAttachment(input=input)],
timecode_config=medialive.TimecodeConfig(
source=medialive.TimecodeSource.EMBEDDED
),
global_configuration=medialive.GlobalConfiguration(
output_locking=medialive.OutputLocking.epoch(),
output_timing_source=medialive.OutputTimingSource.INPUT_CLOCK
),
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")]
)
]
)
java
Stack stack;
IInput input;
IBucket bucket;
EncodeConfiguration video;
EncodeConfiguration audio;
Channel.Builder.create(stack, "Channel")
.inputs(List.of(InputAttachment.builder().input(input).build()))
.timecodeConfig(TimecodeConfig.builder()
.source(TimecodeSource.EMBEDDED)
.build())
.globalConfiguration(GlobalConfiguration.builder()
.outputLocking(OutputLocking.epoch())
.outputTimingSource(OutputTimingSource.INPUT_CLOCK)
.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, audio)).outputName("hls_out").build()))
.build())))
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
Stack stack;
IInput input;
IBucket bucket;
EncodeConfiguration video;
EncodeConfiguration audio;
new Channel(stack, "Channel", new ChannelProps {
Inputs = new [] { new InputAttachment { Input = input } },
TimecodeConfig = new TimecodeConfig {
Source = TimecodeSource.EMBEDDED
},
GlobalConfiguration = new GlobalConfiguration {
OutputLocking = OutputLocking.Epoch(),
OutputTimingSource = OutputTimingSource.INPUT_CLOCK
},
OutputGroups = new [] { OutputGroupConfiguration.Hls(new HlsOutputGroupProps {
Name = "hls",
Destinations = new [] { OutputDestination.ToBucket(bucket, "live/stream") },
Outputs = new [] { new HlsOutputDefinition { Encodes = new [] { video, audio }, OutputName = "hls_out" } }
}) }
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
var stack Stack
var input IInput
var bucket IBucket
var video EncodeConfiguration
var audio EncodeConfiguration
medialive.NewChannel(stack, jsii.String("Channel"), &ChannelProps{
Inputs: []InputAttachment{
&InputAttachment{
Input: *Input,
},
},
TimecodeConfig: &TimecodeConfig{
Source: medialive.TimecodeSource_EMBEDDED(),
},
GlobalConfiguration: &GlobalConfiguration{
OutputLocking: medialive.OutputLocking_Epoch(),
OutputTimingSource: medialive.OutputTimingSource_INPUT_CLOCK(),
},
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,
audio,
},
OutputName: jsii.String("hls_out"),
},
},
}),
},
})
Properties
EMBEDDEDTimecodeSourceembeddedTimecodeSourceEMBEDDEDTimecodeSourceEMBEDDEDTimecodeSourceEMBEDDEDTimecodeSourcestatic#Use embedded timecode from the source.
Falls back to zero-based if not detected.
SYSTEMCLOCKTimecodeSourcesystemclockTimecodeSourceSYSTEMCLOCKTimecodeSourceSYSTEMCLOCKTimecodeSourceSYSTEMCLOCKTimecodeSourcestatic#Use the system clock (UTC).
The underlying string value passed to CloudFormation.
ZEROBASEDTimecodeSourcezerobasedTimecodeSourceZEROBASEDTimecodeSourceZEROBASEDTimecodeSourceZEROBASEDTimecodeSourcestatic#Start at 00:00:00:00.
Methods
of(value: string): TimecodeSource // chainable@staticmethod def of(value: str) -> TimecodeSourcepublic static TimecodeSource of(String value)public static TimecodeSource Of(string value)func Of(Value *string) TimecodeSourcestatic#A value not yet modelled by AWS CDK.