immich/server/test
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
..
factories feat(server): SyncAssetEditV1 (#26446) 2026-02-25 18:12:41 +00:00
fixtures fix(server): opus handling as accepted audio codec in transcode policy (#26736) 2026-03-07 13:08:42 -05:00
medium fix: resolve medium test asset paths relative to file location (#26683) 2026-03-04 08:23:58 -05:00
repositories refactor: prefer buffer (#26469) 2026-02-24 13:26:36 +00:00
mappers.ts fix(server): Live Photo migration bug when album is in template (#25329) 2026-02-27 12:46:55 +01:00
medium.factory.ts fix: resolve medium test asset paths relative to file location (#26683) 2026-03-04 08:23:58 -05:00
small.factory.ts refactor: prefer buffer (#26469) 2026-02-24 13:26:36 +00:00
utils.ts chore: migrate to sql-tools library (#26400) 2026-02-23 09:50:16 -05:00
vitest.config.medium.mjs chore: add vitest project names and fix server config root paths (#26684) 2026-03-04 08:20:43 -05:00
vitest.config.mjs chore: add vitest project names and fix server config root paths (#26684) 2026-03-04 08:20:43 -05:00