Create a free ticket and our support team will provide you necessary assistance.
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)
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>
<FFMPEGSettings>
<Path>/usr/bin/ffmpeg</Path>
<Command>-re -nostdin -i ${SOURCE_INPUT} -vcodec libx264 -preset:v ${CPU_USAGE_PRESET} -vf scale=${OUTPUT_WIDTH}:${OUTPUT_HEIGHT} -tune ${TUNE} -g 30 -fflags nobuffer -acodec aac -async 1 -f flv ${STREAM_OUTPUT}</Command>
</FFMPEGSettings>
<PresetList>
<Preset name="720p" suffix="_720p">
<Resolution width="1280" height="720" />
<Bitrate video="2500" audio="50" />
<KeyFrameInterval>1</KeyFrameInterval>
<CPUUsagePreset>ultrafast</CPUUsagePreset>
<Profile>main</Profile>
<Tune>zerolatency</Tune>
</Preset>
</PresetList>
</Transcoder>
TranscodingPreset:name | A name for your transcoder preset. This name will have to be applied to TranscodingSettings within an Application. |
TranscodingPreset:appending | Appending defines how stream name will be modified (by adding a new segment). |
Resolution:width | Width of a transcoded video. If this attribute is not provided, video width will be calculated based on source material aspect ratio! |
Resolution:height | Height of a transcoded video. |
Bitrate:video | Bitrate for video data. |
Bitrate:audio | Bitrate for audio data. |
KeyFrameInterval | Interval at which key-frames will be added. For best latency we advise to keep this value to 1. |
CPUUSagePreset | This value defines CPU usage for transcoding task. Possible values: ultrafast, superfast, veryfast, fast, medium, slow, slower, veryslow, placebo. |
Profile | Defines a profile for H.264 encoder. Possible values: high, main, baseline. |
Tune | Type of tuning for the encoder. We highly advice to keep this value to “zerolatency”. |
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.
<Command>-re -nostdin -i ${SOURCE_INPUT} -vcodec libx264 -preset:v ${CPU_USAGE_PRESET} -vf scale=${OUTPUT_WIDTH}:${OUTPUT_HEIGHT} -tune ${TUNE} -g 30 -fflags nobuffer -acodec aac -async 1 -f flv ${STREAM_OUTPUT}</Command>
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. |
$(TUNE) | Transcoder tune. e.g. zerolatency. |
For streams to be transcoded, it is also necessary to activate the transcoding option in the application handling our streams. Transcoding can only be activated in applications of the "live" and "origin" types.
<LiveTranscoding enabled="true">
<preset name="720p" />
<preset name="360p" />
</LiveTranscoding>
The "enabled" parameter unlocks the functionality of the transcoder. Below, the specific presets to be used in this particular application are embedded. Presets are declared globally for all applications, but we have the option to select which ones we will use.
Create a free ticket and our support team will provide you necessary assistance.