-
-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ARC audio output mode with updated codec profiles and transcoding #3936
base: master
Are you sure you want to change the base?
Conversation
4ec5bc4
to
297ad0b
Compare
app/src/main/java/org/jellyfin/androidtv/util/profile/ExoPlayerProfile.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/jellyfin/androidtv/util/profile/ProfileHelper.kt
Outdated
Show resolved
Hide resolved
Thanks for the contribution and this is a very good step in the right direction. However I believe the multichannel audio issue will only be partially fixed just like on the Plex client. Basically the use case not covered is the following. Many Android TV devices can't output multichannel PCM which means that multichannel AAC will be output as 2.0 PCM on a receiver plugged in via ARC. Now, you could activate the S/PDIF mode which would solve the multichannel AAC playback by transcoding to AC3. So far the only client that can handle this properly is Kodi since it has more advanced settings. Maybe there should be a DD+ toggle together with the S/PDIF & ARC one. |
That statement is incorrect. Did you test a debug build, or are you making assumptions based on what you believe? AC3 (Dolby Digital) and EAC3 (Dolby Digital Plus) audio are not limited and behave the same as they would in direct play. |
As stated it was an assumption but looking at the details maybe there is an issue the other way around.
Isn't it gonna try to direct play and passthrough EAC3 even if using SPDIF (e.g. optical)? SPDIF doesn't support EAC3 only ARC. |
I'd like to say that EAC3 can run through SPDIF up to 5.1 channels only. To temporarily work around the inconvenience caused by #3900, I am currently using a SPDIF connection for audio. Dolby Digital Plus 5.1 channel (and also limited to 1024kbps because more than that specific bitrate, FFMPEG-transcoded DDP/EAC3 audio doesn't work on my AVR) does work. There could be some channel check in there as well to allow 5.1 EAC3, and filter out 7.1 over SPDIF. |
This PR is aimed at ARC rather than Optical audio, despite the name of the option. The name "SPDIF" was chosen because it is more commonly used across other platforms compared to eARC vs. ARC. However, if this naming is causing confusion, it can be changed. Targeting Optical audio would result in the loss of EAC3/JOC (DD+ with Dolby Atmos) and limit DD to 5.1, which is not the goal of this PR. If issues arise for optical users after merging this PR, they can be addressed. My objective is to keep this process straightforward and get the PR merged. |
app/src/main/res/values/strings.xml
Outdated
@@ -516,6 +516,7 @@ | |||
<string name="past_24_hours">Past 24 hours</string> | |||
<string name="prefer_exoplayer_ffmpeg">Prefer FFmpeg for audio playback</string> | |||
<string name="prefer_exoplayer_ffmpeg_content">Use FFmpeg to decode audio, even if platform codecs are available.</string> | |||
<string name="audio_spdif">SPDIF</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other name options to better describe this output mode:
ARC
ARC Audio
HDMI Audio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying the intent of the PR.
To avoid confusion, I'd suggest ARC or maybe even better HDMI ARC.
HDMI Audio is probably too vague as it doesn't differentiate ARC and eARC and would just sound like it means HDMI audio passthrough.
ARC Audio seems a bit redundant as ARC already contains Audio.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HDMI ARC seems like the better option, will update to reflect this.
beed221
to
656d679
Compare
656d679
to
a3dbad6
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
a3dbad6
to
203388b
Compare
This PR adds an HDMI ARC audio output mode to address playback issues with high-resolution and uncompressed audio formats over an ARC connection in Jellyfin. Updates to the
ExoPlayerProfile
class and incorporates a new audio output preference. The PR ensures compatibility with PCM and TrueHD formats by transcoding unsupported surround sound formats to AC3, maintaining surround sound capabilities.Changes
Preference Option:
HDMI_ARC_OUTPUT
option inAudioBehavior
to allow users to enable HDMI ARC audio output.New Parameter:
enableARCAudio
parameter toExoPlayerProfile
.AudioBehavior.HDMI_ARC_OUTPUT
condition toPlaybackController
.Updated Audio Codecs:
downmixARCSupportedAudioCodecs
for ARC audio.allSupportedAudioCodecs
to include/exclude codecs based onenableARCAudio
.Issues
Fixes: #3900 #3903 #2991