Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multichannel audio always downmixing to stereo when transcoding #286

Closed
aedalzotto opened this issue Feb 12, 2025 · 2 comments
Closed

Multichannel audio always downmixing to stereo when transcoding #286

aedalzotto opened this issue Feb 12, 2025 · 2 comments

Comments

@aedalzotto
Copy link

aedalzotto commented Feb 12, 2025

Hello, I have an LG C2. This TV has no DTS or DTS passthrough support.
Every time I play a DTS track, it transcodes the audio to AAC (direct streaming) but in stereo instead of the original number of channels of the default track.
The same problem happens when transcoding due to video incompatibility.

I have tried changing the number of supported channels in TV playback options and the preferred transcode codec to AC3, but it also downmixes to AC3 stereo.

Audio tracks that are already multichannel AAC pass through eARC perfectly as multichannel PCM.

This may be a problem with jellyfin-webos, but it may be a jellyfin-server issue or jellyfin-web.
I'm looking for someone more experienced to help me debug this.

Edit:

Looking at jellyfin logs, it seems that it transcodes keeping the original number of channels, but the TV still plays Stereo

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -readrate 10 -fflags +genpts -f matroska,webm  -i file:"_.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -bsf:v h264_mp4toannexb -start_at_zero -codec:a:0 aac -ac 6 -ab 640000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 6 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "_%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "_.m3u8"
@aedalzotto
Copy link
Author

I'm reporting more tests:

Direct Play:
When direct playing AAC and OPUS, the TV sends multichannel PCM through eARC (correct behavior).
When direct playing (E-)AC3, the TV passes the track directly through eARC (correct behavior).

Direct Stream / Transcode:
FLAC and DTS* trigger audio transcoding (correct behavior)
When configured to transcode to Opus, it triggers transcoding to AAC in jellyfin-server logs (wrong behavior -- should transcode to Opus)
When configured to transcode to AAC, jellyfin reports receiving multichannel AAC, but the TV sends stereo PCM through eARC (wrong behavior -- should pass through multichannel PCM)
When configured to transcode to AC3, jellyfin reports receiving multichannel AC3, but the TV sends stereo PCM through eARC (wrong behavior -- should pass through the track directly through eARC)

@aedalzotto
Copy link
Author

This seems a bug of jellyfin-web, as it occurs in the browser too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant