Skip to main content

Ad-Flow: Output to MediaLive's SRT Input

This guide explains how to create an SRT input in AWS MediaLive and configure the Ad-Flow container to accept connections from it.

Configuring Ad-Flow Container

First, configure your Ad-Flow container to accept SRT connections. Note: Because Ad-Flow's SRT output is in receiver mode, the connection will be initiated by MediaLive.

Basic Configuration

ParameterValueNotes
OUTPUT_IP0.0.0.0Required for SRT listener mode
OUTPUT_PORT<Your chosen port>Port where container will listen
STREAM_PROTOCOLsrtMust be SRT for this setup
OUTPUT_SRT_STREAMID<Stream ID>Optional identifier
OUTPUT_SRT_PASSPHRASE<Passphrase>Recommended for security

Example Configuration

OUTPUT_IP: "0.0.0.0"            # Required for SRT listener
OUTPUT_PORT: "5000" # Port where container will listen
STREAM_PROTOCOL: "srt"
DELAY_SECONDS: "120" # Match with MediaLive latency
OUTPUT_SRT_STREAMID: "channel1" # Optional Stream ID
OUTPUT_SRT_PASSPHRASE: "your-secure-passphrase" # Recommended

EC2 Configuration

Elastic IP Setup

  1. Find the EC2 instance running the Ad-Flow container
  2. Note down the Elastic IP address - this will be used in MediaLive configuration
  3. Ensure your ECS Cluster allows inbound traffic on your chosen SRT output port

Creating the MediaLive Input

Creating SRT Input

  1. In MediaLive, go to Inputs
  2. Click Create Input
  3. Configure the following settings:
    • Input Type: Select SRT Caller
    • Name: Give your input a descriptive name (e.g., "channel1-srt-input")
    • Network Input Settings:
      • For Primary destination, ie 'SRT caller source A':
        • SRT listener address: Enter your EC2 instance's Elastic IP
        • SRT listener Port: Enter the port configured in Ad-Flow (OUTPUT_PORT)
      • For Secondary destination (if using redundancy), ie 'SRT caller source B':
        • SRT listener address: Enter EC2 instance's Elastic IP for Delay-Flow
        • SRT listener Port: Enter the port configured in Delay-Flow
    • Stream ID: Must match Ad-Flow's OUTPUT_SRT_STREAMID if set
    • Passphrase: Must match Ad-Flow's OUTPUT_SRT_PASSPHRASE
  4. Click Create

Configuration Notes

Single vs. Dual Pipeline

  • For single pipeline:
    • Configure one Ad-Flow container
    • MediaLive will connect to single endpoint
  • For dual pipeline (redundant):
    • Set up two EC2 instances with Elastic IPs
    • Run Ad-Flow on primary instance
    • Run Delay-Flow on secondary instance
    • Configure MediaLive with both endpoints
    • Set identical DELAY_SECONDS on both containers

SRT-Specific Considerations

  1. Security
    • Always use passphrases in production environments
    • Use unique Stream IDs for each input
    • Keep passphrase and Stream ID confidential

Network Considerations

  1. Security Groups
    • ECS Cluster security group must allow inbound SRT traffic from MediaLive
    • Ensure Elastic IP is properly associated with EC2 instance