Open salty-sweet opened 3 months ago
Also mentionworthy:
I have tried using several external players to extensively diagnose the issue. So far only VLC and TCL's built-in Media Player plays in surround sound audio.
I'd love to not use either of them due to their subtitle sizing issues.
Same here, true HD atmos 7.1 is played as pcm, while on plex it plays as DD+. Also played as pcm with vlc even if audio pass-through enabled
When you say this worked fine in 0.16.11, did you use exoplayer as video player or change it to libvlc?
When you say this worked fine in 0.16.11, did you use exoplayer as video player or change it to libvlc?
I only used ExoPlayer back in 0.16.11 as libvlc would occasionally have synchronization issues.
I believe I have the same issue. Since the new update my Denon receiver now displays audio as "multi-in" when playing truehd, dd, or dts content instead of the appropriate codec when direct playing source videos. Which means it is coming as PCM. The audio still comes as surround but I believe jellyfin is decoding it instead of doing pass thru to the receiver. When I use VLC player the audio is passed thru correctly.
However I found a work around that temporarily fixes it. In playback settings, change the audio setting from direct to downmix to stereo and back to direct. Then start the movie/show. Sometimes it will start passing audio thru correctly. If not, then I select a second audio track and switch back. This extra step always fixes it. If the source doesn't have a second audio track, seems like lowering bitrate to switch to transcoding and raising it back to direct also fixes it.
Based on this work around, it seems like jellyfin gets stuck in decoding the audio instead of passing it thru.
I'm having this issue too, switching the audio track usually fixes the stereo issue but EAC3 still gets transcoded to AAC. If I play with an external player no transcoding takes place.
It looks like the PCM / AAC issue is related to #3528 After turning off refresh rate switching the correct audio codec is used
Following @videodisco's comment, the issue that I am experiencing is that Jellyfin outputs Stereo PCM while theirs outputs to be Surround PCM. Despite that, I still tried their temporary fix:
AAC
) were being downmixed, and the Jellyfin Server reports that my AndroidTV is Direct Streaming. So unfortunately in my situation, the said temporary fix did NOT work.
I didn't have Refresh Rate Switching enabled in any way, so @jjmirks referencing Refresh Rate Switching wouldn't really fit my issue. I tried to change the values though, thinking it would make a change, but I can confidently say it doesn't change anything for me.
I appreciate these comments as I've never thought of changing other settings in my Jellyfin AndroidTV assuming they don't do much. Thanks!
I did further manual diagnostic tests in my free time. Multiple types of playbacks involving different types of audio codecs and channel count, using different test files I sourced online and ones I made myself using FFMPEG.
Hardware: Yamaha HTR-2071, TCL Smart TV Pro 65C645 Codecs tested: AAC, PCM (S16LE), AC3, E-AC3, E-AC3 with Atmos metadata, DTS, DTS-MA, DTS-MA with DTS:X metadata Channel counts tested: Stereo (2), 5.1 (6), 7.1 (8; but AVR downstreams them to 6) Direct Audio: Enabled BitStreaming Support: Enabled for Dolby and DTS audio Downmixing: Disabled
Results:
🟩 - successfully played back as surround sound 🟨 - cannot not play at all 🟥 - fails to play as surround sound; only stereo
Audio Codec | Channel Count | Additional Notes | |
---|---|---|---|
🟩 | * | 2 | Stereo audio streams always work. |
🟥 | AAC | 6 / 8 | Only Stereo AAC works. |
🟥 | PCM | 6 / 8 | Only Stereo PCM works. |
🟩 | AC3 | 6 | |
🟩 | E-AC3 | 6 / 8 | |
🟨 | E-AC3 + Atmos | * | Can't play. Hardware incompatibility. |
🟩 | DTS | 6 | |
🟩 | DTS-MA | 6 / 8 | |
🟨 | DTS-MA + DTS:X | * | Can't play. Hardware incompatibility. |
I did the testing a week ago on JF AndroidTV v0.17.3 with JF Server v10.9.9. I updated to JF AndroidTV v0.17.4 and JF Server v10.9.10, still the same results.
I may or may have some things done wrong here, but I'm open to changes or suggestions to improve my testing.
@salty-sweet This is a limitation of running apps internally on the TV. Internal apps are limited to ARC capabilities: 5.1 compressed audio and 2.0 uncompressed. When manufacturers advertise Dolby Atmos, PCM 7.1, DTS:X, etc., these standards are for external devices connected via eARC, not for apps running directly from your TV.
You can only get these to play back correctly if you use an external HDMI device such as an Nvidia Shield or Amazon Fire Stick connected via eARC. The client doesn't make that distinction, so it may send audio formats that are incompatible with your connection method.
I have proposed a PR that will add an "SPDIF" option for situations like this, you can test it out here. Download the artifact and sideload the APK onto your TV. In Playback - Audio output, select the SPDIF option.
Note: Default media apps usually can play uncompressed audio with more than 2 channels by converting it to AC3.
@MichaelRUSF I looked more into the HDMI eARC/ARC capabilities and limitations you've mentioned, and I found something I overlooked: My Yamaha HTR-2071 AV Receiver is only capable of ARC while my TCL 65C645 AndroidTV has eARC capabilities.
I guess this explains why Jellyfin can still play at the start of my test files that have DTS-MA + DTS:X audio tracks before freezing or crashing completely. Jellyfin would only take the TV's capabilities without considering what audio device the TV outputs to. Shouldn't Jellyfin check both to intelligently choose what's best to do with reported TV/Device capabilities and Digital audio connection details?
I'd love to test your PR's fix for this but do I need to switch to a S/PDIF connection? I only have HDMI as of the moment. Do tell if I can still do the testing with only an HDMI cable.
Man, it gives a whole lot of sense to my problem, but I'm still somewhat confused as to why AAC 5.1, being an uncompressed codec, would be bitstreamed as DD or DD+ to my AV receiver back in JF AndroidTV v0.16.11. JF Server would report "Direct Play" back then too.
I'd love to test your PR's fix for this but do I need to switch to a S/PDIF connection? I only have HDMI as of the moment. Do tell if I can still do the testing with only an HDMI cable.
You don't need to switch any cables. That's just what the setting is called in the app. Right now, there's only a direct and stereo option setting in the app. This PR adds a new option called "SPDIF".
So I downloaded and tested the build artifact from #3936. The added SPDIF Audio Output option works and transcodes AAC 6/8 channel audio tracks into AC3, but with a few small issues though.
HE-AAC
profile would sound really bad, like as if the transcoded bitrate was very low. LC
profile AAC audio tracks are unaffected by this.EDIT: All subtitles are burned in when using SPDIF option, only that. Direct and Downmix to Stereo doesn't.
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (aac (native) -> ac3 (native))
Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 90k tbn (default)
Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), fltp, 320 kb/s (default)
I mainly want to verify if you're now receiving surround sound for AAC/PCM 6/8 channel audio. Since the subtitle code has changed, tests should exclude subtitle files as a variable.
I mainly want to verify if you're now receiving surround sound for AAC/PCM 6/8 channel audio. Since the subtitle code has changed, tests should exclude subtitle files as a variable.
Yeah, surround sound works and AAC 6/8 channel audio is received by my AV receiver as AC3/Dolby Digital, but then again:
Only AAC audio tracks with HE-AAC profile would sound really bad, like as if the transcoded bitrate was very low. LC profile AAC audio tracks are unaffected by this.
This is a limitation of running apps internally on the TV. Internal apps are limited to ARC capabilities: 5.1 compressed audio and 2.0 uncompressed. When manufacturers advertise Dolby Atmos, PCM 7.1, DTS:X, etc., these standards are for external devices connected via eARC, not for apps running directly from your TV.
Sorry but this is incorrect. I have a Philips Android TV and I can play DD+ Atmos on all TV apps (Jellyfin, Plex, Kodi, Max, Prime, Apple TV+, ...). DD+ Atmos doesn't even require eARC - ARC is good enough.
Actually, my TV can even decode TrueHD Atmos internally but can't of course pass it through due to ARC limitations.
EAC-3 with JOC (Dolby Digital Plus with Dolby Atmos), the lossy compression variant of Dolby Atmos, is not what I was referring to in that statement.
Sorry but you stated that ARC is limited to 5.1 compressed audio which is not the case since EAC3 can do 7.1 + Atmos.
You also stated that internal TV app wouldn't play TrueHD Atmos which is not necessarily true since there are TVs with embedded TrueHD Atmos decoder.
For instance my TV itself supports: • Dolby Atmos (DDP/DTHD) • Dolby MS12 V2.3 • Dolby AC-4 • DTS-HD (M6) • Dolby Atmos Virtualizer
ffmpeg implementation of EAC3 have issues on Receivers (sound is glitching/going on and off), so would be nice to either have a choice between AC3 and EAC3 or just use AC3 transcode for full compatibility (also with older ARC) although with 5.1 channel limitation.
UPDATE: I've done some audio track testing myself, and the results are on https://github.com/jellyfin/jellyfin-androidtv/issues/3900#issuecomment-2312517826.
Describe the bug
EXPECTED OUTCOME:
DTS
,DD
,DD+
,Signal Info: 3/2/0.1
ACTUAL OUTCOME:
PCM
,Signal Info: 2/-/---
L
,R
, andSW
Speaker Indicators light up. (subwoofer is always used by the AVR)Logs
FFmpeg logs
No response
Media info of the file
Application version
0.17.3
Device information
TCL Smart TV Pro 65C645
Android version
Android 11
Jellyfin server version
10.9.9