jellyfin / jellyfin-tizen

Jellyfin Samsung TV Client
https://jellyfin.org
993 stars 79 forks source link

Audio passthrough from app #278

Open testuser7 opened 4 months ago

testuser7 commented 4 months ago

Hi, I have AV Receiver capable to decode most of the audio codecs connected over eARC HDMI with S90C TV. When I start playing a video with TrueHD audio for short time I have information on AV side that TrueHD audio is played and after a second PCM signal is played. Is it possible to passthrough audio from the app directly?

dmitrylyzo commented 4 months ago

You probably need to play with sound settings of TV. But, AFAIK, you can only pass through formats that your TV supports. So probably not.

One way to test (if the video codec is supported) - try playing the file from the USB drive connected to the TV.

testuser7 commented 4 months ago

If I'm not mistaken, this TV model does not support TrueHD either. There is passthrough option but only for HDMI inputs: https://us.community.samsung.com/t5/QLED-and-The-Frame-TVs/Sound-passthrough-option-greyed-out-while-using-tv-apps/td-p/2163302

I have found that one of my video files with DTS can be played on TV with sound (DTS is not supported). Is this some kind of error? This file has 2 audio tracks (DD and DTS) and Jellyfin incorrectly displays that DTS is played when actually DD is played.

Another one with DTS-HD can be played but without sound. But the rest of the video files with DTS or DTS-HD crash Jellyfin.

As for the playback of all formats as PCM via eARC, it is either a Samsung software error or an intentional implementation: https://eu.community.samsung.com/t5/tv/no-dolby-digital-when-hdmi-cec-is-on-only-pcm-works-s90c/td-p/9898544

testuser7 commented 4 months ago

The TV appears to decode all supported audio formats and output them as:

  1. for eARC:
    • AC-3 -> Multi Channel PCM
    • E-AC-3 -> Multi Channel PCM
    • E-AC-3 Atmos -> Multi Channel PCM with Atmos
    • E-AC-3 TrueHD Atmos - > Multi Channel PCM with Atmos
  2. for ARC:
    • AC-3 -> E-AC-3
    • E-AC-3 -> E-AC-3
    • E-AC-3 Atmos -> E-AC-3
    • E-AC-3 TrueHD Atmos - > E-AC-3

I haven't tested the optical output. Dolby TrueHD (lossless) is not supported.

testuser7 commented 4 months ago

In the latest version of jellyfin-web there is an option to set the priority for audio codecs: https://github.com/jellyfin/jellyfin-web/pull/5434 After setting the Opus codec the audio is still transcoded to AAC even though the TV supports this codec: https://developer.samsung.com/smarttv/develop/specifications/media-specifications/2023-tv-video-specifications.html

Are any changes needed on the jellyfin-tizen side to be able to use the Opus codec?

dmitrylyzo commented 3 months ago

Are any changes needed on the jellyfin-tizen side to be able to use the Opus codec?

No. It is checked here. For Tizen, canPlayType is used (1 + 2), but it may lie. Iirc, there is report that OPUS doesn't work on some models, presumably in TS (https://github.com/jellyfin/jellyfin-tizen/issues/130#issuecomment-1208110002).

testuser7 commented 3 months ago

Are any changes needed on the jellyfin-tizen side to be able to use the Opus codec?

No. It is checked here. For Tizen, canPlayType is used (1 + 2), but it may lie. Iirc, there is report that OPUS doesn't work on some models, presumably in TS (#130 (comment)).

Thanks for the info. I wonder if it would be possible to decode the audio and stream as LPCM.