RTMP Functionality - Storm Streaming Server

Storm Streaming Server is equipped with a fully functional server & client RTMP protocol implementation. It can either host a stream by receiving a signal from an external source (push method) or capture an external stream from any other RTMP-compatible source (pull method). Additionally, Storm Streaming Server supports restreaming to popular social media platforms such as Facebook, Twitter, YouTube, TikTok, etc.

Basic Live/Origin-type Application configuration

Before we start broadcasting a live-type or origin-type application must be created first. You can check our Live Application and Origin Application guides to learn how to do this. Once an app is created, we can play with RTMP settings.

Sample RTMPController block from config/preferences.xml

                        
<RTMPController>
	<AllowStreamPublish>true</AllowStreamPublish>
	<AllowStreamOverwrite>true</AllowStreamOverwrite>
	<AllowClientPlayback>true</AllowClientPlayback>
	<KeepClientStreamsAlive>true</KeepClientStreamsAlive>
	<PlaybackAuthRequired>false</PlaybackAuthRequired>
	<Authorization enabled="false" sourceType="local" sourceTarget="abc">
		<Auth username="admin" password="qwerty"/>
		<Auth token="abcdef" expire="2022-02-01 16:22:00"/>
	</Authorization>
</RTMPController>
                    

AllowStreamPublish and AllowClientPlayback control whenever publish and/or playback is allowed for this application. For Origin-type applications you might not want other clients to connect and view the stream, while Edge-type applications should not create new streams on their own.

AllowStreamOverwrite option defines whenever stream can be overwritten by another client. In some scenarios this might be/not be a desired situation.

If we wish to limit publishing capability to only selected users, please enable Authorization block.

Encoders / Broadcasting software - Storm Streaming Server

Storm’s RTMP protocol implementation is compatible with a vast variety of third-party streaming applications and libraries (including both desktop and mobile). Below you'll find some examples:

PlatformOperating systemSoftware
DesktopWindows, MacOS, LinuxOpenBroadcaster (OBS)
WindowsXSplit Broadcaster
Windows, MacOS, LinuxFFMPEG
MobileAndroid, iOSLarix Broadcaster
Android, iOSStreamaxia
Table 1. Streaming applications and libraries table

OpenBroadcaster (OBS)

  1. Open “Settings”, select “Stream” tab and select “Custom” as a service. Two new inputs will appear below:

    ServerURL to your server, e.g. rtmp://localhost/live (it must include rtmp:// part and name of your application after slash).
    Stream keyStream key is equal to streamName in storm.
    Table 2. OBS stream inputs table

    You might want to enable “Use authentication” option is Authentication was enabled for your RTMPController. Storm accepts three authentication methods:

    1. You can use tokens with specified lifetime. These tokens can be specified in Authorization section of the RTMPController block. A single entry will look as follow:
                              
      <Auth token="62cjdj" expire="2022-02-01 16:22:00"/>
                          

      Then, you can add token to your Server input in following manner:
                              
      rtmp://localhost/live?token=62cjdj
                          
    2. You can use username & password field. These can also be specified in Authorization section of the RTMPController block.
                              
      <Auth username="admin" password="qwerty"/>
                          

      and add both parameters to your Server input in following manner:
                              
      rtmp://localhost/live?username=admin&password=qwerty
                          
    3. Use default authorization for RTMP.

      This is in-built authorization standard within some RTMP encoders. Usually, you’ll be provided with additional username & password fields (like in OBS).
  2. Confirm changes.
  3. On the main window click "Start streaming".

XSplit Broadcaster

  1. Go to Broadcast > Set up a new output, then click Custom RTMP. The Custom RTMP broadcast properties will appear.
  2. Enter your stream data:

    ServerURL to your server, e.g. rtmp://localhost/live (it must include rtmp:// part and name of your application after slash).
    Stream keyStream key is equal to streamName in storm.
    Table 3. XSplit stream inputs table

    For authorization you may use similar methods as for OpenBroadcaster described above.
  3. Click OK to save the settings

FFMPEG

FFMPEG application can be also used to push static content (like mp4 files) into a live stream. It's also possible to use it as a real-time video transcoder. Window's version of FFMPEG can be obtained here. For Linux and Mac OS we suggest using inbuilt package managers.

A command line to stream into a file:

                        
ffmpeg -re -nostdin -i /home/john/samples/test01.mp4 -vcodec libx264 -preset:v ultrafast -acodec aac -vf scale=640:266 -f flv rtmp://yourdomain.com/live/test_640_266 &
                    

General codec requirements

For the stream to work properly please make sure that your stream meets the following specification:

Video codecsH.265, H.264, (legacy codecs like VP8, VP6, Sorenson Spark®, Screen Video v1 & v2 are not supported).
Audio codecsAAC, AAC-LC, HE-AAC+ v1 & v2, (legacy codecs like MP3, Speex are not supported).
Table 4. General codec requirements table
Please keep in mind that not all end-devices support H.265 codec. For the best compatibility we advise using H.264 instead.