Live Ingest
Take in a live stream from your encoder over RTMP with Live Ingest, convert it to HLS, and deliver it to viewers through an application.
A live broadcast is watched while it is produced. An encoder captures the audio and video and pushes the stream to an ingest point as it is captured. The ingest point packages the stream into files that a player fetches over HTTP. Viewers never connect to the encoder: servers that received the stream deliver those files to every viewer.
Live Ingest takes in the live stream that your encoder pushes over Real-Time Messaging Protocol (RTMP), in the region of a connector of type live_ingest. It converts the stream to HTTP Live Streaming (HLS). An application delivers the stream to viewers: a rule whose Set Connector behavior names that connector sends their requests to the stream. Use Live Ingest to deliver live events, e-sports matches, and educational broadcasts to their audience.
Live Ingest connector structure
Live Ingest acts through a connector of type live_ingest, which carries one attribute: the region where Live Ingest receives your stream. This body creates one in us-east-1, sent as the body of POST /v4/workspace/connectors:
typeset tolive_ingestgives the connector no addresses and no connection options, so it takes neither Load Balancer nor Origin Shield.attributes.regionis required, and it takes a region such asus-east-1orus-east-2. A request without it is refused with10059, and a value that Azion API does not accept, with10039. For the field and its errors, refer to Connector settings.- The API answers
202with"state": "pending", and the connector reads back with"attributes": {"region": "us-east-1"}. Abucketsent with this type is accepted and not stored. - Azion Console offers the type as the Live Ingest card of Connector Type, with Region as a required field.
Request path
Live Ingest acts at the connector a viewer’s request reaches. When you select a Live Ingest source in a rule, Azion adds the Enforce HLS cache behavior to that Request Phase rule. The behavior bypasses the application’s cache rules and applies the cache policy Azion defines for live HLS transmissions.
This diagram follows the stream in from the encoder and a viewer’s request to it:
- The encoder pushes the live stream to Live Ingest in the region of the connector.
- A viewer requests the stream from a hostname of the workload whose deployment names the application.
- A rule’s Set Connector behavior names the connector of type
live_ingest, and the Enforce HLS cache behavior applies the live HLS cache policy. - The connector serves the stream, and the viewer receives it.
For how Live Ingest takes a stream in and delivers it, refer to Ingestion and delivery.
Scope and limits
- Encoder: Live Ingest receives the stream over RTMP, so the encoder must support RTMP with username and password authentication. Azion provides the credentials and the ingestion URLs of a primary and a backup endpoint, and it may require supported or approved encoders, configurations, and endpoints. The encoder needs no HLS output of its own.
- Region: a connector of type
live_ingesttakes one of five regions. The region decides where the stream enters Azion, not where viewers connect, so choose the one with the shortest path from the encoder. - Cache: Enforce HLS cache caches each playlist,
.m3u8, for 5 seconds and each segment,.ts, for 60 seconds. A cache setting of the application has no effect on these requests. While a copy is valid, it answers every viewer who requests it, so a large audience does not send each of its requests to Live Ingest. - Interfaces: you create the connector in Azion Console, through the API at
/v4/workspace/connectors, or withazion create connector --type live_ingest --file connector.jsonof Azion CLI. To create the connector and its delivery rule from each one, refer to Deliver a live stream from Live Ingest. - Observability: the
connectedUsersMetricsdataset of the Real-Time Metrics GraphQL API carries aggregated data on the users connected to your live streams. - Limits: the bounds of every connector apply to a connector of type
live_ingest, such as anameof 1 to 255 characters. For how Live Ingest is billed, refer to Connectors limits, and for the rates, to Pricing. - HLS from your origin: for an HLS stream your own origin produces, give its playlists and segments their own cache settings, as Enforce HLS cache for live streaming describes.
- Terms: the Connectors glossary defines the words the Live Ingest pages give a specific meaning, such as ingestion region and connector type.