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

User interacions not responding (tvOS) #584

Closed
Alanko5 opened this issue Oct 13, 2023 · 9 comments
Closed

User interacions not responding (tvOS) #584

Alanko5 opened this issue Oct 13, 2023 · 9 comments

Comments

@Alanko5
Copy link

Alanko5 commented Oct 13, 2023

Describe the bug
If playing 4k HDR video with (5.1, 7.1, matt, trheHD) multichanel audio
Then player not responding to swipe or click on remote controller (tvOS)

To Reproduce
Steps to reproduce the behavior:

  1. Play video 4k
  2. select audio track with multichannel audio
  3. User interface not responding

Platform (please complete the following information):

  • Device: appleTV 4k 3.gen
  • OS: tvOS 17
@kingslay
Copy link
Owner

你可以提供对应的url吗?或者把视频裁剪出一个两分钟的片段,上传到github。我测试下。

@Alanko5
Copy link
Author

Alanko5 commented Nov 13, 2023

check email.

apple tv need connected to 5.1/7.1 audio and source must be Atmos (thrueHD/matt)

@Alanko5
Copy link
Author

Alanko5 commented Nov 13, 2023

debug KSPlayer: MEPlayerItem.swift:455 readThread() | seek to 18.412 spend Time: 0.19463770830770954
debug KSPlayer: KSPlayerLayer.swift:138 state | playerStateDidChange - buffering
debug KSPlayer: KSOptions.swift:432 outputNumberOfChannels(channels:isUseAudioRenderer:) | [audio] maximumOutputNumberOfChannels: 2
debug KSPlayer: KSOptions.swift:433 outputNumberOfChannels(channels:isUseAudioRenderer:) | [audio] preferredOutputNumberOfChannels: 2
debug KSPlayer: KSOptions.swift:436 outputNumberOfChannels(channels:isUseAudioRenderer:) | [audio] isSpatialAudioEnabled: false
debug KSPlayer: KSOptions.swift:437 outputNumberOfChannels(channels:isUseAudioRenderer:) | [audio] isUseAudioRenderer: false
debug KSPlayer: KSOptions.swift:449 outputNumberOfChannels(channels:isUseAudioRenderer:) | [audio] currentRoute max channels: 2
debug KSPlayer: KSOptions.swift:455 outputNumberOfChannels(channels:isUseAudioRenderer:) | [audio] outputNumberOfChannels: 2
debug KSPlayer: AVFFmpegExtension.swift:398 layoutTag | [audio] FFmepg AVChannelLayout: stereo order: AVChannelOrder(rawValue: 1) mask: 3
debug KSPlayer: Resample.swift:293 audioFormat(channels:isUseAudioRenderer:) | [audio] out channelLayout: stereo
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | Using fltp internally between filters
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | Matrix coefficients:
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | FL:
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | FL:1.000000
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | FR:0.000000
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | FC:0.707107
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | LFE:0.000000
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | BL:0.707107
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | BR:0.000000
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | SL:0.707107
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | SR:0.000000
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem |
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | FR:
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | FL:0.000000
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | FR:1.000000
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | FC:0.707107
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | LFE:0.000000
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | BL:0.000000
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | BR:0.707107
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | SL:0.000000
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem | SR:0.707107
debug KSPlayer: MEPlayerItem.swift:125 MEPlayerItem |
debug KSPlayer: KSPlayerLayer.swift:138 state | playerStateDidChange - bufferFinished

@Alanko5
Copy link
Author

Alanko5 commented Nov 13, 2023

Thread activity

TrueHD audio decoding in 10 sec:
TrueHD source

AC stereo audio in 10 sec:
Snímka obrazovky 2023-11-13 o 17 29 42

@Alanko5
Copy link
Author

Alanko5 commented Nov 13, 2023

During TrueHD playback, you can clearly hear that the sound is cracking.
It seems that he does not have time to switch Threads.
Or it asks the cpu for too many threads, which starts blocking the main thread.
The CPU utilization in TrueHD is 40% and in AC-3 it is 17%.
I'm talking about the same video stream, only switching the audio track.

Audio mixer creates too many threads
Audio mixer
Callstack

@kingslay
Copy link
Owner

你把audioPlayerType 改成是AudioUnitPlayer 试试看。

kingslay added a commit that referenced this issue Nov 14, 2023
@Alanko5
Copy link
Author

Alanko5 commented Nov 14, 2023

你把audioPlayerType 改成是AudioUnitPlayer 试试看。

the image cuts and the sound pops

@kingslay
Copy link
Owner

你把视频裁剪出一个几分钟的片段,上传到github。我测试下。

theonlymo pushed a commit to theonlymo/KSPlayer that referenced this issue Nov 16, 2023
* 'develop' of github.com:kingslay/KSPlayer: (22 commits)
  优化同步
  add AudioEngineDynamicsPlayer kingslay#584
  fix kingslay#619
  fix kingslay#634
  Update issue templates
  Update issue templates
  不使用deprecated api
  add  video type kingslay#528
  udpate swiftui demo
  update
  update
  fix
  fix
  fix
  解决依赖问题
  解决依赖问题
  解决spm的问题
  解决spm依赖的问题
  去除packeage.resolved
  更新ffmpeg
  ...

# Conflicts:
#	FFmpegKit
@kingslay
Copy link
Owner

kingslay commented Dec 2, 2023

还会有这个问题吗?

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

2 participants