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

Serious lag when playing audio #4049

Closed
1 task
Cat7373 opened this issue Nov 8, 2022 · 14 comments
Closed
1 task

Serious lag when playing audio #4049

Cat7373 opened this issue Nov 8, 2022 · 14 comments

Comments

@Cat7373
Copy link

Cat7373 commented Nov 8, 2022

System and IINA version:

  • macOS 13.0
  • IINA 1.3.1

Expected behavior:

  1. open the audio file
  2. Quickly start playing
  3. Click on the progress bar to quickly finish skipping

Actual behavior:

  1. open the audio file
  2. Pause for a while and start playing
  3. Click on the progress bar, lag for a while, finish skipping

Steps to reproduce:

  1. Play this audio file
  2. View this demo file
  • MPV does not have this problem.

How often does this happen?
each time.

@low-batt
Copy link
Contributor

low-batt commented Nov 8, 2022

It is working fine for me a lot of the time. So much so I initially thought I could not reproduce a problem. And then it glitched on me. Not quite the same as I see in the demo file. Audio continued but the knob in the slider stopped updating. Something is definitely wrong.

@Cydiater
Copy link

Similar to #3635. I posted it earlier, but no one responded.

@low-batt
Copy link
Contributor

I have tracked down the problem and will be proposing a fix. This is a regression in 1.3.1. I've replied to @Cydiater in issue #3635. Although that issue is similar to this one, I suspect something else is causing that issue.

@low-batt
Copy link
Contributor

I was thinking the cause of this issue was the same as the cause of issue #4051. The cause of that issue is a regression involving updating the progress bar. After reviewing the video demonstrating the problem again I think I did not reproduce the problem being reported in this issue. I'm now thinking @Cydiater may be correct and this issue is related to #3635 or something similar.

Do you have any interesting audio/video applications installed? Especially applications from Rogue Amoeba?

Are you using any external audio devices?

Open Console. Click on Crash Reports. Do you see any reports for macOS daemons such as coreaudiod?

@Cat7373
Copy link
Author

Cat7373 commented Nov 27, 2022

Strangely, when I tried to reproduce it, the lag disappeared.

@Cat7373
Copy link
Author

Cat7373 commented Nov 27, 2022

I found out that the problem only occurs when I connect a bluetooth headset, my headset is a Sony WI-SP510, I don't see any messages in the Crash Reports in Console

@Cat7373
Copy link
Author

Cat7373 commented Nov 27, 2022

This issue does not occur when hitting space to preview audio files

@Cat7373
Copy link
Author

Cat7373 commented Nov 27, 2022

Turning off hardware decoding does not solve this problem

@low-batt
Copy link
Contributor

That the problem only occurs when using a Bluetooth headset confirms @Cydiater is correct and this is not the IINA UI regression that I hit while trying to reproduce this one.

IINA uses a library from mpv for audio/video playback. This is the reason for the question in the issue template about whether the mpv player also exhibits the problem. If it is an audio or video playback issue it is likely that the root cause of the problem is in the library IINA embeds from the mpv project, or some library the mpv library depends upon.

The problem here appears to be the open mpv issue #10270 that reports lagging when using AirPods. Although that issue is focused on AirPods, the mpv issue #9243 (closed as a duplicate) indicates the problem is with AirPlay and Bluetooth and also will be encountered with Bluetooth headsets.

Such problems are referred to as "upstream" as they have to be fixed by another project and then IINA will need to pickup the fix once that project has released a new version.

So for now we are waiting on a fix from the mpv project.

@low-batt
Copy link
Contributor

The mpv issue #10270 has been closed because a fix has been merged into the mpv master branch. We are now waiting on the next mpv release.

@Cat7373
Copy link
Author

Cat7373 commented Jan 25, 2023

🎉 🎉 🎉

@low-batt
Copy link
Contributor

As you can see from the PR referenced above the next release of IINA will use a newer version of mpv that contains a fix for this issue.

@Cat7373
Copy link
Author

Cat7373 commented Apr 19, 2023

In IINA 1.3.1 (build 133, mvp 0.34.1) and macOS 13.2, the problem does not recur

@low-batt
Copy link
Contributor

low-batt commented Jan 2, 2024

This is fixed in the released version of IINA.

@low-batt low-batt closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants