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
Sample Configuration
Below you'll find a sample configuration for the config/preferences.xml file. Each preset defines a video encoder and an audio encoder independently, allowing you to mix and match encoders as needed.
<Transcoder>
<FFMPEG>
<Path>/usr/bin/ffmpeg</Path>
<Command>-nostdin -i {SOURCE_INPUT} {VIDEO_ENCODER} {AUDIO_ENCODER} -f flv {STREAM_OUTPUT}</Command>
</FFMPEG>
<TranscodeTaskLimit>10</TranscodeTaskLimit>
<ThumbGenerateTaskLimit></ThumbGenerateTaskLimit>
<PresetList>
<Preset name="720p" suffix="_720p">
<Video encoder="libx264">
<Resolution height="720" />
<FrameRate fps="30" keyInterval="30" />
<Bitrate>3500</Bitrate>
<Preset>ultrafast</Preset>
<Profile>high</Profile>
<Tune>zerolatency</Tune>
</Video>
<Audio encoder="aac">
<SampleRate>48000</SampleRate>
<Channels>2</Channels>
<Bitrate>128</Bitrate>
</Audio>
</Preset>
<Preset name="480p" suffix="_480p">
<Video encoder="libx264">
<Resolution height="480"/>
<FrameRate fps="30" keyInterval="30"/>
<Bitrate>2500</Bitrate>
<Preset>ultrafast</Preset>
<Profile>high</Profile>
<Tune>zerolatency</Tune>
</Video>
<Audio encoder="copy"/>
</Preset>
<Preset name="360p" suffix="_360p">
<Video encoder="libx264">
<Resolution height="360" />
<FrameRate fps="30" keyInterval="30" />
<Bitrate>1500</Bitrate>
<Preset>ultrafast</Preset>
<Profile>high</Profile>
<Tune>zerolatency</Tune>
</Video>
<Audio encoder="copy" />
</Preset>
</PresetList>
</Transcoder>
FFMPEG Settings
Path
The <Path> tag should point to the FFMPEG binary location on your system. You can use which to find the right location.
which ffmpeg
Storm will look for FFMPEG in standard system paths if this tag is left empty.
Command
Storm performs transcoding by controlling individual FFMPEG processes. The <Command> tag defines the command template used to launch each process. You may customize it to add extra flags or parameters.
-nostdin -i {SOURCE_INPUT} {VIDEO_ENCODER} {AUDIO_ENCODER} -f flv {STREAM_OUTPUT}
The following variables are available:
| Variable | Required | Description |
|---|---|---|
{SOURCE_INPUT} | Yes | Source of the stream (an address to the RTMP stream). |
{STREAM_OUTPUT} | Yes | Address at which the transcoded stream will be sent to. |
{VIDEO_ENCODER} | Yes | Auto-generated video encoder flags based on preset config. |
{AUDIO_ENCODER} | Yes | Auto-generated audio encoder flags based on preset config. |
Task Limits
Encoding video and audio is a highly demanding process that consumes significant amounts of system resources — including both CPU and memory.
| Parameter | Description |
|---|---|
<TranscodeTaskLimit> | Maximum number of simultaneous transcoding processes. Leave empty for no limit. |
<ThumbGenerateTaskLimit> | Maximum number of simultaneous thumbnail generation tasks. Leave empty for no limit. |
We recommend configuring the TranscodeTaskLimit to utilize no more than 70–80% of the server's available resources.
Transcoding Presets
Each <Preset> defines a transcoding profile with independently configured video and audio encoders. The name attribute identifies the preset (used in Application configuration), and the suffix attribute defines how the transcoded stream name is modified.
<Preset name="720p" suffix="_720p">
<Video encoder="...">
<!-- Video encoder parameters -->
</Video>
<Audio encoder="...">
<!-- Audio encoder parameters -->
</Audio>
</Preset>
| Attribute | Description |
|---|---|
name | Preset identifier. This name must match the one used in Application's TranscodingSettings. |
suffix | Suffix appended to the original stream name to create the transcoded stream name. |
Video Encoders
Storm supports multiple video encoders, including software-based (CPU) and hardware-accelerated (GPU) options. The encoder is selected via the encoder attribute on the <Video> tag.
Common Video Parameters
All video encoders (except copy) share the following parameters:
| Parameter | Description | Required |
|---|---|---|
Resolution:height | Height of the transcoded video in pixels. If omitted along with width, the original source dimensions are used. | No |
Resolution:width | Width of the transcoded video in pixels. If omitted, width is calculated automatically based on the source aspect ratio. | No |
FrameRate:fps | Frame rate (frames per second). Default: 30. | Yes |
FrameRate:keyInterval | Key frame interval (GOP size). Lower values improve seekability and reduce latency. Default: 60. | Yes |
<Bitrate> | Video bitrate in kbps. | Yes |
libx264 (Software H.264)
CPU-based H.264 encoder. Offers the most configuration flexibility and widest compatibility, but consumes significant CPU resources.
<Video encoder="libx264">
<Resolution height="720" />
<FrameRate fps="30" keyInterval="30" />
<Bitrate>3500</Bitrate>
<Preset>ultrafast</Preset>
<Profile>high</Profile>
<Tune>zerolatency</Tune>
</Video>
| Parameter | Description | Default |
|---|---|---|
<Preset> | Compression speed vs quality. Values: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo. | ultrafast |
<Profile> | H.264 profile. Values: baseline, main, high, high10, high422, high444. | main |
<Tune> | Encoder optimization. Values: film, animation, grain, stillimage, psnr, ssim, fastdecode, zerolatency. | zerolatency |
For live streaming, we recommend keeping <Tune> set to zerolatency and <Preset> to ultrafast or superfast to minimize encoding latency.
h264_nvenc (NVIDIA GPU)
Hardware-accelerated H.264 encoder using NVIDIA NVENC. Requires a compatible NVIDIA GPU with NVENC support.
<Video encoder="h264_nvenc">
<Resolution height="720" />
<FrameRate fps="30" keyInterval="60" />
<Bitrate>4000</Bitrate>
<Preset>llhq</Preset>
<Profile>main</Profile>
<BufferSize>8000</BufferSize>
<SpatialAQ>true</SpatialAQ>
<TemporalAQ>true</TemporalAQ>
<GpuIndex>0</GpuIndex>
</Video>
| Parameter | Description | Default |
|---|---|---|
<Preset> | Encoding speed vs quality. Values: p1–p7 (newer SDK) or slow, medium, fast, hp, hq, bd, ll, llhq, llhp, lossless, losslesshp. | llhq |
<Profile> | H.264 profile. Values: baseline, main, high, high444p. | main |
<BufferSize> | VBV buffer size in kbps. 0 means auto. | 0 |
<SpatialAQ> | Spatial Adaptive Quantization. Improves quality by allocating more bits to complex areas. | true |
<TemporalAQ> | Temporal Adaptive Quantization. Improves quality by allocating bits based on temporal changes. | true |
<GpuIndex> | GPU index to use for encoding. Leave empty for auto-selection. | auto |
h264_amf (AMD GPU)
Hardware-accelerated H.264 encoder using AMD Advanced Media Framework. Requires a compatible AMD GPU.
<Video encoder="h264_amf">
<Resolution height="720" />
<FrameRate fps="30" keyInterval="60" />
<Bitrate>4000</Bitrate>
<Quality>balanced</Quality>
<Profile>main</Profile>
<RateControl>cbr</RateControl>
<BufferSize>8000</BufferSize>
<RefFrames>2</RefFrames>
<VBAQ>false</VBAQ>
<GpuIndex>0</GpuIndex>
</Video>
| Parameter | Description | Default |
|---|---|---|
<Quality> | Quality preset. Values: speed, balanced, quality. | balanced |
<Profile> | H.264 profile. Values: baseline, main, high, constrained_baseline, constrained_high. | main |
<RateControl> | Bitrate control mode. Values: cbr, vbr, cqp, vbr_peak, vbr_latency. | cbr |
<BufferSize> | VBV buffer size in kbps. 0 means auto. | 0 |
<MaxBitrate> | Maximum bitrate for VBR modes in kbps. Only used when <RateControl> is set to a VBR variant. | 0 |
<QP> | Quantization Parameter for CQP mode (0–51). Lower value means better quality. Only used with cqp rate control. | 23 |
<RefFrames> | Number of reference frames (1–16). More frames improve compression but increase latency. | 2 |
<VBAQ> | Variance Based Adaptive Quantization. Improves quality through adaptive bit allocation. | false |
<GpuIndex> | GPU index to use for encoding. -1 means auto-selection. | -1 |
h264_qsv (Intel Quick Sync)
Hardware-accelerated H.264 encoder using Intel Quick Sync Video. Available on systems with Intel CPUs that include integrated graphics.
<Video encoder="h264_qsv">
<Resolution height="720" />
<FrameRate fps="30" keyInterval="60" />
<Bitrate>4000</Bitrate>
<Preset>faster</Preset>
<Profile>main</Profile>
<BufferSize>8000</BufferSize>
<AsyncDepth>4</AsyncDepth>
<GpuIndex>0</GpuIndex>
<LowPower>false</LowPower>
</Video>
| Parameter | Description | Default |
|---|---|---|
<Preset> | Encoding speed vs quality. Values: veryfast, faster, fast, medium, slow, slower, veryslow. | faster |
<Profile> | H.264 profile. Values: baseline, main, high. | main |
<BufferSize> | VBV buffer size in kbps. 0 means auto. | 0 |
<AsyncDepth> | Asynchronous processing depth (1–16). Higher values may improve throughput at the cost of latency. | 4 |
<GpuIndex> | GPU index to use for encoding. -1 means auto-selection. | -1 |
<LowPower> | Low power mode. Reduces energy consumption with a slight performance trade-off. | false |
copy (Video Passthrough)
Copies the video stream without re-encoding. This is the fastest option and preserves original quality. No additional parameters are available.
<Video encoder="copy" />
Audio Encoders
Audio encoders are configured independently from video encoders within each preset. The encoder is selected via the encoder attribute on the <Audio> tag.
aac
AAC (Advanced Audio Coding) encoder. Offers good quality at various bitrates and is widely supported across devices and browsers.
<Audio encoder="aac">
<SampleRate>48000</SampleRate>
<Channels>2</Channels>
<Bitrate>128</Bitrate>
</Audio>
| Parameter | Description | Default |
|---|---|---|
<SampleRate> | Sample rate in Hz. Values: 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 96000. | 48000 |
<Channels> | Number of audio channels. Values: 1 (mono), 2 (stereo), 6 (5.1 surround). | 2 |
<Bitrate> | Audio bitrate in kbps (32–320). Recommended: 128–192 kbps for stereo. | 128 |
copy (Audio Passthrough)
Copies the audio stream without re-encoding. Preserves original quality with zero processing overhead. No additional parameters are available.
<Audio encoder="copy" />
A frequently used approach is to combine video transcoding with audio passthrough (copy). This reduces CPU/GPU usage while still providing multiple video quality levels for adaptive streaming.
All parameters support environment variables using the ${EV:VARIABLE_NAME} syntax. Fields locked by environment variables cannot be modified via the REST API.
Useful Links
FFMPEG Manual — https://ffmpeg.org/ffmpeg.html
NVIDIA NVENC Documentation — https://developer.nvidia.com/video-codec-sdk
Intel Quick Sync Video — https://www.intel.com/content/www/us/en/architecture-and-technology/quick-sync-video/quick-sync-video-general.html
If you have any questions or need assistance, please create a support ticket and our team will help you.