Service: Channel Engine Bridge - EyevinnOSC/community GitHub Wiki

Getting Started

While in most cases it is not a problem to have a CDN pull directly from a FAST Channel Engine in Open Source Cloud there are use cases where you need to push the channel to another live origin. This is what the open source project Channel Engine Bridge aims to solve. This tutorial walks you through how you setup a Channel Engine Bridge in Open Source Cloud to push to either an AWS Media Package origin or an AWS S3 Bucket as origin.

channel_engine_bridge

Prerequisites

  • If you have not already done so, sign up for an OSC account.
  • AWS account
  • A FAST Engine channel

Bridge to an AWS S3 Origin

In this example we will bridge a FAST Engine channel to an AWS S3 bucket as origin.

Step 1: Setup secrets

Create the service secrets for the AWS S3 access.

  • awsaccesskeyid=<aws-access-key-id>
  • awssecretaccesskey=<aws-secret-access-key>

Replace <aws-access-key-id> and <aws-secret-access-key> with your credentials.

Step 2: Create bridge

Click on the button "Create channel-engine-bridge" in the web user interface.

Skärmavbild 2024-07-09 kl  21 52 03

Enter the following in the create dialog.

  • Name: guide
  • Source: https://demo.ce.prod.osaas.io/channels/website/master.m3u8
  • DestType: s3
  • DestUrl: s3://<your-output-bucket>/hls/index.m3u8
  • AwsAccessKeyId: {{secrets.awsaccesskeyid}}
  • AwsSecretAccessKey: {{secrets.awssecretaccesskey}}
  • AwsRegion: <region-where-your-bucket-is-placed>

Skärmavbild 2024-07-09 kl  21 55 29

Then press Create button.

If you rather want to use the OSC command line tool you would run the following command in your terminal to create the bridge.

osc create eyevinn-channel-engine-bridge guide \
  -o Source=https://demo.ce.prod.osaas.io/channels/website/master.m3u8 \
  -o DestType=s3 \
  -o DestUrl=s3://<your-output-bucket>/hls/index.m3u8 \
  -o AwsAccessKeyId="{{secrets.awsaccesskeyid}}" \
  -o AwsSecretAccessKey="{{secrets.awssecretaccesskey}}" \
  -o AwsRegion=eu-north-1

Step 3: Play channel from S3 bucket

The URL to the HLS from the S3 bucket is then https://<your-cloudfront-distribution-for-the-bucket>/hls/index.m3u8 and can be played in any HLS capable video player.

Skärmavbild 2024-07-09 kl  22 00 23

Bridge to an AWS Media Package

Step 1: Setup Media Package

Create a Media Package channel in the AWS console.

Skärmavbild 2024-07-09 kl  22 08 02

Note down the URL, username and password for one of the HLS ingest endpoints.

Step 2: Setup secrets

Create a secret for the HLS ingest endpoint to push to.

  • mediapackageingest=https://<username>:<password>@<URL>

where <URL> is in the format xxxxx.mediapackage.xxxxxx.amazonaws.com/in/v2/146950c8d69d45c7a20f2995803d622e/146950c8d69d45c7a20f2995803d622e/channel

Step 3: Create bridge

Click on the button "Create channel-engine-bridge" in the web user interface.

Enter the following in the create dialog and then press the Create button

  • Name: guide
  • Source: https://demo.ce.prod.osaas.io/channels/website/master.m3u8
  • DestType: mediapackage
  • DestUrl: {{secrets.mediapackageingest}}

or with the OSC command line tool.

osc create eyevinn-channel-engine-bridge guide \
  -o Source=https://demo.ce.prod.osaas.io/channels/website/master.m3u8 \
  -o DestType=mediapackage \
  -o DestUrl="{{secrets.mediapackageingest}}"

Step 4: Create origin endpoint in Media Package

In the AWS console we can now create an origin endpoint for this Media Package channel. We have created one endpoint of type Apple HLS.

Skärmavbild 2024-07-09 kl  22 19 59

We can then obtain the origin playback endpoint and use it with an HLS capable video player.

Skärmavbild 2024-07-09 kl  22 20 38

Also, we can create an additional origin endpoint for the MPEG-DASH format and use an MPEG-DASH player with this endpoint.

Skärmavbild 2024-07-09 kl  22 22 49

⚠️ **GitHub.com Fallback** ⚠️