{"record":{"id":"3bf9e851137e2096","repo":"immich-app/immich","slug":"config-accel-touppercase-acceleration-does-no","errorCode":null,"errorMessage":"${config.accel.toUpperCase()} acceleration does not support codec '${config.targetVideoCodec.toUpperCase()}'. Supported codecs: ${SUPPORTED_HWA_CODECS[config.accel]}","messagePattern":"(.+?) acceleration does not support codec '(.+?)'\\. Supported codecs: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/src/utils/media.ts","lineNumber":98,"sourceCode":"      }\n      case VideoCodec.Hevc: {\n        return new HEVCConfig(config, tune);\n      }\n      case VideoCodec.Vp9: {\n        return new VP9Config(config, tune);\n      }\n      case VideoCodec.Av1: {\n        return new AV1Config(config, tune);\n      }\n      default: {\n        throw new Error(`Codec '${config.targetVideoCodec}' is unsupported`);\n      }\n    }\n  }\n\n  private static getHWCodecConfig(config: SystemConfigFFmpegDto, interfaces: VideoInterfaces, tune?: VideoTuning) {\n    if (!SUPPORTED_HWA_CODECS[config.accel].includes(config.targetVideoCodec)) {\n      throw new Error(\n        `${config.accel.toUpperCase()} acceleration does not support codec '${config.targetVideoCodec.toUpperCase()}'. Supported codecs: ${SUPPORTED_HWA_CODECS[config.accel]}`,\n      );\n    }\n\n    let handler: VideoCodecSWConfig;\n    switch (config.accel) {\n      case TranscodeHardwareAcceleration.Nvenc: {\n        handler = config.accelDecode\n          ? new NvencHwDecodeConfig(config, interfaces, tune)\n          : new NvencSwDecodeConfig(config, interfaces, tune);\n        break;\n      }\n      case TranscodeHardwareAcceleration.Qsv: {\n        handler = config.accelDecode\n          ? new QsvHwDecodeConfig(config, interfaces, tune)\n          : new QsvSwDecodeConfig(config, interfaces, tune);\n        break;\n      }","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/immich-app/immich/blob/199723261c6ffa897fec8ccdaea6359e39c37cc3/server/src/utils/media.ts#L80-L116","documentation":"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].","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before — config\nffmpeg.accel = 'rkmpp'; ffmpeg.targetVideoCodec = 'vp9';\n\n// after\nffmpeg.accel = 'rkmpp'; ffmpeg.targetVideoCodec = 'h264';","handlingStrategy":"validation","validationCode":"import { SUPPORTED_HWA_CODECS } from 'src/constants';\nconst accel = config.ffmpeg.accel, codec = config.ffmpeg.targetVideoCodec;\nconst ok = SUPPORTED_HWA_CODECS[accel]?.includes(codec) ?? false;\nif (!ok) throw new Error(`Unsupported pair: ${accel} + ${codec}`);","typeGuard":"const isSupportedCodecPair = (accel: string, codec: string): boolean =>\n  Array.isArray(SUPPORTED_HWA_CODECS[accel]) && SUPPORTED_HWA_CODECS[accel].includes(codec as VideoCodec);","tryCatchPattern":"try { await transcode(assetId); }\ncatch (e) { if (/acceleration does not support codec/.test(e.message)) { config.ffmpeg.targetVideoCodec = 'h264'; await retry(); } else throw e; }","preventionTips":["After changing ffmpeg.accel, cross-check targetVideoCodec against SUPPORTED_HWA_CODECS.","For Rockchip/rkmpp limit codecs to h264/hevc."],"tags":["ffmpeg","transcoding","hardware-acceleration","config","codec"],"backgroundTag":null,"analyzedSha":"199723261c6ffa897fec8ccdaea6359e39c37cc3","analyzedAt":"2026-08-12T04:54:27.085Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}