jellyfin / jellyfin-roku

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

External Subtitles Force Second Audio Track #984

Open dathbe opened 1 year ago

dathbe commented 1 year ago

Software Versions Jellyfin Server Version: 10.8.8 Roku Client Version: 1.6 build 3

Describe the bug When I add an external .SRT subtitle to a movie with surround (5.1 AC3) audio, playback on my Roku is downmixed to 2.0 stereo. This happens whether or not the subtitle is displaying. When I delete the external subtitle, the 5.1 surround returns.

How To Reproduce

  1. Add subtitle to movie using opensubtitles.com plugin or by manually loading an SRT file
  2. Play movie on Roku
  3. Bug occurs

Expected behavior Audio will play with expected 5.1 surround

Logs The Jellyfin dashboard reports "Direct playing" "The source file is entirely compatible with this client, and the session is receiving the file without modifications."

But instead of displaying the video and audio and streaming information, the Roku app reports "Codec Information" "Streaming Information" "Codec: subrip" "Level: 0"

I'm happy to capture any additional information.

Screenshots N/A (if there's something useful, let me know and I can capture)

Connection Information Is server local or remote? Remote

Is server connection http or https? HTTPS

Additional context Here is the media info from one of the affected files:

Video Title 720p H264 SDR Codec H264 AVC Yes Profile High Level 40 Resolution 1280x720 Aspect ratio 16:9 Interlaced No Framerate 23.976025 Bitrate 3197 kbps Bit depth 8 bit Video range SDR Video range type SDR Color space bt709 Color transfer bt709 Color primaries bt709 Pixel format yuv420p Ref frames 1 NAL 4

Audio Title Surround 5.1 - English - Dolby Digital - Default Language eng Codec AC3 Layout 5.1 Channels 6 ch Bitrate 640 kbps Sample rate 48000 Hz Default Yes Forced No External No

Subtitle Title English - SUBRIP - External Language eng Codec SUBRIP Default No Forced No External Yes

I cannot swear this is only a problem on the Roku client, but I don't have another way to test surround sound on another client.

Oddly, TV Shows don't seem to exhibit the same bug, even though all Media Info is the same between files (except for aspect ratio and bitrate, which I would not expect to be related).

dathbe commented 1 year ago

I actually think what might be happening is that when the Roku app sees an external subtitle, it gets confused about which audio track it should be playing and plays the second audio track even though the first track is checked under "Options". Many of my movies have a stereo mix as the second track, which is why I thought it was downmixing. But I just played one with a commentary track as the second track, and it played that even though the original audio track is the first track and was checked. I was able to get it to play the regular track by selecting the commentary track in the "Options" screen. Weird.

dathbe commented 7 months ago

Update on this. App version 2.0.0 seems to have made this issue marginally worse in that it is now happening on both a Roku stick and a Roku tv (previously I was only experiencing this on the stick).

But I've also found that it's not specifically the second track that's played. It seems to be one track higher than whatever track you've selected. So if you have 3 tracks, selecting the first will play the second, selecting the second will play the third, and selecting the third will wrap back around and play the first.

So this might give some hints as to the bug. But it also gives a workaround for the time being: Just select the last audio track if you want to listen to the first one.