Skip to content

Comments

Feature - Added optional selecting preferred audio transcode codec and enable/disable of any audio codec.#5419

Open
Ranft65 wants to merge 6 commits intojellyfin:masterfrom
Ranft65:master
Open

Feature - Added optional selecting preferred audio transcode codec and enable/disable of any audio codec.#5419
Ranft65 wants to merge 6 commits intojellyfin:masterfrom
Ranft65:master

Conversation

@Ranft65
Copy link

@Ranft65 Ranft65 commented Feb 14, 2026

These commits provide the following user options under advanced playback preferences:

  1. Optionally set preferred audio transcoding to AAC, AC3, and MP3.

  2. Optionally enable/disable any audio codec. Transcoding will occur for any disabled audio codec (if supported by the Jelly server).

Many clients have poor AAC support and only support stereo AAC. This PR allows surround sound AAC media files to provide surround sound output on devices that do not support AAC surround sound by forcing a transcode of AAC. This PR can do the same for the other audio codecs as well by forcing transcodes of them (if supported by the Jellyfin server).

The setting of the preferred audio codec for audio transcoding was limited to AAC, AC3, and MP3 since there were issues with the Jellyfin server audio transcoding of the other audio codecs. Unexpected or failure of audio output may occur if disabling of the audio codecs is done such to force the Jellyfin server audio transcode to anything other than AAC, AC3, or MP3,

This PR was inspired by the open PR #5025 by https://github.com/andreasgerner.

Issues
Fixes #2867, #2602, #2991, #2432 and possibly a lot of similar issues.
Rework for #3109.
Rework for some parts of #3110.

…ed playback preferences:

1) Prefer transcoding to Dolby Digital
2) Disable AAC support (force AAC transcode)
@Ranft65 Ranft65 changed the title Add "Prefer Dolby Digital transcoding" and "Disable AAC support (force AAC transcode)" advanced playback options Feature: Add "Prefer Dolby Digital transcoding" and "Disable AAC support (force AAC transcode)" advanced playback options Feb 14, 2026
@Ranft65 Ranft65 changed the title Feature: Add "Prefer Dolby Digital transcoding" and "Disable AAC support (force AAC transcode)" advanced playback options Feature - Add "Prefer Dolby Digital transcoding" and "Disable AAC support (force AAC transcode)" advanced playback options Feb 14, 2026
@rafalb8
Copy link

rafalb8 commented Feb 14, 2026

Nice work. The force AAC transcode is working, but I also have some files in Opus 5.1 which are not being transcoded.
It would be nice to just select all supported codecs from the list and have the unsupported ones transcoded.

I have soundbar connected with HDMI ARC, so only supported surround formats are EAC3 (with Atmos), AC3 and DTS.

…ed playback preferences:

1) Prefer transcoding to Dolby Digital
2) Optionally disable AAC, DTS, FLAC, MP3, OPUS, TRUEHD, and/or VORBIS (force transcode)
@Ranft65
Copy link
Author

Ranft65 commented Feb 14, 2026

PR updated to disable (force transcode of) AAC, DTS, FLAC, MP3, OPUS, TRUEHD, and/or VORBIS codecs.
Please disregard the first commit. It was not correct and incomplete.

@Ranft65 Ranft65 changed the title Feature - Add "Prefer Dolby Digital transcoding" and "Disable AAC support (force AAC transcode)" advanced playback options Feature - Add "Prefer Dolby Digital transcoding" and "Disable AAC, DTS, FLAC, MP3, OPUS, TRUEHD, and/or VORBIS support (force transcode)" advanced playback options Feb 14, 2026
@rafalb8
Copy link

rafalb8 commented Feb 14, 2026

Tested a little bit more with latest changes.
The audio transcodes to AC3, but can't figure out why sometimes it transcodes video and audio.
Tested HEVC+AAC+dvd_sub, HEVC+AAC+SRT, AV1+OPUS+SRT.

Turning of subs, allows for direct play video with audio transcode, but not always.

@Ranft65
Copy link
Author

Ranft65 commented Feb 14, 2026

The only changes I made were related to the supported audio codec list. The changes should have no effect on the video processing except that forcing a transcode by the server will limit the video output to be as supported / prioritized by the server (I think). You should check how your playback settings are on the server for when transcodes are done. Check
http://localhost:8096/web/index.html#/mypreferencesplayback
and
http://localhost:8096/web/index.html#/dashboard/playback/transcoding

I initially tried to change the server code to do what I wanted but found the server code to be complicated to figure out so I started hacking at the client instead after seeing what andreasgerner (https://github.com/andreasgerner) had already done to the client.

@Pentaphon
Copy link
Contributor

@nielsvanvelzen could this supercede #5025 ?

@Ranft65
Copy link
Author

Ranft65 commented Feb 15, 2026

Yes it can. It includes the changes done by #5025 except that it is done to the current master so it can be merged with current master. There seems to have been an overhaul of the code since #5025.

@Ranft65 Ranft65 marked this pull request as draft February 15, 2026 23:50
…ed playback preferences:

1) Prefer transcoding to Dolby Digital AC3
2) Optionally enable/disable AAC, AAC_LATM, AC3, ALAC, DCA, DTS, EAC3, FLAC, MLP, MP2, MP3, OPUS, PCM, TRUEHD, and/or VORBIS (force transcode)
@Ranft65 Ranft65 changed the title Feature - Add "Prefer Dolby Digital transcoding" and "Disable AAC, DTS, FLAC, MP3, OPUS, TRUEHD, and/or VORBIS support (force transcode)" advanced playback options Feature - Add "Prefer Dolby Digital transcoding" and "Disable AAC, AAC_LATM, AC3, ALAC, DCA, DTS, EAC3, FLAC, MLP, MP2, MP3, OPUS, PCM, TRUEHD, and/or VORBIS support (force transcode)" advanced playback options Feb 16, 2026
@Ranft65
Copy link
Author

Ranft65 commented Feb 16, 2026

Added options to enable/enable the rest of the audio codecs. Unless issues are found, this should be the last submit.

@Ranft65 Ranft65 marked this pull request as ready for review February 16, 2026 01:55
@Ranft65 Ranft65 marked this pull request as draft February 18, 2026 23:38
@Ranft65
Copy link
Author

Ranft65 commented Feb 18, 2026

I'm going to update this to allow any codec to be the preferred audio codec. The version now set to draft can only make the AC3 codec the preferred codec (and allow any audio codec to be disabled).

…ed playback preferences:

1) Prefer transcoding to Dolby Digital AC3
2) Optionally enable/disable AAC, AAC_LATM, AC3, ALAC, DCA, DTS, EAC3, FLAC, MLP, MP2, MP3, OPUS, PCM, TRUEHD, and/or VORBIS (force transcode)
…k preferences:

1) Optionally set preferred audio transcoding to AAC, AC3, and MP3

2) Optionally enable/disable any audio codec.  Transcoding will occur for any disabled audio codec.
# Conflicts:
#	app/src/main/java/org/jellyfin/androidtv/util/profile/deviceProfile.kt
@Ranft65 Ranft65 changed the title Feature - Add "Prefer Dolby Digital transcoding" and "Disable AAC, AAC_LATM, AC3, ALAC, DCA, DTS, EAC3, FLAC, MLP, MP2, MP3, OPUS, PCM, TRUEHD, and/or VORBIS support (force transcode)" advanced playback options Feature - Added optional selecting preferred audio transcode codec and enable/disable of any audio codec. Feb 20, 2026
@Ranft65 Ranft65 marked this pull request as ready for review February 20, 2026 13:40
@Ranft65
Copy link
Author

Ranft65 commented Feb 20, 2026

Updates completed. Commits are ready for review. These commits provide the following user options under advanced playback preferences:

  1. Optionally set preferred audio transcoding to AAC, AC3, and MP3

  2. Optionally enable/disable any audio codec. Transcoding will occur for any disabled audio codec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a fallback to AC3/EAC3 option

3 participants