Using Third Party RTMP Publishers With Red5 Pro

There are a number of RTMP publishers available which give you some out of the box options for streaming to a Red5 Pro server. Two free options are Flash Media Live Encoder (FMLE) and Open Broadcaster Software (OBS). Follows are the optimal settings for using these broadcasters.

Open Broadcaster Software (OBS)

There are a few different versions of OBS Studio. For simplicity, the following covers the Mac version.

There are also many options for OBS. The following settings are for live streaming via a desktop camera. You can also use OBS to share your screen, or stream from a media source (such as a local Mp3 file), among other things.

NOTE: At this time, OBS versions higher than 20.1 are not working with Red5. While we work on a fix, please download an older copy from OBS's GitHub pages.

OBS Dashboard

On the initial screen, select your preferred camera Source from Video Capture Device. Your default camera and microphone should be automatically selected, so you may want to change that if you wish to use different input devices. Click on Settings.

obs dash

OBS Stream Settings for Live

Stream Type: Custom Streaming Server

URL: rtmp://your-server-ip:1935/live

Stream key: your-stream-name

obs dash

OBS Output Settings

Output Mode: Advanced

Streaming Tab

Encoder: x264, place check in Enforce streaming service encoder settings box

Rescale Output: 640x480

Rate Control: VBR

Bitrate: 750

CRF: 23 (default)

Keyframe Interval (seconds, 0=auto): 2

CPU Usage Preset: verfast

Profile: baseline

Tune: fastdecode

Place a check in the box next to Variable Framerate (VFR)

obs dash

OBS Audio Settings

Defaults are OK (Sample Rate 48Khz; Channels Stereo)

OBS Video Settings

Base (Canvas) Resolution: 640x480

Output (Scaled) Resolution: 640x480

Downscale Filter: Bicubic

Integer FPS Value: 30

Publishing with OBS

Click OK to exit out of Settings. Then click on Start Streaming to broadcast.

Screen Sharing via OBS

A common use for OBS publishing is game screen sharing (as with Twitch). The following settings are recommended for streaming your screen using Display Capture on OBS via the Red5 Pro server.

NOTE: Higher resolution and bandwidth publishing will use more CPU on your server

OBS Output Settings for Screen Share

Output Mode: Advanced

Streaming Tab

Encoder: x264, place check in Enforce streaming service encoder settings box

Rescale Output: 1920x1200

Rate Control: VBR

Bitrate: 3000, place check in Use Custom Buffer Size

Buffer Size: 1000

CRF: 23 (default)

Keyframe Interval (seconds, 0=auto): 2

CPU Usage Preset: verfast

Profile: baseline

Tune: fastdecode

obs dash

OBS Audio Settings for Screen Share

Defaults are OK (Sample Rate 48Khz; Channels Stereo)

OBS Video Settings for Screen Share

Base (Canvas) Resolution: 1920x1200

Output (Scaled) Resolution: 1080x720

Downscale Filter: Bicubic (Sharpening scaling, 16 samples)

Integer FPS Value: 30

Wirecast

You can download Wirecast here. Wirecast offers a free trial, but it includes a watermark, so you will want to purchase the full license if you intend to use this for broadcasting. The following assumes that you have some basic knowledge of Wirecast, and includes only basic settings necessary for a Red5 Pro compatible stream.

In Wirecast studio, navigate to Output; Output Settings. Choose RTMP server. The Address will be: rtmp://your-server-url:1935/live.

rtmpserver

Click on the pull down to the right of the Encoding field, and choose New Preset. Give the preset a descriptive name (this example will be red5pro-360p-stream and click OK.

preset

For example, to broadast a 360p stream, use the following settings:

Video Encoding:

  • Encoder: x264 (required)
  • Width: 640
  • Height: 360
  • Frames per second: 15
  • Average bit rate: 750 kbits/sec
  • Quality: Fast encoding
  • Profile: Baseline (required)
  • Key frame every: 30 frames - To ensure a keyframe every 2 seconds, this number must be twice the Frames per second value (for example, if you are broadasting at 30fps, then you want a keyframe every 60 frames)
  • IMPORTANT: do not check Keyframe Aligned.

Audio Encoding:

  • Channels: Stereo
  • Targe bit rate: 96 kbits/sec
  • Sample rate: 48,000 kHz

encoder

Click Save. Then, click OK to close the Output Settings dialog box.

To stream via your FaceTime Camera, for example, click on the + sign to next to the first Layer to attach a video source. Choose Capture Devices > Facetime HD Camera Video.

capturedevice

You will need to add the audio on a different Layer: + > Capture Devices > Built-in Microphone Audio.

audioinput

Click on streamicon to start broadcasting.

Flash Media Live Encoder (FMLE)

You can download the Flash Media Live Encoder here. If you are running FMLE from a Mac you will have different options than if you run it from a PC. Specifically, Mac includes AAC as an Audio format, where Windows does not. Please note that FMLE does not detect the Mac Facetime camera, so you will need to use a USB camera to stream video with FMLE.

Our recommended FMLE settings are as follows:

FMLE Video Settings

Format: H.264

  • click on the wrench for Advanced Encoder Settings and choose Profile: Baseline, Level: 3.0, and Keyframe Frequency: 3 Seconds

Frame Rate: 15.00 fps

Input Size: 640x480

Bit Rate: 500 Kbps, Output Size: 640x480

advanced encoder

FMLE Audio Settings

Format: AAC (NOTE: at this time, Mp3 is supported for WebRTC subscribers, but not by RTSP or HLS)

Channels: Stereo

Sample Rate: 48,000 Hz (if you are using Mp3, then 44,100 Hz)

Bit Rate: 96 Kbps

FMLE Streaming Settings

Place a checkmark in the box next to Stream to Flash Media Server

FMS URL: rtmp://your-server-ip:1935/live

Stream: your-stream-name

fmle settings

Publishing with FMLE

Click on Start to begin streaming.