Blogs

Tutorial: Converting Streams between RTMP and SRT with Magewell Cloud

2021.09.23

Magewell Cloud can convert streams bi-directionally between the RTMP and SRT protocols, allowing users to take advantage of the robustness of SRT within their workflows while providing compatibility with a broader range of devices and software. This post provides a step-by-step introduction to using Magewell Cloud's protocol conversion feature.


Workflow Components Used:

  • The Magewell Cloud software, already installed on your own server or cloud hosting platform and accessible over the internet via a static, public IP address (10.0.1.32 in this example)
  • One Magewell Ultra Encode live streaming encoder (Ultra Encode HDMI model is used in this example)
  • One Magewell Pro Convert decoder (Pro Convert H.26x to HDMI decoder is used in this example)
  • One PTZ camera (as the source for the Ultra Encode encoder)
  • One laptop (for accessing the Magewell Cloud software)
  • One display, several network cables and HDMI cables.

Steps:

Our content flow is outlined in the device connection diagram below. Please refer to our previous blog post How to Add Magewell Streaming and IP Conversion Devices to Magewell Cloud for a tutorial on how to register these devices to Magewell Cloud.

Workflow 1: RTMP to SRT

1. Log into the Magewell Cloud software. Select "Stream Conversion" from the left navigation menu, then click “Add” and select “RTMP”. 

Give the conversion task a Name in the pop-up panel ("RTMP-SRT" in this example), and select "RTMP Push" for the mode. (Magewell Cloud has built-in RTMP server, which can directly receive RTMP streams sent from the encoder. If you instead want to pull RTMP streams from a separate server, select "RTMP Pull" for the mode.) Fill in the “Stream Key” ("test" in this example). You will now see a message "Please push RTMP stream to rtmp://10.0.1.32/live/test" at the bottom of the page. Click "OK".

 

2. Select "All Devices" in the left navigation menu. Click the "Ultra Encode" tab to list all registered Ultra Encode devices, then click the small computer icon on the right to enter its Web GUI.

3. In the Ultra Encode GUI, click "Streaming Server" in the menu on the left, then select "RTMP".

 

Fill in the URL corresponding to your Magewell Cloud settings ("rtmp://10.0.1.32/live" in this example) and the Stream Key ("test" in this example) in the pop-up page, and click "Save".

4. Return to the "Stream Conversion" tab. You will see here that Magewell Cloud has begun receiving the RTMP stream sent by the encoder. Click the small pencil icon to enter the settings page.

In the "OUTPUT" section, click "Add", and select SRT Caller or SRT Listener in the pop-up panel (SRT Listener is used in this example). In SRT workflows, one endpoint identifies itself as a Caller (which initiates the SRT streaming session), and the other as a Listener (which waits for a request from the Caller).

Fill in the name ("SRT" in this example) and port number ("8888" in this example) in the pop-up page.

5. In the Magewell Cloud interface, select "All Devices" in the left navigation menu, and click the “Pro Convert Decoder”tab to find and configure your decoder. Click the small computer icon on the right to enter its Web GUI.

6. In the Pro Convert decoder interface, select the“Source” tab, then click "Add" in the "SOURCE PRESETS" section. Select "MPEG-TS over SRT" from the drop-down list.

Select “Caller” in the mode field, then fill in the IP address and port number of your Magewell Cloud installation (10.0.1.32 and 8888 in this example). Click "OK", then select this stream as your decoding source.

7. By implementing the above steps, RTMP streams can be converted into SRT streams.

 

Workflow 2: SRT to RTMP

1. Select "Stream Conversion" from the left navigation menu, then click “Add” and select “SRT Listener”.

Give the conversion task a Name ("SRT-RTMP" in this example) and specify the port number ("9999" in this example) in the pop-up panel. Then click OK.

2. Enter the Ultra Encode GUI (see step 2 of the RTMP-to-SRT workflow above for details of how to get there), click "Streaming Server" in the menu on the left, then select "SRT Caller".

Fill in the IP address and port number of your Magewell Cloud installation (10.0.1.32 and 9999 in this example).

3. Return to the "Stream Conversion" tab. You will see here that Magewell Cloud has begun receiving the SRT stream sent by the encoder. Click the small pencil icon to enter the settings page.

In the "OUTPUT" section, click "Add" and select RTMP in the pop-up panel.

In the RTMP settings pop-up panel, give the RTMP stream a name (“RTMP” in this example), and specify the URL ("rtmp://10.10.12.195/live" in this example, with 10.10.12.195 being the IP address of the decoder) and Stream Key ("test" in this example). Click “OK”.

 

4. Enter the Pro Convert decoder’s interface (see step 5 of the RTMP-to-SRT workflow above for details of how to get there). Select the “Source” tab, then click "Add" in the "SOURCE PRESETS" section. Select "RTMP Push" from the drop-down list.

Fill in the Name and Stream Key (“RTMP” and “test”, respectively, in this example). Click "OK", then select this stream as your decoding source.

5. By implementing the above steps, SRT streams can be converted into RTMP streams.