Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

awscdk-construct-live-channel-from-mp4-file

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awscdk-construct-live-channel-from-mp4-file

CDK Construct for setting up a simple live channel for testing

  • 0.0.14
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-70%
Maintainers
1
Weekly downloads
 
Created
Source

awscdk-construct-live-channel-from-mp4-file

View on Construct Hub

CDK Construct for setting up a simple live channel for testing

  • The input is an MP4 file with loop playback
  • The output is a live channel with:
    • a MediaLive channel with 29.97fps, 3x bitrates (720p/540p/360p)
    • a MediaPackage v1 channel with HLS/DASH/MSS/CMAF endpoints
  • You can add timecode overay with a prefix for visual confirmation
  • You can configure:
    • Channel class: STANDARD or SINGLE_PIPELINE
    • GOP length
    • Segment length
    • Manifest length

Install

NPM

Usage

import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { LiveChannelFromMp4 } from 'awscdk-construct-live-channel-from-mp4-file';

export class ExampleStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    // Create a single-pipeline MediaLive channel with MediaPackage endpoints
    const res = new LiveChannelFromMp4(this, 'LiveChannelFromMp4', {
      sourceUrl: 'https://example.com/test.mp4',
      channelClass: 'STANDARD', // optional: default = 'SINGLE_PIPELINE'
      gopLengthInSeconds: 2, // optional: default = 3
      segmentDurationSeconds: 4, // optional: default = 6
      manifestWindowSeconds: 20, // optional: default = 60
      timecodeBurninPrefix: 'Channel-1', // optional: default = no timecode overlay
      hlsAdMarkers: 'SCTE_ENHANCED', // optional: default = DATERANGE
    });

    // You can access MediaLive channel attributes via `eml.channel`
    new cdk.CfnOutput(this, "MediaLiveChannelId", {
      value: res.eml.channel.ref,
      exportName: cdk.Aws.STACK_NAME + "MediaLiveChannelId",
      description: "MediaLive channel ID",
    });

    // You can access MediaPackage endpoints attributes via `emp.endpoints`
    new cdk.CfnOutput(this, "MediaPackageHlsEndpoint", {
      value: res.emp.endpoints['hls'].attrUrl,
      exportName: cdk.Aws.STACK_NAME + "MediaPackageHlsEndpoint",
      description: "MediaPackage HLS endpoint URL",
    });
  }
}

Keywords

FAQs

Package last updated on 16 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc