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

Playback start hitches with large audio delays #15825

Open
6 tasks done
emotion3459 opened this issue Feb 7, 2025 · 13 comments
Open
6 tasks done

Playback start hitches with large audio delays #15825

emotion3459 opened this issue Feb 7, 2025 · 13 comments
Labels

Comments

@emotion3459
Copy link

emotion3459 commented Feb 7, 2025

mpv Information

mpv v0.39.0-723-g38ad1ed0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
 built on Feb  2 2025 00:04:54
libplacebo version: v7.350.0 (v7.349.0-30-g056b852-dirty)
FFmpeg version: N-118390-g9b5a4c0ae
FFmpeg library versions:
   libavcodec      61.31.101
   libavdevice     61.4.100
   libavfilter     10.9.100
   libavformat     61.9.106
   libavutil       59.56.100
   libswresample   5.4.100
   libswscale      8.13.100

Other Information

- Windows version: Win11 24H2
- GPU model, driver and version: GTX 1080Ti, 572.16
- Source of mpv: scoop
- Latest known working version: N/A
- Issue started after the following happened: N/A

Reproduction Steps

Add a large audio delay to a file (longer than the duration of a single frame).

Expected Behavior

No hitches.

Actual Behavior

Hitches at playback start.

Log File

output.txt

Sample Files

container_delay_3003ms.zip

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@Dudemanguy
Copy link
Member

I don't understand the problem? The file plays fine on my end and the audio just starts late.

@emotion3459
Copy link
Author

I don't understand the problem? The file plays fine on my end and the audio just starts late.

I had a short discussion with @llyyr elsewhere and apparently the issue is AO related. llyyr stated he could only reproduce with pull AOs.

@Dudemanguy
Copy link
Member

I don't see anything unusual with pipewire either.

@Vodes
Copy link

Vodes commented Feb 7, 2025

I also notice it on my install (windows, no-config)

Fwiw llyyr explicitly mentioned that it also happens on pipewire for them

@raptordaking
Copy link

raptordaking commented Feb 7, 2025

The test file attached was made by me and this issue happens to me on Win 11 24H2 with mpv-git from scoop.
Nvidia driver 572.16

mpv v0.39.0-723-g38ad1ed0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
built on Feb 2 2025 00:04:54
libplacebo version: v7.350.0 (v7.349.0-30-g056b852-dirty)
FFmpeg version: N-118390-g9b5a4c0ae
FFmpeg library versions:
libavcodec 61.31.101
libavdevice 61.4.100
libavfilter 10.9.100
libavformat 61.9.106
libavutil 59.56.100
libswresample 5.4.100
libswscale 8.13.100

At 00:03.003 the video pan freezes for what seems like a single frame when the audio starts as it has been delayed using container delay by +3003ms. Tried using --no-config.

@Artoriuz
Copy link

Artoriuz commented Feb 7, 2025

@Dudemanguy It's just a microstutter exactly when the audio starts playing.

@Akemi
Copy link
Member

Akemi commented Feb 7, 2025

i can see the same stutter on macOS. more pronounced with video-sync=display-resample on my end.

@Dudemanguy
Copy link
Member

Dudemanguy commented Feb 7, 2025

I guess I have to concede that I'm blind but I really don't see anything other than 3:2 pulldown.

Edit: Anyways I presume you guys don't see anything if you do --video-sync=desync or --video-sync=display-desync?

@raptordaking
Copy link

Edit: Anyways I presume you guys don't see anything if you do --video-sync=desync or --video-sync=display-desync?

both --no-config --video-sync=desync and --no-config --video-sync=display-desync seem to play normally for me

@kasper93
Copy link
Contributor

kasper93 commented Feb 8, 2025

I guess I have to concede that I'm blind but I really don't see anything other than 3:2 pulldown.

You can see the stutter in the logs too

[  3.776274]                cplayer: starting audio playback
[  3.817616]                cplayer: Change display sync audio drift: -1
[  3.908361] vo/gpu-next/libplacebo: Estimated source FPS: 23.976, display FPS: 287.712
[  3.963456] vo/gpu-next/libplacebo: Estimated source FPS: 23.976, display FPS: 143.856

@Dudemanguy
Copy link
Member

Dudemanguy commented Feb 8, 2025

I don't have that in my logs. The only thing other than the "starting audio playback" message is this.

[   0.349][v][vo/gpu-next/libplacebo] Estimated source FPS: 23.923, display FPS: 23.952

This is with pipewire.

@kasper93
Copy link
Contributor

kasper93 commented Feb 8, 2025

This is with pipewire.

This doesn't matter.

I don't have that in my logs. The only thing other than the "starting audio playback" message is this.

For me it happens after moving back to beginning. Also I have disabled smoothing in libplacebo, because it does more harm than good, so the variations are visible in log probably.

@llyyr
Copy link
Contributor

llyyr commented Feb 8, 2025

I couldn't reproduce the frame repeat with null, pulse, or alsa so I thought this was only a pull based AO issue.

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

No branches or pull requests

8 participants