Swiftfin icon indicating copy to clipboard operation
Swiftfin copied to clipboard

Multi Channel Audio through Standard Video Player does not work

Open turtle12 opened this issue 1 year ago • 9 comments

Describe the bug

So far I could not get surround sound to work at all with the standard video player. I tried various 5.1 audio files with different codecs like Dolby Digital, AAC and so on and surround sound did not work for any of them. My sounhd system actually reports a multi ch pcm input passed through from my TV but all the sound is coming from the front left and right channels it seems.

When I switch to the experimental native player I get really good surround sound support that also plays correctly on my sound system, even dolby atmos via DD+.

Application version

1.0.1

Where did you install the app from?

App Store

Device information

Apple TV 4K 2022 (A2843)

OS version

tvOS 16.3.3

Jellyfin server version

10.8.9

turtle12 avatar Mar 12 '23 08:03 turtle12

This issue seems to be the same as: https://github.com/jellyfin/Swiftfin/issues/663

The same issue with audio channels also exists in VLC app on Apple TV. So the cause seems to be an issue in libVLC.

With this audio file the left channel plays at left front speaker, left surround also plays on left front speaker. all the other channels go through center speaker:

  • https://www2.iis.fraunhofer.de/AAC/ChID-BLITS-EBU-Narration.mp4

I can't yet find a related issue at libVLC bug tracker. However comments in this issue seems to have some similarities:

  • https://code.videolan.org/videolan/VLCKit/-/issues/79

With the Experimental Native player in Jellyfin plays all 5.1 audio channels at my amp work correctly. However than my screen stays black which makes the Experimental Native Player unusable.

I hope someone can find the exact cause within Jellyfin and/or libVLC.

J0riz avatar Mar 21 '23 21:03 J0riz

It appears this isn't a libVLC issue, or at least an issue within libVLC. I used these audio test files, and proceeded to test them with the VLC app on the Apple TV. They played fine (I have a 5.1 sound system), the side channels played on the side speakers, which is the correct behavior. On Swiftfin, they play on the front left and right speakers. So, somehow Swiftfin is misusing libVLC? To be noted: even though the side channels get "squashed" into the front channels, the audio signal that the Apple TV sends to my amp is a 5.1 one... the side channels' audio is just nonexistent.

mattyeark avatar Jun 18 '23 21:06 mattyeark

@mattyeark That is interesting. I also don't have the issue anymore with VLC on my Apple TV with this file: https://www2.iis.fraunhofer.de/AAC/ChID-BLITS-EBU-Narration.mp4 So it seems that it is fixed in VLC and newer versions of libVLC. I'm currently using VLC 3.4.5 (522) to test this. So it seemed to be fixed between VLC 3.4.0 and 3.4.5. So I had the issue before with both VLC and Swiftfin. Now only still with Swiftfin.

So it looks like building a new version of Swiftfin with a newer version of libVLC would resolve the issue. 🙂

@LePips Can a release be build of Swiftfin with a newer libVLC? Than it is quick to confirm this resolves the problem.

J0riz avatar Jun 20 '23 20:06 J0riz

As stated in #1016 if you build Swiftfin for AppleTV with VLCKit 3.6.0b11 the audio issues are gone. 😄 However in current main branch there are still a lot of interface issues.

@LePips can VLCKit 3.6.0b11 be included in future official builds of Swiftfin?

J0riz avatar May 01 '24 19:05 J0riz

As stated in #1016 if you build Swiftfin for AppleTV with VLCKit 3.6.0b11 the audio issues are gone. 😄 However in current main branch there are still a lot of interface issues.

@LePips can VLCKit 3.6.0b11 be included in future official builds of Swiftfin?

Just wanted to ask if this happened? I still have subtitle and audio issues and don’t know how to personally build/fix it for myself.

ShyViolets avatar May 18 '24 05:05 ShyViolets

I apologize that I haven't responded to this issue. I'll have to think about what to do about this since I will be moving to mpv soon and don't intend to keep using VLCKit. Sadly, tvOS on main is in an un-shippable state and is actually quite annoying to work on. I think that it would be possible to just create a small release from the commit-way-back-then with the new version of VLCKit, however I don't want to deal with people creating issues thinking that a lot of work was done on that release, not really understanding what that release is for.

LePips avatar May 18 '24 20:05 LePips

I apologize that I haven't responded to this issue. I'll have to think about what to do about this since I will be moving to mpv soon and don't intend to keep using VLCKit. Sadly, tvOS on main is in an un-shippable state and is actually quite annoying to work on. I think that it would be possible to just create a small release from the commit-way-back-then with the new version of VLCKit, however I don't want to deal with people creating issues thinking that a lot of work was done on that release, not really understanding what that release is for.

Thank you :) I appreciate the work you’ve done and do with Swiftfin. I don’t mind being patient while you figure things out - I just wanted to be sure you were aware of the issue since it’s been around for a bit. Just knowing it’s on your mind is good for me.

ShyViolets avatar May 18 '24 22:05 ShyViolets

Since I've just taken a look at this, 3.6.0 was released by VLCKit however they haven't provided packaged framework for it just yet. I have pinged in their development channels for it and iOS should receive that update on TestFlight afterwards.

LePips avatar Jun 12 '24 17:06 LePips

Great. If a TestFlight tvOS version is available I will help testing 👍

J0riz avatar Jun 21 '24 17:06 J0riz

Any update on this?

maxer9500 avatar Oct 28 '24 05:10 maxer9500