jellyfin / jellyfin-roku

The Official Roku Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
460 stars 143 forks source link

Force AAC 5.1 to AC3 5.1 #1979

Open closesim opened 1 month ago

closesim commented 1 month ago

Hi. I'm not sure if this a bug or misconfiguration. Assume a video container with HEVC and AAC 5.1 normally gets direct play without ttanscoding in a Roku Ultra LT. In this scenario the Roku appears to handle the audio stream and mixes it to stereo automatically even though the Receiver supports 5.1 PCM. I was expecting that Jellyfin could remix the audio to AC3 or EAC3 to allow bitstreaming to a Receiver without losing the dynamic range and bandwidth of the 5.1 stream.

Describe the solution you'd like

An option to force transcoding AAC multichannel to Dolby based multichannel format that can be supported with devices with eARC, ARC or directly connected to a Dolby supported Receiver, with the original video stream.

Describe alternatives you've considered

The Roku mixes all multichannel AAC to Stereo in all scenarios.

Additional context

My setup consist in a Roku Ultra LT connected to a Jellyfin Docker container over wifi. The Roku is also connected to a Onkyo Receiver over HDMI.

Related issue: https://github.com/jellyfin/jellyfin-roku/pull/117#issue-568725442

cewert commented 1 month ago

I took a stab at this once. I plan on giving it another shot but don't know when that will be https://github.com/jellyfin/jellyfin-roku/pull/1466

dathbe commented 1 month ago

Are you sure this is a Roku issue? I had this issue, but after I looked deep in the manuals for my receiver I found that my receiver does not like AAC >2.0. I've just encoded everything as AC3 for that reason.

closesim commented 1 month ago

You can't send AAC over HDMI. Roku processes the multichannel AAC audio to Stereo PCM and then sends the PCM stream to the receiver. And yes, I know one can manually add the AC3 track to the server as an .ac3 file. But I want Jellyfin handle that hazle for me.

dathbe commented 1 month ago

You can't send AAC over HDMI.

Interesting. Did not know this.

And yes, I know one can manually add the AC3 track to the server as an .ac3 file. But I want Jellyfin handle that hazle for me.

Fair. Though I just go with AC3 from the outset now since it seems to be the most compatible. EAC3 is also pretty universal (at least with my setups), but FFMPEG does a terrible job of encoding it. Even if Jellyfin took care of converting the audio for me, I'd prefer to avoid the lossy conversion.

Alliyance commented 1 month ago

I vote to leave it like it is. The last time AAC 5.1 got transcoded, I had an issue with the audio that went out of sync. Or if it's possible to make that change only for HEVC files, That would be fantastic.

cewert commented 1 month ago

Would love some help testing #2003

closesim commented 1 month ago

I might give it a go. If the README.md instructions are as straightforward as they look.

cewert commented 1 month ago

They are just use this zip file for step 2 https://github.com/jellyfin/jellyfin-roku/actions/runs/11430399148?pr=2003

dathbe commented 1 month ago

I'm just getting an endless black screen with the time in the top right corner when I try to play any file (tested with mkv if somehow that matters) after side loading the Dev app. The time does not change, suggesting the app is frozen. The only way to exit the black screen is to press the Home button. I'd send logs, but I don't know where to find logs for my Roku.

I tested it on two different devices - a Roku TV, and a Roku 4k Stick.

closesim commented 1 month ago

Hi, I tested the build. Same as @dathbe, the app locked up. Nothing reported on the server logs (no transcoding logs).

Alliyance commented 1 month ago

Thanks @cewert . That is a lot better than just transcode all AAC5.1 to AC35.1.

Quick question, do you know if the Subs are working in the latest update (version 2.2.1)?

dathbe commented 1 month ago

Quick question, do you know if the Subs are working in the latest update (version 2.2.1)?

This is off topic now, but subs are working fine for me in 2.2.1. I didn't have a problem in 2.2.0, though.

Alliyance commented 1 month ago

@dathbe

Sorry for the off topic but a big thanks for replying. Just tested and they are working fine. Not sure why it wasn't working with version 2.2.0. Sometimes issues happened for unknown reason. 🙃