jellyfin / jellyfin-androidtv

Android TV Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.43k stars 409 forks source link

AAC Plays as Stereo #2602

Open BJET67 opened 1 year ago

BJET67 commented 1 year ago

Describe the bug

When watching AAC 5.1 or 7.1 Content it remuxes to stereo I'm all use cases, I've tried 2 different audio receivers as well as 2 different media devices (Chromecast With Google TV and a TiVO Box) And the behavior is the same, Only formats I've gotten to work flawlessly are AC3 and EAC3, all other codecs I've tried have had some sort of issue.

This is a problem because a lot of the content I have on my server is AV1/opus 5.1/7.1 which will transcode to HEVC/AAC and will come through as Stereo.

I also tried LibVLC which has its own issues and all codecs come through as Stereo and the video playback Is choppy.

I have an open issue for the opus support and it looks like it is potentially getting merged but AAC should still play as surround

Logs

No response

Application version

0.15.5

Where did you install the app from?

Google Play

Device information

TiVO model unknown

Android version

Android 10

Jellyfin server version

10.8.9

branches78 commented 1 year ago

I know the answer to your problem, the device you are using has Android 9, turns out, Google screwed up that version because every single codec different than Dolby and DTS (AAC, FLAC, WAV, etc), gets downmixed to stereo by that version, it's a bug they will never fix, the Jellyfin app is absent of this problem, however, Android 10 and beyond versions are playing multichannel PCM correctly so I suggest to get another device with a newer Android version if the one you have won't see an update anytime soon.

Note: AAC and the other codecs I mentioned always get decoded as PCM internally by the device before it's output.

BJET67 commented 1 year ago

The original issue is wrong, the TiVo device is on Android 10. @branches78

branches78 commented 1 year ago

I see, in that case, please describe your environment since on mine it's able to play multichannel AAC without problems.

BJET67 commented 1 year ago

I have a Yamaha Rx-V363 receiver connected via optical to my android tv box @branches78

branches78 commented 1 year ago

connected via optical

Optical doesn't support multichannel PCM, it only supports Dolby Digital, DTS and PCM 2.0.

I think the Tivo transcodes everything to Dolby Digital as far as I heard, I guess that's what you were getting?.

Why don't you use the HDMI inputs in your AV receiver instead?, I see it has two inputs.

BJET67 commented 1 year ago

Why don't you use the HDMI inputs in your AV receiver instead?, I see it has two inputs.

The inputs on the rx-v363 are video only https://www.avforums.com/threads/sound-help-yamaha-rx-v363-optical-hdmi.2179802/

branches78 commented 1 year ago

he inputs on the rx-v363 are video only

Wow, I guess it's a very old model where HDMI was in its infancy.

Anyway, Do you have the Tivo connected to the TV and then you have the TV connected to the AVR?

BJET67 commented 1 year ago

Anyway, Do you have the Tivo connected to the TV and then you have the TV connected to the AVR?

Yes, but I also get the same result if I do it straight into the TiVO box

branches78 commented 1 year ago

if I do it straight into the TiVO box

What do you mean with "straight into the tivo box"?

BJET67 commented 1 year ago

What do you mean with "straight into the tivo box"? The optical audio port on the TiVo box produces the same result as going through the TV's optical port.

I've also been looking into getting a new av receiver anyway, any suggestions that would work for AAC 5.1?

branches78 commented 1 year ago

Any not too old or new AV receiver with HDMI inputs and multichannel PCM support works.

branches78 commented 1 year ago

The optical audio port on the TiVo box produces the same result as going through the TV's optical port.

Right, that's because of the limitation of the optical port.

branches78 commented 1 year ago

What Tivo device do you have?

turboguard commented 1 year ago

Having the same issue with Android TV on a Sony X900H. The TV is connected to a Denon S760H through HDMI 3 (eARC). TV has latest firmware with Android TV version 10. Jellyfin app version 0.15.5 Jellyfin server version 10.8.9 on windows 11 The X900H has eArc enabled and is set to passthrough multichannel audio in settings. Other formats like Dolby/DTS pass through correctly.

branches78 commented 1 year ago

@turboguard, current TVs with eARC don't passthrough multichannel PCM if you play the content from apps installed in it, the only way to passthough multichannel PCM to an AV receiver with the eARC port is when you connect an external box, stick or even a computer to the TV directly to any of its HDMI ports.

This is regardless of the brand or operating system, this is a limitation imposed by manufacturers and I ignore the true reason.

turboguard commented 1 year ago

So I guess the solution is to just avoid formats like AAC altogether since neither side is willing to provide a work around, got it.

branches78 commented 1 year ago

So I guess the solution is to just avoid formats like AAC altogether

Not necessarily, I was under the impression that the TV should transcode it to Dolby Digital, can you check on the TV's audio settings?

turboguard commented 1 year ago

So I guess the solution is to just avoid formats like AAC altogether

Not necessarily, I was under the impression that the TV should transcode it to Dolby Digital, can you check on the TV's audio settings?

None of the settings I change seem to make a difference, looks like it's always turned into PCM.

MichaelRUSF commented 1 year ago

Similar situation here. I have a Sony x90j hooked up via eARC to an AV receiver. Using the Jellyfin Android TV app on the built-in Google TV ecosystem, AAC surround sound files will only output two channel audio using either exoplayer or LibVLC. However, I have been able to get 5.1 AAC audio to output correctly if I use Kodi, also installed on the internal GTV platform.

AAC surround sound files will also output correctly with the Tv’s default generic built-in Media Player, which does not show up as an external player through the Jellyfin interface.

I generally avoid AAC audio files and have manually reencoded AAC surround sound files to AC3 in order to be compatible with the limitations of Jellyfin running from the internal Google TV ecosystem on my Sony TV.

shimscharf commented 1 year ago

I have same issue. Sony A90J to Denon receiver via ARC. All multichannel AAC 5.1 or 6 or 7.1 is downmixed to stereo. DTS, DTS-HD AC3 and EAC all transmitted correctly. Inbuilt generic Sony media player seems to convert AAC to AC3.

I believe it's the same bug referenced here: AAC LC audio always outputs 2.0 PCM. DTS/AC3 passes through correctly https://github.com/jellyfin/jellyfin-androidtv/issues/520

wangmaster commented 1 year ago

I'm seeing the same issue from an nvidia shield TV to a vizio m51ax-j6 sound bar. I noticed the same problem long time ago with plex going to an LG CX TV and using e-arc and determined that even with E-ARC alot of TVs don't properly pass multi-channel LPCM through earc so redid a few things and connected the shield tv directly to the hdmi input on the soundbar and with plex configured as a passthrough the problem was solved there.

That does not seem to be working with Jellyfin client on the shield TV.

branches78 commented 1 year ago

It's a bit difficult to find out why it doesn't work for you but it works for me.

remisharrock commented 1 year ago

same issue for me on my nvidia Shield TV Pro connected to a Denon AVC X3700 HNR

To fix the issue I had to go on my nvidia shield to the settings:

"Advanced sound settings" and deactivate the option "Dolby audio processing"

Indeed, when this option is NOT activated, I get the full 5.1 or 7.1 sound. When it is activated I get stereo sound, I don't know why...

BJET67 commented 12 months ago

@branches78 Sorry for not replying for a while, I believe my issue could be solved by this #2867

branches78 commented 12 months ago

If that fixed the issue, I'm glad to know it is working for you now.

BJET67 commented 12 months ago

If that fixed the issue, I'm glad to know it is working for you now.

That's actually a feature request that would fix the issue, sorry for the confusion

branches78 commented 12 months ago

Oh, I see, I hope it gets implemented then 👍

SplitMilky commented 9 months ago

I am currently have this issue. All files with AAC 5.1 come through as 2,0. Currently resorting to manually reencoding to AC3. Android 9 on Sony AndroidTV Marrantz 7703 preamp/processor. I've read here this is an Android 9 Issue. In which case can we get the option to transcode all AAC multi channel to something else?

Also open to other suggestions beside buying a shield or replacing my POS $5000 sony TV lol.

520

branches78 commented 9 months ago

I've read here this is an Android 9 Issue

Yes, it's true, it's a global Android 9 issue, what device do you use'

In which case can we get the option to transcode all AAC multi channel to something else?

Yeah, the ideal is to transcode AAC to AC3 by the server with an option in settings, but I see it not happening for the time being, let's see what the devs comment about.

SplitMilky commented 9 months ago

I'm using Jellyfin on an XBR-75X900F it's a Sony Android TV. I'm going to email them in the vain hope they update it to Android 10.

branches78 commented 9 months ago

Does it support eARC?

Where do you have it connected?

SplitMilky commented 9 months ago

No sadly for all the research I did before buying. I some how missed that all that the next years models would have eARC. wasn't even aware of eARC until I started researching why ATMOS and DTS MA were not working right.

Server connected to tv over ethernet and the TV to the sound processor is ARC HDMI.

branches78 commented 9 months ago

There you have it, I guess the AAC to AC3 conversion option is needed in cases like yours, where ARC is only supported.

jellyfin-bot commented 5 months ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

PriceChild commented 5 months ago

@jellyfin-bot Still real, looks like #3110 might help with a workaround.

MindrustUK commented 3 months ago

Confirmed on Sony XR65X95LU with current Android TV firmware.