immich-app/immich · error · Error
${config.accel.toUpperCase()} acceleration does not support
Error message
${config.accel.toUpperCase()} acceleration does not support codec '${config.targetVideoCodec.toUpperCase()}'. Supported codecs: ${SUPPORTED_HWA_CODECS[config.accel]} What it means
Thrown by VideoInterface.getHWCodecConfig (server/src/utils/media.ts) when the configured hardware acceleration (config.accel, e.g. nvenc/qsv/vaapi/rkmpp) does not support the requested targetVideoCodec. The per-acceleration allow-list is SUPPORTED_HWA_CODECS in constants.ts: nvenc=[h264,hevc,av1], qsv=[h264,hevc,vp9,av1], vaapi=[h264,hevc,vp9,av1], rkmpp=[h264,hevc].
Source
Thrown at server/src/utils/media.ts:98
}
case VideoCodec.Hevc: {
return new HEVCConfig(config, tune);
}
case VideoCodec.Vp9: {
return new VP9Config(config, tune);
}
case VideoCodec.Av1: {
return new AV1Config(config, tune);
}
default: {
throw new Error(`Codec '${config.targetVideoCodec}' is unsupported`);
}
}
}
private static getHWCodecConfig(config: SystemConfigFFmpegDto, interfaces: VideoInterfaces, tune?: VideoTuning) {
if (!SUPPORTED_HWA_CODECS[config.accel].includes(config.targetVideoCodec)) {
throw new Error(
`${config.accel.toUpperCase()} acceleration does not support codec '${config.targetVideoCodec.toUpperCase()}'. Supported codecs: ${SUPPORTED_HWA_CODECS[config.accel]}`,
);
}
let handler: VideoCodecSWConfig;
switch (config.accel) {
case TranscodeHardwareAcceleration.Nvenc: {
handler = config.accelDecode
? new NvencHwDecodeConfig(config, interfaces, tune)
: new NvencSwDecodeConfig(config, interfaces, tune);
break;
}
case TranscodeHardwareAcceleration.Qsv: {
handler = config.accelDecode
? new QsvHwDecodeConfig(config, interfaces, tune)
: new QsvSwDecodeConfig(config, interfaces, tune);
break;
}View on GitHub (pinned to 199723261c)
Solutions
- Set ffmpeg.targetVideoCodec to one listed in SUPPORTED_HWA_CODECS for your chosen accel (check the error's 'Supported codecs' suffix).
- For rkmpp use h264 or hevc; for vp9/av1 use qsv or vaapi (or disable hardware acceleration).
- After changing config, re-run the failed transcode job.
Example fix
// before — config ffmpeg.accel = 'rkmpp'; ffmpeg.targetVideoCodec = 'vp9'; // after ffmpeg.accel = 'rkmpp'; ffmpeg.targetVideoCodec = 'h264';
Defensive patterns
Strategy: validation
Validate before calling
import { SUPPORTED_HWA_CODECS } from 'src/constants';
const accel = config.ffmpeg.accel, codec = config.ffmpeg.targetVideoCodec;
const ok = SUPPORTED_HWA_CODECS[accel]?.includes(codec) ?? false;
if (!ok) throw new Error(`Unsupported pair: ${accel} + ${codec}`); Type guard
const isSupportedCodecPair = (accel: string, codec: string): boolean => Array.isArray(SUPPORTED_HWA_CODECS[accel]) && SUPPORTED_HWA_CODECS[accel].includes(codec as VideoCodec);
Try / catch
try { await transcode(assetId); }
catch (e) { if (/acceleration does not support codec/.test(e.message)) { config.ffmpeg.targetVideoCodec = 'h264'; await retry(); } else throw e; } Prevention
- After changing ffmpeg.accel, cross-check targetVideoCodec against SUPPORTED_HWA_CODECS.
- For Rockchip/rkmpp limit codecs to h264/hevc.
When it happens
Trigger: A transcode job runs while ffmpeg.accel and ffmpeg.targetVideoCodec are incompatible — e.g. accel=vaapi with targetVideoCodec not in the vaapi list, or accel=rkmpp (Rockchip) with vp9/av1.
Common situations: User switches hardware acceleration without also changing targetVideoCodec; running on Rockchip (rkmpp) hardware that only supports h264/hevc but codec is set to vp9/av1; copying an ffmpeg config from another deployment with different hardware.
Related errors
- Device '${deviceName}' does not exist. If using Docker, make
- Real-time transcoding is not enabled
- No supported variants for this video
- No /dev/dri devices found. If using Docker, make sure at lea
- Password login has been disabled
AI-assisted analysis of immich-app/immich@199723261c (2026-08-12).
Data as JSON: /api/errors/3bf9e851137e2096.
Report an issue: GitHub.