RTMP Ingest
Phenix supports ingest via RTMP push directly into a channel. This page provides specifics about the APIs used for RTMP. For additional information, such as limits on specific sources, please see the RTMP Integration Guide.
Push your RTMP feed to rtmp://ingest.phenixrts.com:80/ingest/
using the stream key from the channel API.
Additional information on finding your stream key can be found on the related How-To page.
The basic RTMP URL looks like the following:
rtmp://ingest.phenixrts.com:80/ingest/{STREAMKEY}
RTMP URL Options
Option | Default | Description |
---|---|---|
capabilities | hd,multi-bitrate | A comma separated list of capabilities for the published stream. See below for more information. |
tags | A comma separated list of custom tags. | |
screenName | auto | The screen name of the channel member representing this ingest. The screen name is automatically chosen to properly enable functionality like HA publishing. |
maxFps | 30 | [Advanced] Controls the maximal frame rate sampled from the source signal when using source-uri-ingest . Support of signals with more than 30 FPS is experimental. |
buffer | 500 | [Advanced] The amount of buffer to use on the ingest side to compensate for network jitter when using source-uri-ingest . |
prerollSkipDuration | 500 | [Experimental] Milliseconds to skip at the beginning of the stream when using source-uri-ingest . |
jitterBuffer | auto to same value as buffer | [Experimental] The amount of jitter buffer to use after decoding and sampling of the ingest signal. This value should generally equal or larger than buffer . |
Please note that changing options marked as experimental may alter expected behavior and may have unintended side effects and therefore should only be modified after consultation with the Phenix support staff.
Capabilities and Tags
RTMP publishing capabilities and tags can be set dynamically in the stream key or URL, or at the time of channel creation.
Dynamic in Stream Key or URL
Capabilities and tags may be provided in the RTMP URL separated by semicolons, for example:
rtmp://ingest.phenixrts.com:80/ingest/{STREAMKEY};capabilities=fhd,multi-bitrate;tags=my-awesome-stream-id,my-customer-id
If your system does not allow the inclusion of semicolons in the URL, the |
(pipe) can be used instead, for example:
rtmp://ingest.phenixrts.com:80/ingest/{STREAMKEY}|capabilities=fhd,multi-bitrate,prefer-h264|tags=my-awesome-stream-id,my-customer-id
The separator in the URL can be either a semicolon ;
or a pipe |
, but the
two cannot be mixed in the same URL. For example, the following URL would
result in unexpected behavior:
rtmp://ingest.phenixrts.com:80/ingest/{STREAMKEY};capabilities=fhd,multi-bitrate|tags=my-awesome-stream-id,my-customer-id
Static at Channel Creation
Another method of adding options to RTMP publishing is to create them as a default (also known as "hardcoded capabilities") when creating a Channel or Room using the ingestOptions array.
Commonly-used capabilities include:
- Preferred resolution, either
fhd
, orhd
, orsd
multi-bitrate
high-fidelity
monitor-tracks
kill-session-on-stream-ended
kill-session-on-stream-failure
aspect-ratio=16x9
When publishing RTMP to the Channel, use the Stream Key with no capabilities in your publishing tool or in the RTMP URL. If capabilities are passed with the RTMP stream key, the default settings will be ignored. Note that the RTMP stream key provided on the EdgeAuth/Publishing page in the Phenix Customer Portal includes capabilities.
To see the ingestOptions for a Room or Channel, fetch the Room or fetch the Channel.
When publishing to the Channel using any other method (e.g., SRT or the Phenix Web SDK), the capabilities and tags set using this method are not applied.
PUT /pcast/channel HTTP/1.1
Host: pcast.phenixrts.com
Accept: application/json
Authorization: Basic YXBwbGljYXRpb25JZDpzZWNyZXQ=
Content-Type: application/json
Content-Length: 172
{
"channel": {
"alias": "<channelAlias>",
"name": "<channelName>",
"description": "<channelDescription>",
"options": [],
"ingestOptions": {
"capabilities": ["hd,multi-bitrate","prefer-h264","aspect-ratio=9x16"],
"tags": ["my-awesome-stream-id","my-customer-id"]
}
}
}