awscdk-construct-live-channel-from-mp4-file
Version:
CDK Construct for setting up a simple live channel for testing
57 lines (56 loc) • 2.6 kB
TypeScript
import { CfnChannel } from 'aws-cdk-lib/aws-medialive';
import { CfnOriginEndpoint } from 'aws-cdk-lib/aws-mediapackage';
import { MediaLive, SourceSpec } from 'awscdk-construct-medialive-channel';
import { Construct } from 'constructs';
import { HarvestJobLambda, HarvestJobDestinationProps } from './HarvestJobLambda';
import { MediaPackageV1, MediaPakcageV1Props } from './MediaPackageV1';
import { MediaPackageV2, MediaPakcageV2Props } from './MediaPackageV2';
export interface EncoderSpec {
readonly gopLengthInSeconds?: number;
readonly timecodeBurninPrefix?: string;
readonly framerateNumerator?: number;
readonly framerateDenominator?: number;
readonly scanType?: 'PROGRESSIVE' | 'INTERLACED';
readonly width?: number;
readonly height?: number;
}
export interface MediaPackageV2Settings {
readonly channelGroupName?: string;
readonly inputType?: 'HLS' | 'CMAF';
readonly omitLlHls?: boolean;
}
export interface PackagerSpec {
readonly segmentDurationSeconds?: number;
readonly manifestWindowSeconds?: number;
readonly hlsAdMarkers?: string;
readonly startoverWindowSeconds?: number;
readonly separateAudioRendition?: boolean;
readonly mediaPackageV2Settings?: MediaPackageV2Settings;
}
type PackagerFullSpec = MediaPakcageV1Props | MediaPakcageV2Props | (MediaPakcageV1Props | MediaPakcageV2Props)[];
export interface LiveChannelFromMp4Props {
readonly source: string | string[] | SourceSpec[];
readonly channelClass?: 'STANDARD' | 'SINGLE_PIPELINE';
readonly encoderSpec?: EncoderSpec | CfnChannel.EncoderSettingsProperty;
readonly mediaPackageVersionSpec?: 'V1_ONLY' | 'V2_ONLY' | 'V1_AND_V2';
readonly packagerSpec?: PackagerSpec | PackagerFullSpec;
readonly autoStart?: boolean;
}
export declare class LiveChannelFromMp4 extends Construct {
readonly eml: MediaLive;
readonly empv1?: MediaPackageV1;
readonly empv2?: MediaPackageV2;
readonly channelStartTime?: Date;
constructor(scope: Construct, id: string, { source, channelClass, encoderSpec, mediaPackageVersionSpec, packagerSpec, autoStart, }: LiveChannelFromMp4Props);
createHarvestJob(props: HarvestJobProps): HarvestJobLambda;
private getStartTime;
}
export interface HarvestJobProps {
readonly endpoint: CfnOriginEndpoint;
readonly destination?: HarvestJobDestinationProps;
readonly startTime?: Date;
readonly endTime?: Date;
readonly publish?: boolean;
readonly retain?: boolean;
}
export { HarvestJobLambda, HarvestJobLambdaProps, HarvestJobDestinationProps } from './HarvestJobLambda';