immich/server
Sergey Katsubo 4a384bca86
fix(server): opus handling as accepted audio codec in transcode policy (#26736)
* Fix opus handling as accepted audio codec in transcode policy

Fix the issue when opus is among accepted audio codecs in transcode policy
(which is default) but it still triggers transcoding because the codec name
from ffprobe (opus) does not match `libopus` literal in Immich.

Make a distinction between a codec name and encoder:
- codec name: switch to `opus` as the audio codec name. This matches what ffprobe
returns for a media file with opus audio.
- encoder: continue using the `libopus` encoder in ffmpeg.

* Add unit tests for accepted audio codecs and for libopus encoder

* Add db migration for ffmpeg.targetAudioCodec opus

* backward compatibility

* tweak

* noisy logs

* full mapping

* make check happy

* mark deprecated

* update api

* indexOf

---------

Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
2026-03-07 13:08:42 -05:00
..
bin fix(cli): suppress startup messages for immich-admin (#25928) 2026-02-05 18:34:15 -05:00
resources feat: use immich hosted map tiles (#11332) 2024-07-26 15:41:09 +01:00
src fix(server): opus handling as accepted audio codec in transcode policy (#26736) 2026-03-07 13:08:42 -05:00
test fix(server): opus handling as accepted audio codec in transcode policy (#26736) 2026-03-07 13:08:42 -05:00
.gitignore feat(web): re-add open graph tags for public share links (#5635) 2023-12-11 13:37:47 -06:00
.npmignore chore: use pnpm for builds (#19752) 2025-08-19 08:55:24 -04:00
.nvmrc chore(deps): update node.js to v24.13.1 (#26275) 2026-02-17 11:45:57 +01:00
.prettierignore refactor: migrate map repository to kysely (#15348) 2025-01-17 09:14:42 -06:00
.prettierrc fix(server): lint import order (#3974) 2023-09-04 21:45:59 +02:00
Dockerfile chore: bump base images manually (#26670) 2026-03-04 00:54:55 +00:00
Dockerfile.dev chore: bump base images manually (#26670) 2026-03-04 00:54:55 +00:00
eslint.config.mjs chore: finish migrating eslint config files; bump unicorn (#17200) 2025-03-31 12:18:25 +01:00
mise.toml feat: mise monorepo tasks (#23691) 2025-11-10 15:55:15 +01:00
nest-cli.json fix: isolate docker host/container filesystem for node_modules and build output (#21167) 2025-08-24 13:09:45 -05:00
package.json chore: enable prettier caching and quiet output (#26681) 2026-03-04 03:34:48 +00:00
tsconfig.build.json fix: exclude e2e format (#3250) 2023-07-13 21:41:16 -05:00
tsconfig.json chore: migrate to sql-tools library (#26400) 2026-02-23 09:50:16 -05:00