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
If you are unsure where FFMPEG binaries are located, please you the following command:
Below you’ll find a sample configuration for preferences.xml file.
<Transcoder>
<FFMPEG>
<Path>/usr/bin/ffmpeg</Path>
<Command>-re -nostdin -i {SOURCE_INPUT} -vsync 1 -vcodec libx264 -preset:v {CPU_USAGE_PRESET} -vf scale={OUTPUT_WIDTH}:{OUTPUT_HEIGHT} -tune {TUNE} -g 30 -fflags nobuffer -probesize 32 -analyzeduration 0 -b:v {VIDEO_BITRATE} -acodec aac -b:a {AUDIO_BITRATE} -async 1 -f flv {STREAM_OUTPUT}</Command>
</FFMPEG>
<TranscodeTaskLimit>5</TranscodeTaskLimit>>
<PresetList>
<Preset name="360p" suffix="_360p">
<Resolution height="360" />
<Bitrate video="1000" audio="50" />
<KeyFrameInterval>1</KeyFrameInterval>
<CPUUsagePreset>ultrafast</CPUUsagePreset>
<Profile>main</Profile>
<Tune>zerolatency</Tune>
</Preset>
<Preset name="480p" suffix="_480p">
<Resolution height="480" />
<Bitrate video="1500" audio="50" />
<KeyFrameInterval>1</KeyFrameInterval>
<CPUUsagePreset>ultrafast</CPUUsagePreset>
<Profile>main</Profile>
<Tune>zerolatency</Tune>
</Preset>
<Preset name="720p" suffix="_720p">
<Resolution height="720" />
<Bitrate video="3000" audio="100" />
<KeyFrameInterval>1</KeyFrameInterval>
<CPUUsagePreset>ultrafast</CPUUsagePreset>
<Profile>main</Profile>
<Tune>zerolatency</Tune>
</Preset>
</PresetList>
</Transcoder>
Path should point to FFMPEG binary location on your system. You can use which to find the right location.
which ffmpeg
Note: Storm will look for FFMPEG in standard system paths if this tag is left empty.
Storm performs transcoding by controlling individual FFMPEG processes. You may want to tune your FFMPEG configuration by changing default encoder (for example to NVENC) or adding some preferences. This command line is being used to execute commands and can be modified.
-re -nostdin -i {SOURCE_INPUT} -vsync 1 -vcodec libx264 -preset:v {CPU_USAGE_PRESET} -vf scale={OUTPUT_WIDTH}:{OUTPUT_HEIGHT} -tune {TUNE} -g 30 -fflags nobuffer -probesize 32 -analyzeduration 0 -b:v {VIDEO_BITRATE} -acodec aac -b:a {AUDIO_BITRATE} -async 1 -f flv {STREAM_OUTPUT}
Below you’ll find list of available variables:
Variable name | Required | Description |
---|---|---|
{SOURCE_INPUT} | Yes | Source of the stream (an address to rtmp stream). |
{STREAM_OUTPUT} | Yes | Address at which transcoded stream will be transferred to. |
{CPU_USAGE_PRESET} | No | CPU Usage Preset. |
{OUTPUT_WIDTH} | No | Width of a transcoded stream in pixels. |
{OUTPUT_HEIGHT} | No | Height of a transcoded stream in pixels. |
{OUTPUT_VIDEO_BITRATE} | No | Bitrate for transcoded video data. |
{OUTPUT_AUDIO_BITRATE} | No | Bitrate for transcoded audio data. |
{TUNE} | No | Transcoder tune. e.g. zerolatency. |
Encoding video and audio is a highly demanding process that consumes significant amounts of system resources — including both CPU and memory. The TranscodeTaskLimit parameter sets an upper limit for the number of simultaneous transcoding processes. We recommend configuring this value to utilize no more than 70–80% of the server's available resources.
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 in relations to height parameter. |
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”. |
Create a free ticket and our support team will provide you necessary assistance.