Origin 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 origin application is the basis for creating video streaming clusters. It is very similar to a live application, with just a few minor differences. A single origin-type application will accept multiple connections from edge-type applications

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

                        
<Application name="origin" type="origin">

    <StreamingClusterSettings>
        <SupervisorList>
            <ClusterManager host="mydomain.com" port="443" isSSL="false">
                <Priority>1</Priority>
                <Secret>qwerty*1234556</Secret>
            </ClusterManager>
            <PeerAccessSettings host="mydomain.com" port="1935" isSSL="false"/>
        </SupervisorList>
    </StreamingClusterSettings>

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

	<RecordingSettings enabled="false">
		<SavePath>/Users/Johny/Desktop</SavePath>
		<CacheSize>15</CacheSize>
        <MaxFileSize>15</MaxFileSize>
        <MaxFileDuration>0</MaxFileDuration>
        <MaxStorageSize>0</MaxStorageSize>
        <RemoveOldFiles>true</RemoveOldFiles>
	</RecordingSettings>

	<TranscoderSettings enabled="true">
		<Preset name="720p" />
		<Preset name="360p" />
	</TranscoderSettings>

</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 “origin” for this type of Application.
Table 1. Main parameters table

Streaming Cluster Settings

This block defines a list of ReverendMothers to which information about streams and their status within the cluster is sent. Later, Edge-type applications connected to these same ReverendMothers will be able to locate the stream on the appropriate server with an Origin-type application.

It is possible to define more than one ReverendMother in the list for the purpose of redundancy.

ClusterManager:hostURL or IP to a server hosting ReverendMother instance.
ClusterManager:portPort for ReverendMother connection.
ClusterManager:isSSLTrue/false depending on whenever SSL layer is required.
PriorityPriority for ClusterManager (if more available). Higher the number, higher the priority.
SecretA secret for connection authorization.
PeerAccessSettings:hostPublic host or IP address of this application, so other applications (edge) know where to connect.
PeerAccessSettings:portPublic port of this application, so other applications know where to connect (indicate a port with an active RTMP protocol).
PeerAccessSettings:isSSLWhether the connection should use SSL.
Table 2. Streaming cluster settings table

RTMPController

This block of settings specifies the exact behavior for RTMP-based connections.

AllowStreamPublishDefines whether publishing to this application is allowed or not.
AllowStreamOverwriteIf this option is set to true, a stream can be overwritten by another stream with the same name.
AllowClientPlaybackDefines whether playback from this application is possible for RTMP
AutoPublishStreamDefines whether a stream is published by default or not. A stream cannot be viewed unless it's published (via Control Panel, or Rest-API)
KeepClientStreamsAliveIf this option is set to false, any RTMP created through the pull mechanism (from an external RTMP server) will be closed if the number of viewers drops to zero and remains at that level for 30 seconds.
PlaybackAuthRequiredIf this option is set to true all RTMP clients must authorize for playback using either a token or credentials
Table 3. RTMP connections 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.
MaxFileSizeMaximum video file size. If a stream reaches this size, it will be split into additional files. This parameter is optional, and if not present or set to zero, no limit will be in effect.
MaxFileDurationMaximum video file duration (time). If a stream exceeds this duration, it will be split into multiple files. This parameter is optional, and if not specified or set to zero, there will be no limit in effect.
MaxStorageSizeStorm will calculate sum of all saved video files in particular folder and either stop saving new ones, or it'll start overwriting older files if RemoveOldFiles is set to true. This parameter is optional and if not present or set to 0 no limitation will be added.
RemoveOldFilesIf set to true and combined with MaxStorageSize, older video files will be removed to make space for new ones.
Table 4. Recording settings table

Transcoding Settings

For each individual application a set of presets for transcoding can be selected.

TranscoderSettings:enabledIf set to false, no video stream will be transcoded.
preset:nameName of a preset, previously defined in main Transcoder tag.
Table 5. Transcoding settings table
Support Needed?

Create a free ticket and our support team will provide you necessary assistance.