mpv-player / mpv-player/mpv

audio goes silent after skipping/fast forward/fast backward

Open
#14,969 25 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

down-upstream:ffmpeg os:win
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv Information
[   0.001][v][cplayer] mpv v0.39.0-24-g53f2619d Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
[   0.002][v][cplayer]  built on Sep 27 2024 00:12:05
[   0.002][v][cplayer] libplacebo version: v7.349.0 (v7.349.0-13-ga018ab0-dirty)
[   0.002][v][cplayer] FFmpeg version: N-117212-g01c47dd23
[   0.002][v][cplayer] FFmpeg library versions:
[   0.002][v][cplayer]    libavcodec      61.20.100
[   0.002][v][cplayer]    libavdevice     61.4.100
[   0.002][v][cplayer]    libavfilter     10.5.100
[   0.002][v][cplayer]    libavformat     61.8.100
[   0.002][v][cplayer]    libavutil       59.40.100
[   0.002][v][cplayer]    libswresample   5.4.100
[   0.002][v][cplayer]    libswscale      8.4.100
Other Information
- Windows version: Windows 11 - Microsoft Windows NT 10.0.22631.0/22631.4169
- GPU model, driver and version: RTX3060 TI - Game Ready - 565.90
- Source of mpv: shinchiro
- Introduced in version: not known
Reproduction Steps

Open a movie file fast forward/fast backward many times, and/or click randomly in the OSD at different spots in the timeline. After doing this multiple times the audio goes silent.

In the log, these lines get printed:

[  30.381][v][cplayer] delaying audio start 2231.376979 vs. 2230.061000, diff=1.315979
[  30.424][v][cplayer] delaying audio start 2231.376979 vs. 2230.103000, diff=1.273979
[  30.466][v][cplayer] delaying audio start 2231.376979 vs. 2230.145000, diff=1.231979
[  30.507][v][cplayer] delaying audio start 2231.376979 vs. 2230.186000, diff=1.190979
[  30.548][v][cplayer] delaying audio start 2231.376979 vs. 2230.228000, diff=1.148979
[  30.590][v][cplayer] delaying audio start 2231.376979 vs. 2230.270000, diff=1.106979
[  30.633][v][cplayer] delaying audio start 2231.376979 vs. 2230.311000, diff=1.065979
[  30.673][v][cplayer] delaying audio start 2231.376979 vs. 2230.353000, diff=1.023979
[  30.715][v][cplayer] delaying audio start 2231.376979 vs. 2230.395000, diff=0.981979
[  30.757][v][cplayer] delaying audio start 2231.376979 vs. 2230.437000, diff=0.939979
[  30.799][v][cplayer] delaying audio start 2231.376979 vs. 2230.478000, diff=0.898979
[  30.840][v][cplayer] delaying audio start 2231.376979 vs. 2230.520000, diff=0.856979
[  30.883][v][cplayer] delaying audio start 2231.376979 vs. 2230.562000, diff=0.814979
[  30.925][v][cplayer] delaying audio start 2231.376979 vs. 2230.603000, diff=0.773979
[  30.965][v][cplayer] delaying audio start 2231.376979 vs. 2230.645000, diff=0.731979
[  31.008][v][cplayer] delaying audio start 2231.376979 vs. 2230.687000, diff=0.689979
[  31.049][v][cplayer] delaying audio start 2231.376979 vs. 2230.729000, diff=0.647979
[  31.091][v][cplayer] delaying audio start 2231.376979 vs. 2230.770000, diff=0.606979
[  31.133][v][cplayer] delaying audio start 2231.376979 vs. 2230.812000, diff=0.564979
[  31.174][v][cplayer] delaying audio start 2231.376979 vs. 2230.854000, diff=0.522979
[  31.216][v][cplayer] delaying audio start 2231.376979 vs. 2230.895000, diff=0.481979
[  31.257][v][cplayer] delaying audio start 2231.376979 vs. 2230.937000, diff=0.439979
[  31.300][v][cplayer] delaying audio start 2231.376979 vs. 2230.979000, diff=0.397979
[  31.341][v][cplayer] delaying audio start 2231.376979 vs. 2231.020000, diff=0.356979
[  31.383][v][cplayer] delaying audio start 2231.376979 vs. 2231.062000, diff=0.314979
[  31.425][v][cplayer] delaying audio start 2231.376979 vs. 2231.104000, diff=0.272979
[  31.467][v][cplayer] delaying audio start 2231.376979 vs. 2231.146000, diff=0.230979
[  31.508][v][cplayer] delaying audio start 2231.376979 vs. 2231.187000, diff=0.189979
[  31.549][v][cplayer] delaying audio start 2231.376979 vs. 2231.229000, diff=0.147979
[  31.591][v][cplayer] delaying audio start 2231.376979 vs. 2231.271000, diff=0.105979
[  31.633][v][cplayer] delaying audio start 2231.376979 vs. 2231.312000, diff=0.064979
[  31.680][v][cplayer] delaying audio start 2231.376979 vs. 2231.354000, diff=0.022979
[  31.716][v][cplayer] starting audio playback
[  31.716][v][cplayer] audio draining
[  31.716][d][ao/wasapi] Thread Resume
[  31.716][d][ao/wasapi] Thread Reset
[  31.716][d][ao/wasapi] Thread Pause
[  31.716][v][cplayer] audio EOF reached

Sometimes the audio comes back after the diff= goes to zero but in my testing, most of the time, the audio stays silent after the diff counter goes to zero. The log also indicates "audio EOF reached" which is not true.

I tested an older version of mpv that I had lying around on my PC. That does not exhibit this behavior. (mpv v0.37.0-766-ge42a8d53)

Expected Behavior

Fast forward/fast backward as many often as you want, without losing audio.

Actual Behavior

Fast forward/fast backward very often, audio playback is lost.

Log File

mpv-scrub-audio-out_new.txt

Snipped of a log on a different file with a DTS-HD track

audio-delay-after-skip.txt

Log of old mpv that does not show this issue:

mpv-scrub-audio-out_olderV.txt

Sample Files

No response

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing repeated seeks on Windows with the attached mpv-scrub-audio-out_new.txt and audio-delay-after-skip.txt logs, then compare the behavior and log from mpv v0.37.0 in mpv-scrub-audio-out_olderV.txt. Trace the audio start, draining, reset, and EOF sequence shown in the logs. Done means repeated fast-forward and fast-backward operations no longer leave audio silent.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.