Step C: Deliver the source media - Elemental Inference

Step C: Deliver the source media

To deliver the source media, you must use an AWS API or SDK. You can't deliver the media using the Elemental Inference console.

  1. Obtain the data endpoint for the feed:

  2. Use the Elemental Inference PutMedia operation to deliver the source media to that data endpoint. Make sure to stay within the quotas for the Request rate for PutMedia and the Request rate for PutMedia (in a burst). To view the current quotas, open the Service Quotas console. In the navigation pane, choose AWS services and select AWS Elemental Inference.

Streaming requirements

You must deliver the source media according to the CMAF Ingest (Interface-1) version 1.2 specification.

The following table identifies specific requirements for Elemental Inference.

Characteristic Requirement
Media segment duration 0-2 seconds

Ingestion order

Elemental Inference will ingest all media segments (audio and video) for a given sequence number before proceeding to the next sequence number

End of Stream indicator (workaround)

Typically, the last media segment includes lmsg.

However, if you can't signal the end of stream in this way (for example, you are using FFMG), then flush the Elemental Inference internal buffer as follows:

  • Send up to 10 seconds of slate.

Manifest CMAF Ingest doesn't support manifests.

Example

The following code sample shows how to use CURL to use the PUT operation to send the content to the data endpoint of a feed. (The example assumes that you have exported your AWS credentials as environment variables, which is standard practice when using the AWS REST API.)

# Initialization $ awscurl --region <region> --service elemental-inference -X PUT \ 'https://<data-endpoint>/v1/feed/<feed-id>/input/0/media/Streams(default-audio.cmfa)/InitializationSegment' \ --data-binary -d '@Streams(default-audio.cmfa)/InitializationSegment' $ awscurl --region <region> --service elemental-inference -X PUT \ 'https://<data-endpoint>/v1/feed/<feed-id>/input/0/media/Streams(default-video.cmfv)/InitializationSegment' \ --data-binary -d '@Streams(default-video.cmfv)/InitializationSegment' # Media $ awscurl --region <region> --service elemental-inference -X PUT \ 'https://<data-endpoint>/v1/feed/<feed-id>/input/0/media/Streams(default-audio.cmfa)/Segment(<sequence>)' \ --data-binary -d '@Streams(default-audio.cmfa)/Segment(<sequence>)' $ awscurl --region <region> --service elemental-inference -X PUT \ 'https://<data-endpoint>/v1/feed/<feed-id>/input/0/media/Streams(default-video.cmfv)/Segment(<sequence>)' \ --data-binary -d '@Streams(default-video.cmfv)/Segment(<sequence>)'