Skip to content

Channel

Source: src/AWS/MediaLive/Channel.ts

An AWS Elemental MediaLive channel — the live encoder that reads from attached inputs, transcodes per its encoder settings, and writes to output destinations (HLS, RTMP, MediaPackage, …).

Channels bill per running hour; Alchemy provisions channels in the IDLE state and never starts them — start/stop is a runtime operation.

Single-pipeline HLS channel

const channel = yield* MediaLive.Channel("Live", {
channelClass: "SINGLE_PIPELINE",
roleArn: role.roleArn,
inputAttachments: [
{ InputId: input.inputId, InputAttachmentName: "primary" },
],
inputSpecification: {
Codec: "AVC",
Resolution: "SD",
MaximumBitrate: "MAX_10_MBPS",
},
destinations,
encoderSettings,
});

IAM role for MediaLive

const role = yield* IAM.Role("MediaLiveRole", {
assumeRolePolicyDocument: {
Version: "2012-10-17",
Statement: [
{
Effect: "Allow",
Principal: { Service: "medialive.amazonaws.com" },
Action: ["sts:AssumeRole"],
},
],
},
});