Configuration
This section details the environment variables used for the Smelter deployment configuration. Every environment variable listed below is optional.
SMELTER_API_PORT
API port of the Smelter API.
- Defaults to:
8081
SMELTER_INSTANCE_ID
ID returned from GET /status
request. Can be used to verify that a connection was established to the correct smelter instance.
- Defaults to: the random number
SMELTER_OUTPUT_FRAMERATE
Output framerate for all output streams.
- Defaults to:
30
- Supported values:
number
string
in theNUM/DEN
format, where both NUM and DEN are unsigned integers
SMELTER_OUTPUT_SAMPLE_RATE
Output sample rate for all output streams.
- Defaults to:
48000
- Supported values:
- Sample rates (
8000
,12000
,16000
,24000
,48000
) in number or string format
- Sample rates (
SMELTER_FORCE_GPU
If enabled, GPU will be required for rendering. If only CPU based adapters will be found then process will exit with an error.
- Defaults to:
false
- Supported values:
true
or1
, to enablefalse
or0
, to disable
SMELTER_STREAM_FALLBACK_TIMEOUT_MS
Timeout duration (in ms) that specifies when the smelter should switch to a fallback option if the input stream ceases to send frames.
- Defaults to:
500
SMELTER_LOGGER_LEVEL
Value or configuration string that specifies the granularity of log capture.
- Defaults to:
info,wgpu_hal=warn,wgpu_core=warn
- Supported values:
error
,warn
,info
,debug
,trace
string
containing tracing-subscriber configuration (see documentation for more details)
SMELTER_LOGGER_FORMAT
Logger output format.
- Defaults to:
json
- Supported values:
json
,compact
,pretty
SMELTER_FFMPEG_LOGGER_LEVEL
Value that specifies the granularity of log capture for FFmpeg.
- Defaults to:
warn
- Supported values:
error
- equivalent to FFmpeg’serror, 16
warn
- equivalent to FFmpeg’swarning, 24
info
- equivalent to FFmpeg’sinfo, 32
debug
- equivalent to FFmpeg’sdebug, 48
See -loglevel
option in FFmpeg docs for more details.
SMELTER_DOWNLOAD_DIR
Path specifying where to store downloaded files.
- Defaults to: the location provided by the OS
SMELTER_WEB_RENDERER_ENABLE
If enabled, Smelter will support web rendering capabilities.
- Defaults to:
false
- Supported values:
true
or1
, to enablefalse
or0
, to disable
SMELTER_WEB_RENDERER_GPU_ENABLE
If enabled, Smelter will support GPU inside the embedded Chromium instance.
- Defaults to:
true
- Supported values:
true
or1
, to enablefalse
or0
, to disable
SMELTER_OFFLINE_PROCESSING_ENABLE
If enabled, sets SMELTER_AHEAD_OF_TIME_PROCESSING_ENABLE
and SMELTER_NEVER_DROP_OUTPUT_FRAMES
options to true. If those options are also defined they take priority over SMELTER_OFFLINE_PROCESSING_ENABLE
.
- Defaults to:
false
- Supported values:
true
or1
, to enablefalse
or0
, to disable
SMELTER_AHEAD_OF_TIME_PROCESSING_ENABLE
If enabled, the Smelter server will try to generate output frames/samples ahead of time if all inputs are available.
- Defaults to:
false
- Supported values:
true
or1
, to enablefalse
or0
, to disable
SMELTER_NEVER_DROP_OUTPUT_FRAMES
If enabled, the Smelter server will not drop frames/samples from output stream even if rendering or encoding is not fast enough to process it in real time.
- Defaults to:
false
- Supported values:
true
or1
, to enablefalse
or0
, to disable
SMELTER_RUN_LATE_SCHEDULED_EVENTS
Parts of the smelter API support a schedule_time_ms field to apply certain actions at a specific time. If enabled, the event will still be executed, even if it was scheduled too late.
- Defaults to:
false
- Supported values:
true
or1
, to enablefalse
or0
, to disable
SMELTER_REQUIRED_WGPU_FEATURES
List of WebGPU features to enable.
- Defaults to:
- Supported values:
string
containing comma-separated list of WebGPU features (see Rust WebGPU documentation for the list of available options)
SMELTER_INPUT_BUFFER_DURATION_MS
Duration (in ms) of an input buffer in milliseconds. New stream will not be processed until this buffer is filled.
- Defaults to:
80
(about 5 frames in 60 fps)