Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Since an RTMP stream is sent from an encoder to Phenix via RTMP, the encoder must be set up to send its output to Phenix. This means that, while the Phenix Customer Portal can be used to obtain information such as the stream key, the Portal’s publishing tab cannot be used to publish RTMP to the Phenix platform.

The examples shown below include optional “tags” for completeness.

Encoder Configuration for RTMP Ingest

...

  • Protocol="RTMP"

  • Key points for smooth playback:

    • Scene Change Detection="off"

    • Use Baseline Profile of H.264

    • GOP Size(keyframe interval)="1 Sec"

    • Repeat PPS=True #Places a PPS header on each encoded picture, even if repeated.

    • Slices="1"

    • Adaptive Quantization="Auto"

    • Use AAC-LC Stereo 128kbps Sample Rate "48kHz"

vMix

To ensure minimal latency, use the following recommended settings for vMix:

  • Video Bit Rates: 2500, Encode Size 1280x720, Audio Bit Rate 128

  • Video

    • Profile: Baseline

    • Level: 2/1

    • Preset: ultrafast

  • Audio

    • Format: AAC

  • Keyframe Frequency: 1 second

  • Network Buffer: the lowest setting allowed

  • Check both boxes for Strict CBR and Keyframe Aligned

...

FFMPEG

When using ffmpeg, be sure to use the zerolatency option to get real-time output. This is not set automatically. Without the zerolatency setting the encoder will introduce 0.5 seconds of end-to-end latency out of the gate. Please refer to the ffmpeg documentation for details.

...

ffmpeg -re -f lavfi -i testsrc=size=1280x720:rate=30 -f lavfi -i aevalsrc="0.1*sin(2*PI*(360-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)" -pix_fmt yuv420p -vcodec libx264 -profile:v baseline -deblock 1:0 -bitrate 500k -tune zerolatency -x264opts keyint=30 -acodec aac -ar 48000 -ac 2 -b:a 128k -f flv rtmp://ingest.phenixrts.com:80/ingest/96characterStreamKey;capabilities=hd,multi-bitrate,mpegts-unicast-ingest;tags=my-awesome-stream-id,MyAppId

Where : 96characterStreamKey is the stream key to be used when publishing. This can be found in the Customer Portal under the Properties tab for a Channel or Room.

...

MyAppId is your application ID

To measure latency, add a timestamp overlay:

ffmpeg -re -f lavfi -i testsrc=size=1280x720:rate=30 -f lavfi -i aevalsrc="0.1*sin(2*PI*(360-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)" -pix_fmt yuv420p -vf "drawtext=text='timestamp: %{pts \: hms}': x=20: y=20: fontsize=72:fontcolor=white@0.9: box=1: boxcolor=black@0.6" -vcodec libx264 -profile:v baseline -deblock 1:0 -bitrate 500k -tune zerolatency -x264opts keyint=30 -acodec aac -ar 48000 -ac 2 -b:a 128k -f flv rtmp://ingest.phenixrts.com:80/ingest/96characterStreamKey;capabilities=hd,multi-bitrate,mpegts-unicast-ingest;tags=my-awesome-stream-id,MyAppId

Where:

Note

On MacOS and Linux, you may need to add quotation marks around the second argument in order to not lose information after the semicolon:
"rtmp://ingest.phenixrts.com:80/ingest/96characterStreamKey;capabilities=hd,multi-bitrate,mpegts-unicast-ingest;tags=my-awesome-stream-id"

Where 96characterStreamKey is the stream key to be used when publishing. This can be found in the Customer Portal under the Properties tab for a Channel or Room.

...

...

API Usage

For details on API usage, please refer to https://phenixrts.com/docs/api/?http#rtmp-ingest . To take advantage of Real-time RTMP, you must include the mpegts-unicast-ingest capability.

...

rtmp://ingest.phenixrts.com:80/ingest/96characterStreamKey;capabilities=hd,multi-bitrate,mpegts-multicastunicast-ingest;tags=my-awesome-stream-id,MyAppId

Where : 96characterStreamKey is the stream key to be used when publishing. This can be found in the Customer Portal under the Properties tab for a Channel or Room.

...