Edge Application - Storm Streaming Server

Applications are separate group of streams with specific set of parameters and settings. An application defines how streams can be published and viewed.

Sample configuration

An edge application is the basis for creating a video streaming cluster. It is very similar to a live application. A single edge application will connect to an origin application (or multiple ones) and copy its streams when requested. You cannot push streams into an edge-type application.

The basic edge-type application configuration stored in config/preferences.xml looks as follow:

                        
<Application name="edge" type="edge">

    <OriginSources>
		<SourceItem url="sub1.mydomain.com" port="1935" username="admin" password="qwerty"/>
		<SourceItem url="sub2.mydomain.com" port="1935" username="admin" password="qwerty"/>
		<SourceItem url="sub3.mydomain.com" port="1935" username="admin" password="qwerty"/>
	</OriginSources>

	<SecureStream enabled="false">
		<Password>qwerty</Password>
		<CheckViewerIP>true</CheckViewerIP>
		<TokenLifespan>10</TokenLifespan>
	</SecureStream>

	<MP4MuxerSettings>
		<VariableFPS>true</VariableFPS>
		<KeyFrameCompensation>false</KeyFrameCompensation>
	</MP4MuxerSettings>

	<DVRSettings enabled="false">
		<CacheSize>100</CacheSize>
	</DVRSettings>

	<RecordingSettings enabled="false">
		<SavePath>/Users/szymon/Desktop</SavePath>
		<CacheSize>15</CacheSize>
	</RecordingSettings>

</Application>
                    

Main parameters explanation

Application:nameName of this application. If there are more applications within your preferences .xml they all must have unique names.
Application:typeThis value must be set to “edge” for this type of Application.
Table 1. Main parameters table

Origin Sources block

This block defines the source (or multiple sources) for this application. Edge application will copy all streams from the origin server the moment they appear. You can define more than one <sourceItem> for redundancy.

In case of two streams from different origin server having the same steamName, only the first one will be copied (depending on creation time).

sourceItem:urlURL or IP to an origin server.
sourceItem:portPort for origin-edge connection.
sourceItem:sslTrue/false depending on whenever SSL layer is required.
sourceItem:usernameA username for origin-edge authentication.
sourceItem:passwordA password for origin-edge authentication.
Table 2. Origin sources block table

SecureStream Settings

SecureStream allows to protect stream playback using a special token. Can will change depending on viewer’s IP (optionally) or time. If you wish to learn more about this function, check our guide for SecureStream.

SecureStream:enableDefines whenever SecureStream is enabled for this application or not.
PasswordUnique password that will be used for creating a token.
CheckViewerIPDefines whenever viewer’s IP should be used to create a token.
TokenLifespanDefines token’s lifespan (in minutes).
Table 3. SecureStream settings table

MP4 Muxer Settings

MP4MuxerSettings block defines basic options for MP4 packager that is used for MSE/HLS connections

VariableFPSIf the source stream has no const frame rate (e.g. WebRTC-based source) muxer will try to fix the stream by adjusting composition times for selected frames.
KeyFrameCompensationEnables mechanism where “empty” frames are inserted into a stream if Audio/Video desynchronization is detected.
Table 4. MP4 muxer settings table

DVR Settings

DVR function allows for short live-stream rewind mechanism based on cached stream.

DVRSettings:enabledDefines whenever DVR is enabled.
CacheSizeNumber of MB within memory for storing video stream. Length of stored video material will depend on resolution and bitrate.
Table 5. DVR settings table

Recording Settings

Recording option allows for recording video streams into MP4 files.

RecordingSettings:enabledDefines whenever recording is enabled.
SavePathPath were MP4 files should be saved.
CacheSizeDefines how much of a video stream should be kept in memory before being flushed to a file.
Table 6. Recording settings table