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

'Audio device underrun detected' leading to stuttering (and eventually pausing) #14378

Open
6 tasks done
cyberme0w opened this issue Jun 18, 2024 · 0 comments
Open
6 tasks done
Labels

Comments

@cyberme0w
Copy link

cyberme0w commented Jun 18, 2024

mpv Information

mpv 0.38.0 Copyright _ 2000-2024 mpv/MPlayer/mplayer2 projects
libplacebo version: v6.338.2
FFmpeg version: 6.1.1-4+b3
FFmpeg library versions:
   libavutil       58.29.100
   libavcodec      60.31.102
   libavformat     60.16.100
   libswscale      7.5.100
   libavfilter     9.12.100
   libswresample   4.12.100

Other Information

  • Linux version: Debian GNU/Linux trixie/sid
  • Kernel Version: Linux nucleus 6.7.12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.7.12-1 (2024-04-24) x86_64 GNU/Linux
  • GPU Model: 00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 09)
  • Mesa/GPU Driver Version: Mesa 22.3.6 (LLVM 15.0.6)
  • Window Manager and Version: none (running directly from TTY in minimal Debian Testing install)
  • Source mpv: Debian/apt's Testing repository
  • Introduced in version: unsure, as the issue occurs on both Debian Stable (mpv 0.35.1-4) as well as Testing (0.38.0-1)

Reproduction Steps

  1. Download any test file (in my case, I used yt-dlp https://youtu.be/T0U9ou0HOgY).
  2. Play it with --no-config and provide --audio-device=alsa/plughw:CARD=HDMI,DEV=3 (HDMI output to TV)
  3. Play it with the same options as in 2. but enable hardware decoding with --hwdec.

Expected Behavior

MPV plays the file without issues.

Actual Behavior

The video starts playing, but the audio seems to be 'dropping frames', in that it's very choppy and tends to get worse over time.

The 'choppiness' is also not constant - sometimes it's almost entirely gone, and other times the audio is barely understandable.

Sometimes, the video ends up freezing (once again, not always, but more common when not using --hwdec) as if the 'pause' button had been pressed. Checking the console log, there's always an entry with 'Audio device underrun detected' after this happens. However, I have noticed it is possible for those entries to appear without the video freezing, too.

Log File

Without --hwdec (file played until the end):
output-without-hwdec.txt

With --hwdec (file paused and I quit mpv manually with 'q'):
output-with-hwdec.txt

Sample Files

I have downloaded this Numberphile video and cut it down to 30 seconds (to be able to upload it) with:

yt-dlp https://www.youtube.com/watch?v=T0U9ou0HOgY
ffmpeg -i {the-file} -to 0:00:30 -c copy parker.mp4

This results in the following file:
https://github.com/mpv-player/mpv/assets/59916540/25415712-cbcd-4310-b26b-da64b98d0cf0

This is the file I have used to generate the logs above.

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.
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

1 participant