immich/server/src
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 chore: migrate migration scripts to sql tools (#26537) 2026-02-26 17:59:52 +01:00
commands chore: migrate to sql-tools library (#26400) 2026-02-23 09:50:16 -05:00
controllers refactor: star rating (#26357) 2026-02-26 14:54:20 +01:00
cores refactor(server): add isProgressive column (#25537) 2026-01-26 17:05:25 -05:00
dtos fix(server): opus handling as accepted audio codec in transcode policy (#26736) 2026-03-07 13:08:42 -05:00
emails fix(docs): add & fix missing alt text to store badge images (#24637) 2025-12-19 09:00:31 -06:00
maintenance refactor(server): move database restores code into a service (#25918) 2026-02-10 12:12:27 -05:00
middleware feat: view the user's app version on the user page (#21345) 2025-10-22 00:36:18 +02:00
queries fix(server): deduplicate shared links in getAll query (#26395) 2026-03-01 14:41:15 -05:00
repositories fix(server): deduplicate shared links in getAll query (#26395) 2026-03-01 14:41:15 -05:00
schema fix(server): opus handling as accepted audio codec in transcode policy (#26736) 2026-03-07 13:08:42 -05:00
services fix(server): opus handling as accepted audio codec in transcode policy (#26736) 2026-03-07 13:08:42 -05:00
types feat: workflow foundation (#23621) 2025-11-14 20:05:05 +00:00
utils fix(server): opus handling as accepted audio codec in transcode policy (#26736) 2026-03-07 13:08:42 -05:00
workers feat: restore database backups (#23978) 2026-01-20 09:22:28 -06:00
app.common.ts feat: maintenance mode (#23431) 2025-11-17 17:15:44 +00:00
app.module.ts refactor(server): move database restores code into a service (#25918) 2026-02-10 12:12:27 -05:00
config.ts fix(server): opus handling as accepted audio codec in transcode policy (#26736) 2026-03-07 13:08:42 -05:00
constants.ts fix(server): opus handling as accepted audio codec in transcode policy (#26736) 2026-03-07 13:08:42 -05:00
database.ts feat(server): SyncAssetEditV1 (#26446) 2026-02-25 18:12:41 +00:00
decorators.ts chore: migrate to sql-tools library (#26400) 2026-02-23 09:50:16 -05:00
enum.ts fix(server): opus handling as accepted audio codec in transcode policy (#26736) 2026-03-07 13:08:42 -05:00
main.ts chore: migrate to sql-tools library (#26400) 2026-02-23 09:50:16 -05:00
plugins.ts feat: workflow ui (#24190) 2025-12-20 21:07:07 -06:00
types.ts chore: migrate to sql-tools library (#26400) 2026-02-23 09:50:16 -05:00
validation.spec.ts feat: batch change date and time relatively (#17717) 2025-08-07 13:42:33 +00:00
validation.ts feat(web): map timeline sidepanel (#26532) 2026-02-26 12:03:23 -05:00