Transcoder Configuration - Storm Streaming Server

Transcoder is a powerful tool for rescaling video materials. Storm uses open-source FFMPEG for all tasks related to transcoding. If FFMPEG is not installed on your system, transcoding will not be possible. In order to check if FFMPEG is present, please try this command line:

                        
ffmpeg -version
                    
(For Windows-based operating systems you can use PowerShell)

Sample configuration

Below you’ll find a sample configuration for preferences.xml file. First part contains a single preset set for transcoding source material to 720p. The second allows for more precise FFMPEG tuning, in case you wish to change default x264 encoder.

                        
<Transcoder>
    <TranscodingPreset name="720p" appending="_720p">
	    <Resolution width="1280" height="720" />
		<Bitrate video="2500" audio="50" />
		<KeyFrameInterval>1</KeyFrameInterval>
		<CPUUsagePreset>ultrafast</CPUUsagePreset>
		<Profile>main</Profile>
		<Tune>zerolatency</Tune>
	</TranscodingPreset>
	<FFMPEGSettings>
		<Command>ffmpeg -re -nostdin -i ${SOURCE_INPUT} -vcodec libx264 -preset:v ${CPU_USAGE_PRESET} -vf scale=${OUTPUT_WIDTH}:${OUTPUT_HEIGHT} -tune ${TUNE}  -fflags nobuffer -acodec aac -f flv ${STREAM_OUTPUT}</Command>
	</FFMPEGSettings>
</Transcoder>
                    

TranscodingPreset

TranscodingPreset:nameA name for your transcoder preset. This name will have to be applied to TranscodingSettings within an Application.
TranscodingPreset:appendingAppending defines how stream name will be modified (by adding a new segment).
Resolution:widthWidth of a transcoded video.
Resolution:heightHeight of a transcoded video.
Bitrate:videoBitrate for video data.
Bitrate:audioBitrate for audio data.
KeyFrameIntervalInterval at which key-frames will be added. For best latency we advise to keep this value to 1.
CPUUSagePresetThis value defines CPU usage for transcoding task. Possible values: ultrafast, superfast, veryfast, fast, medium, slow, slower, veryslow, placebo.
ProfileDefines a profile for H.264 encoder. Possible values: high, main, baseline.
TuneType of tuning for the encoder. We highly advice to keep this value to “zerolatency”.
Table 1. TranscodingPreset table

FFMPEG command

Storm performs transcoding by controlling individual FFMPEG processes. You may want to tune your FFMPEG configuration by changing default encoder (for example to NVENC). This command line is being used to execute commands and can be modified.

Variables:

${SOURCE_INPUT}Source of the stream (an address to rtmp stream)
${STREAM_OUTPUT}Address at which transcoded stream will be transferred to
${CPU_USAGE_PRESET}CPU Usage Preset
${OUTPUT_WIDTH}Width of a transcoded stream in pixels
${OUTPUT_HEIGHT}Height of a transcoded stream in pixels
$(OUTPUT_VIDEO_BITRATE)Bitrate for transcoded video data
$(OUTPUT_AUDIO_BITRATE)Bitrate for transcoded audio data
Table 2. FFMPEG commands table