{"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":105,"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: ConfigFFmpegDto, 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":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/immich-app/immich/blob/e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c/server/src/utils/media.ts#L87-L123","documentation":"getHWCodecConfig first checks that the chosen hardware acceleration method (accel: nvenc, qsv, vaapi, rkmpp, etc.) supports the configured target codec via SUPPORTED_HWA_CODECS. If not, it throws listing the codecs the accelerator does support. Hardware encoders only expose a subset of codecs per platform.","triggerScenarios":"E.g. NVENC configured with targetVideoCodec av1 on a GPU without AV1 encoding; qsv with hevc on unsupported iGPU; rkmpp with a codec the SoC cannot encode.","commonSituations":"Copying another machine's transcoding config to a different GPU; older GPUs lacking AV1 hardware encode; picking a codec in the admin UI that the acceleration method rejects at runtime.","solutions":["Change targetVideoCodec to one listed in the error's 'Supported codecs' for your accel value","Upgrade GPU drivers/firmware if your hardware should support the codec (e.g. AV1 on newer NVENC GPUs)","Set accel to a method that supports your desired codec, or disable acceleration for that codec","Verify hardware capabilities (nvidia-smi, intel_gpu_top, vainfo) before configuring"],"exampleFix":"// before\n{ \"ffmpeg\": { \"accel\": \"qsv\", \"targetVideoCodec\": \"av1\" } }\n// after\n{ \"ffmpeg\": { \"accel\": \"qsv\", \"targetVideoCodec\": \"h264\" } }","handlingStrategy":"validation","validationCode":"const SUPPORTED_HWA_CODECS = { nvenc: ['h264','hevc','av1'], qsv: ['h264','hevc','vp9','av1'], vaapi: ['h264','hevc','vp9','av1'], rkmpp: ['h264','hevc'] };\nif (!SUPPORTED_HWA_CODECS[config.accel]?.includes(config.targetVideoCodec)) {\n  throw new Error(`${config.accel} cannot encode ${config.targetVideoCodec}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  const cfg = getHWCodecConfig(config, interfaces);\n} catch (e) {\n  if (/does not support codec/.test(e.message)) {\n    // parse e.message 'Supported codecs: [...]' and pick a supported one\n  }\n}","preventionTips":["Check your GPU's encode matrix before enabling a codec with HW accel","Avoid copying accel configs between machines with different GPUs","Fall back to software encoding for codecs the accelerator lacks"],"tags":["video","ffmpeg","hardware-acceleration","codec"],"backgroundTag":"conflicting-config-options","analyzedSha":"e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c","analyzedAt":"2026-09-15T07:20:19.675Z","contentChangedAt":"2026-09-15T07:20:19.675Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}