jellyfin / jellyfin-androidtv

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

Jellyfin plays 7.1 Opus audio as stereo #3152

Closed ryannathans closed 7 months ago

ryannathans commented 1 year ago

Describe the bug

  1. play content with 7.1 opus audio
  2. comes out only in stereo, and in my case, dialogue on the right with music on the left

Logs

No response

FFmpeg logs

No response

Media info of the file

General
Complete name                            : video recording.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 13.3 GiB
Duration                                 : 3 h 12 min
Overall bit rate                         : 9 881 kb/s
Frame rate                               : 23.976 FPS
Movie name                               : Video Recording (2021)
Encoded date                             : 2023-06-27 18:55:00 UTC
Writing application                      : mkvmerge v63.0.0 ('Everything') 64-bit
Writing library                          : libebml v1.4.2 + libmatroska v1.6.4
Attachments                              : av1an-06-27-2023-01-42-06.txt
Video
ID                                       : 1
Format                                   : AV1
Format/Info                              : AOMedia Video 1
Format profile                           : Main@L5.0
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : V_AV1
Duration                                 : 3 h 12 min
Bit rate                                 : 9 496 kb/s
Width                                    : 3 840 pixels
Height                                   : 2 076 pixels
Display aspect ratio                     : 1.85:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.050
Stream size                              : 12.8 GiB (96%)
Title                                    : 2160p HDR AV1
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : R: x=0.708000 y=0.292000, G: x=0.170000 y=0.797000, B: x=0.046000 y=0.131000, White point: x=0.329000 y=0.312700
Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 0
Maximum Frame-Average Light Level        : 0
Audio
ID                                       : 2
Format                                   : Opus
Codec ID                                 : A_OPUS
Duration                                 : 3 h 12 min
Bit rate                                 : 379 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C Ls Rs Lb Rb LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 50.000 FPS (960 SPF)
Bit depth                                : 32 bits
Compression mode                         : Lossy
Stream size                              : 522 MiB (4%)
Title                                    : English 7.1 (Opus 448 kbps)
Language                                 : English
Default                                  : Yes
Forced                                   : No
Text #1
ID                                       : 3
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 3 h 1 min
Bit rate                                 : 38 b/s
Frame rate                               : 0.216 FPS
Count of elements                        : 2359
Stream size                              : 51.5 KiB (0%)
Title                                    : English
Language                                 : English (US)
Default                                  : No
Forced                                   : No

Application version

0.16.0 beta 5

Device information

Bravia 4k vh2

Android version

10

Jellyfin server version

10.8.10

nielsvanvelzen commented 1 year ago

Did this also happen in previous versions? Is the video transcoding/remuxing? Have you tried tuning the preferences related to audio downmixing?

MichaelRUSF commented 1 year ago

There's an issue with Sony TVs, as they don't allow multichannel audio for certain audio formats, such as Opus and AAC, from internal apps.

If you try to play multichannel Opus or AAC audio directly from JellyfinATV on a Sony TV, the server will send the file directly without transcoding, but only stereo audio will be played. However, when you play the same file on a Fire TV stick using JellyfinATV, the multichannel audio is passed through directly without any issue.

I also tested this on Plex, both internally and externally. On the internal app, Plex correctly transcodes Opus and AAC multichannel audio, and on the Fire TV stick, Plex passes through the audio directly. Since Plex also uses Exoplayer, this should be somewhat of an equivalent testbed.

The issue is that the server should be transcoding multichannel Opus and AAC audio when it detects that Jellyfin is running internally from a Sony TV, but it doesn't. So, now the question arises, is this a server or client issue?

ryannathans commented 1 year ago

There's an issue with Sony TVs, as they don't allow multichannel audio for certain audio formats, such as Opus and AAC, from internal apps.

This explains why I couldn't get surround sound to work on some movies on the disney+ app...

ryannathans commented 1 year ago

Did this also happen in previous versions? Is the video transcoding/remuxing? Have you tried tuning the preferences related to audio downmixing?

Ensured it was direct playing, I think the same issue did occur previously but I have not 100% confirmed it with a re-test of older versions. The comment above explains things though

jellyfin-bot commented 8 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.

ryannathans commented 7 months ago

This is an ongoing issue.