Admins will be upgrading ORNL GitLab Servers on Saturday, 16 May 2026, from 7 AM until 11 AM EST. Repositories will experience intermittent outages during this time.
# see MediaBrowser.Model/Entities/HardwareAccelerationType.cs in jellyfin source
type=mkOption{
type=enum[
"none"
"amf"
"qsv"
"nvenc"
"v4l2m2m"
"vaapi"
# videotoolbox is MacOS-only
"rkmpp"
];
default="none";
description=''
The method of hardware acceleration. See [Hardware Acceleration](https://jellyfin.org/docs/general/post-install/transcoding/hardware-acceleration) for more details.
'';
};
};
forceEncodingConfig=mkOption{
type=bool;
default=false;
description=''
Whether to overwrite Jellyfin's `encoding.xml` configuration file on each service start.
When enabled, the encoding configuration specified in {option}`services.jellyfin.transcoding`
and {option}`services.jellyfin.hardwareAcceleration` will be applied on every service restart.
A backup of the existing `encoding.xml` will be created at `encoding.xml.backup-$timestamp`.
::: {.warning}
Enabling this option means that any changes made to transcoding settings through
Jellyfin's web dashboard will be lost on the next service restart. The NixOS configuration
becomes the single source of truth for encoding settings.
:::
When disabled (the default), the encoding configuration is only written if no `encoding.xml`
exists yet. This allows settings to be changed through Jellyfin's web dashboard and persist
across restarts, but means the NixOS configuration options will be ignored after the initial setup.
'';
};
transcoding={
maxConcurrentStreams=mkOption{
type=nullOrints.positive;
default=null;
example=2;
description=''
Maximum number of concurrent transcoding streams.
Set to null for unlimited (limited by hardware capabilities).
'';
};
enableToneMapping=mkOption{
type=bool;
default=true;
description=''
Enable tone mapping when transcoding HDR content.
'';
};
enableSubtitleExtraction=mkOption{
type=bool;
default=true;
description=''
Embedded subtitles can be extracted from videos and delivered to clients in plain text, in order to help prevent video transcoding. On some systems this can take a long time and cause video playback to stall during the extraction process. Disable this to have embedded subtitles burned in with video transcoding when they are not natively supported by the client device.
'';
};
throttleTranscoding=mkOption{
type=bool;
default=false;
description=''
When a transcode or remux gets far enough ahead from the current playback position, pause the process so it will consume fewer resources. This is most useful when watching without seeking often. Turn this off if you experience playback issues.
'';
};
threadCount=mkOption{
type=nullOrints.positive;
default=null;
example=4;
description=''
Number of threads to use when transcoding.
Set to null to use automatic detection.
'';
};
hardwareDecodingCodecs=mkOption{
type=codecListToType"hardware decoding"[
"h264"
"hevc"
"mpeg2"
"vc1"
"vp8"
"vp9"
"av1"
"hevc10bit"
"hevcRExt10bit"
"hevcRExt12bit"
];
default={};
example={
vp9=true;
h264=true;
};
description=''
Which codecs to enable for hardware decoding.
'';
};
hardwareEncodingCodecs=mkOption{
type=codecListToType"hardware encoding"[
"hevc"
"av1"
];
default={};
example={
av1=true;
};
description=''
Which codecs to enable for hardware encoding. h264 is always enabled.
'';
};
encodingPreset=mkOption{
type=enum[
"auto"
"veryslow"
"slower"
"slow"
"medium"
"fast"
"faster"
"veryfast"
"superfast"
"ultrafast"
];
default="auto";
description=''
Encoder preset for transcoding.
Lower presets sacrifice quality for speed, higher presets optimize quality.
'';
};
deleteSegments=mkOption{
type=bool;
default=true;
description=''
Delete transcoding segments when finished.
'';
};
h264Crf=mkOption{
type=ints.between051;
default=23;
description=''
Constant Rate Factor (CRF) for H.264 encoding. Lower values result in better quality. Range: 0-51.
'';
};
h265Crf=mkOption{
type=ints.between051;
default=28;
description=''
Constant Rate Factor (CRF) for H.265 encoding. Lower values result in better quality. Range: 0-51.
'';
};
enableHardwareEncoding=mkOption{
type=bool;
default=false;
description=''
Enable hardware encoding for video transcoding.
'';
};
enableIntelLowPowerEncoding=mkOption{
type=bool;
default=false;
description=''
Enable low-power encoding mode for Intel Quick Sync Video.